I'm trying to deploy with chef-solo
which is run by the vagrant-aws
plugin for Vagrant. vagrant-aws
is successful in launching an EC2 instances, rsyncing chef cookbooks and then starting a chef run. I'm using mostly stock cookbooks downloaded through the librarian-chef
gem. There is one application-specific cookbook that configures the app's settings. The sudo
cookbook is v2.7.0.
The issue is that every time I try to provision an instance, chef gets stuck editing /etc/sudoers
. If I ssh into the instance, I find that the chef process is not running. It seems to exit without any return code because vagrant-aws
never finishes running either.
Here is the --debug
output from vagrant up production --provider=aws
:
==> production: [2014-08-21T02:02:46+00:00] INFO: template[/etc/sudoers] backed up to /var/chef/backup/etc/sudoers.chef-20140821020246.492236
DEBUG ssh: stdout: [2014-08-21T02:02:46+00:00] INFO: template[/etc/sudoers] updated file contents /etc/sudoers
INFO interface: info: [2014-08-21T02:02:46+00:00] INFO: template[/etc/sudoers] updated file contents /etc/sudoers
INFO interface: info: ==> production: [2014-08-21T02:02:46+00:00] INFO: template[/etc/sudoers] updated file contents /etc/sudoers
==> production: [2014-08-21T02:02:46+00:00] INFO: template[/etc/sudoers] updated file contents /etc/sudoers
DEBUG ssh: Sending SSH keep-alive...
Then it just repeats the last line over and over. After a while, the chef-solo
process dies but without cleaning up /var/chef/cache/chef-client-running.pid
. If I run chef-solo
again manually on the instance it finishes normally.