Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something about this box causes Salt to be extremely slow #9

Open
chuyskywalker opened this issue Jan 5, 2014 · 12 comments
Open

Something about this box causes Salt to be extremely slow #9

chuyskywalker opened this issue Jan 5, 2014 · 12 comments
Labels

Comments

@chuyskywalker
Copy link

I was attempting to use Salt to provision a machine based on this box, but as you can see in this gist a basic salt state with nothing in it takes over 60 seconds to run.

If I spin up the same salt provision, but with this box:

  config.vm.box = "puppet-labs-centos64"
  config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box"

the salt highstate takes about 2 seconds

@casr
Copy link
Member

casr commented Jan 5, 2014

Thanks for the report. Unfortunately, I'm not familiar with Salt.

Is it perhaps a missing dependency that takes time to download?

Another route that might be worth testing would the 6.4 box and seeing if you have the same problem.

Does Salt have high memory requirements? Perhaps GH-8 might be related in that case.

@chuyskywalker
Copy link
Author

As it takes 60 seconds every run (not just the first) it's probably not some dependency like a first-run would have. Plus, as noted on another centos box it runs super fast, every on the first run.

It could be memory, but I give the VM 2GB of ram at boot, so probably not. I mean, it shouldn't be swapping by that point anyway.

...and I just tried the older box image your linked to, and we have a winner: it's not having the same problem. With https://github.com/2creatives/vagrant-centos/releases/download/v6.5.2/centos65-x86_64-20131219.box It takes the weird 60 seconds to run a basic "echo hello" provision. But that same salt provision in https://github.com/2creatives/vagrant-centos/releases/download/v6.4.1/centos64-x86_64-20131218.box works in 1.3 seconds.

@chuyskywalker
Copy link
Author

It's worth noting that, from the 6.4 image, I could do a yum update to get to 6.5 and the salt call still takes about 2 seconds. So something about the newer box is probably behind this.

@casr
Copy link
Member

casr commented Jan 5, 2014

Seems like your problem might be related to CentOS 6.5? Just to be sure you could try the older releases of 6.5 on the release page or perhaps vagrantbox.es has some 6.5 boxes too (might have to look in the pull requests as the repo isn't updated often).

@casr
Copy link
Member

casr commented Jan 5, 2014

It's worth noting that, from the 6.4 image, I could do a yum update to get to 6.5 and the salt call still takes about 2 seconds. So something about the newer box is probably behind this.

Missed this. That is interesting...

Does it still go fast if you yum update before installing Salt?

@chuyskywalker
Copy link
Author

So I've tried a few of the older 6.5 boxes:

build real user sys
v6.5.0/centos65-x86_64-20131202.box 0m1.318s 0m1.196s 0m0.074s
v6.5.1/centos65-x86_64-20131205.box 0m1.605s 0m1.234s 0m0.099s
v6.5.2/centos65-x86_64-20131219.box 0m1.395s 0m1.244s 0m0.083s

I...can't replicate this now. Damn hiesenbugs. Thanks for giving me some pointers anyway. If I can produce a reliable replication, I'll send over some better instructions.

@casr
Copy link
Member

casr commented Jan 5, 2014

D'oh! Good luck with it!

@calvinhp
Copy link

calvinhp commented Mar 5, 2014

I was experiencing the same issues with your 6.5 box. I switched to the puppetlabs 6.5 box and the issues went away. During the salt runs it would sit in wait for a long time before actually executing any of the python code from what I saw, but I'm not certain what is different between the box builds.

@casr
Copy link
Member

casr commented Mar 6, 2014

What's the date on the centos65 box are you using? Could you try some of the other dated releases off of the releases page and see if that helps?

@casr casr reopened this Mar 6, 2014
@casr
Copy link
Member

casr commented Mar 11, 2014

@calvinhp Just looking through sshd_config, it probably relates to 5b79451. The 16 Jan release would have had it under the "Subsystem sftp" line thereby making it ineffectual, I believe.

I will have to package up a new release soon, I guess!

@calvinhp
Copy link

That would make sense, I look forward to the latest draft...

@casr
Copy link
Member

casr commented Mar 27, 2014

Might also be related to IPv6. hashicorp/vagrant/issues/1172

@casr casr added bug and removed invalid labels Mar 27, 2014
casr added a commit that referenced this issue Apr 5, 2014
From resolv.conf(5):

    single-request-reopen (since glibc 2.9)
        The resolver uses the same socket for the A and AAAA
        requests. Some hardware mistakenly sends back only one
        reply. When that happens the client system will sit and wait
        for the second reply. Turning this option on changes this
        behavior so that if two requests from the same port are not
        handled correctly it will close the socket and open a new
        one before sending the second request.

GH-9
ryross pushed a commit to RepublicProject/vagrant-centos that referenced this issue Dec 17, 2014
From resolv.conf(5):

    single-request-reopen (since glibc 2.9)
        The resolver uses the same socket for the A and AAAA
        requests. Some hardware mistakenly sends back only one
        reply. When that happens the client system will sit and wait
        for the second reply. Turning this option on changes this
        behavior so that if two requests from the same port are not
        handled correctly it will close the socket and open a new
        one before sending the second request.

2creativesGH-9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants