Skip to content

Instantly share code, notes, and snippets.

@tknerr
Created January 18, 2015 12:18
Show Gist options
  • Save tknerr/67ffc7c02923e8a9379a to your computer and use it in GitHub Desktop.
Save tknerr/67ffc7c02923e8a9379a to your computer and use it in GitHub Desktop.
vagrant up works, but after that the shared folder is lost and vagrant provision fails
tkn@dev-box:~/vagrant-workflow-tests/playground/sample-infrastructure-repo$ vagrant up app_v1
Bringing machine 'app_v1' up with 'lxc' provider...
==> app_v1: Using top-level cookbook 'https://github.com/tknerr/sample-toplevel-cookbook'
==> app_v1: Ensuring top-level cookbook is checked out at 'v0.2.0'
==> app_v1: Installing top-level cookbook dependencies to '/home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks'
Resolving cookbook dependencies...
Fetching 'sample-app' from source at .
Using apt (2.4.0)
Using iptables (0.13.2)
Using apache2 (1.10.4)
Using logrotate (1.6.0)
Using sample-app (0.2.0) from source at .
Using pacman (1.1.1)
Vendoring apache2 (1.10.4) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/apache2
Vendoring apt (2.4.0) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/apt
Vendoring iptables (0.13.2) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/iptables
Vendoring logrotate (1.6.0) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/logrotate
Vendoring pacman (1.1.1) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/pacman
Vendoring sample-app (0.2.0) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/sample-app
==> app_v1: Configuring Chef Solo provisioner for top-level cookbook
==> app_v1: Importing base box 'fgrehm/precise64-lxc'...
==> app_v1: Setting up mount entries for shared folders...
app_v1: /vagrant => /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo
app_v1: /tmp/vagrant-cache => /home/tkn/.vagrant.d/cache/fgrehm/precise64-lxc
app_v1: /tmp/vagrant-toplevel-cookbooks/63b3b62fe28610b24b8b8c1ee5cb1f46/cookbooks => /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks
==> app_v1: Starting container...
==> app_v1: Waiting for machine to boot. This may take a few minutes...
app_v1: SSH address: 10.0.3.213:22
app_v1: SSH username: vagrant
app_v1: SSH auth method: private key
app_v1:
app_v1: Vagrant insecure key detected. Vagrant will automatically replace
app_v1: this with a newly generated keypair for better security.
app_v1:
app_v1: Inserting generated public key within guest...
app_v1: Removing insecure key from the guest if its present...
app_v1: Key inserted! Disconnecting and reconnecting using new SSH key...
==> app_v1: Machine booted and ready!
==> app_v1: Setting up private networks...
==> app_v1: Setting hostname...
==> app_v1: Configuring cache buckets...
==> app_v1: Installing Chef 12.0.3 Omnibus package...
==> app_v1: Downloading Chef 12.0.3 for ubuntu...
==> app_v1: downloading https://www.chef.io/chef/metadata?v=12.0.3&prerelease=false&nightlies=false&p=ubuntu&pv=12.04&m=x86_64
==> app_v1: to file /tmp/install.sh.935/metadata.txt
==> app_v1: trying wget...
==> app_v1: url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_12.0.3-1_amd64.deb
==> app_v1: md5 e849cf61d3e3fd37224c11f9902aa536
==> app_v1: sha256 a8e9c78cc9b9a17a32b9b4ae1650b8b6454b4f0abd611048d099a659ca5de28f
==> app_v1: downloaded metadata file looks valid...
==> app_v1: /tmp/vagrant-cache/vagrant_omnibus/chef_12.0.3-1_amd64.deb already exists, verifiying checksum...
==> app_v1: Comparing checksum with sha256sum...
==> app_v1: checksum compare succeeded, using existing file!
==> app_v1: Installing Chef 12.0.3
==> app_v1: installing with dpkg...
==> app_v1: Selecting previously unselected package chef.
==> app_v1: (Reading database ...
==> app_v1: 14297 files and directories currently installed.)
==> app_v1: Unpacking chef (from .../chef_12.0.3-1_amd64.deb) ...
==> app_v1: Setting up chef (12.0.3-1) ...
==> app_v1: Thank you for installing Chef!
==> app_v1: Running provisioner: chef_solo...
==> app_v1: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> app_v1: Running chef-solo...
==> app_v1: stdin: is not a tty
==> app_v1: [2015-01-18T12:11:04+00:00] INFO: Forking chef instance to converge...
==> app_v1: [2015-01-18T12:11:04+00:00] INFO: *** Chef 12.0.3 ***
==> app_v1: [2015-01-18T12:11:04+00:00] INFO: Chef-client pid: 1079
==> app_v1: [2015-01-18T12:11:05+00:00] INFO: Setting the run_list to ["recipe[sample-app]"] from CLI options
==> app_v1: [2015-01-18T12:11:05+00:00] INFO: Run List is [recipe[sample-app]]
==> app_v1: [2015-01-18T12:11:05+00:00] INFO: Run List expands to [sample-app]
==> app_v1: [2015-01-18T12:11:05+00:00] INFO: Starting Chef Run for appv1.local
==> app_v1: [2015-01-18T12:11:05+00:00] INFO: Running start handlers
==> app_v1: [2015-01-18T12:11:05+00:00] INFO: Start handlers complete.
==> app_v1: [2015-01-18T12:11:06+00:00] WARN: Cloning resource attributes for execute[apt-get-update] from prior resource (CHEF-3694)
==> app_v1: [2015-01-18T12:11:06+00:00] WARN: Previous execute[apt-get-update]: /tmp/vagrant-toplevel-cookbooks/63b3b62fe28610b24b8b8c1ee5cb1f46/cookbooks/apt/recipes/default.rb:29:in `from_file'
==> app_v1: [2015-01-18T12:11:06+00:00] WARN: Current execute[apt-get-update]: /tmp/vagrant-toplevel-cookbooks/63b3b62fe28610b24b8b8c1ee5cb1f46/cookbooks/apt/recipes/default.rb:38:in `from_file'
==> app_v1: [2015-01-18T12:11:06+00:00] ERROR: Failed to list data bag items in data bag: "yummy"
==> app_v1: [2015-01-18T12:11:10+00:00] INFO: execute[apt-get-update] ran successfully
==> app_v1: [2015-01-18T12:11:13+00:00] INFO: apt_package[update-notifier-common] sending run action to execute[apt-get-update] (immediate)
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: execute[apt-get-update] ran successfully
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local] owner changed to 0
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local] group changed to 0
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local] mode changed to 755
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0
==> app_v1: [2015-01-18T12:11:17+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: directory[/etc/apache2/ssl] created directory /etc/apache2/ssl
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: directory[/etc/apache2/ssl] owner changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: directory[/etc/apache2/ssl] group changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: directory[/etc/apache2/ssl] mode changed to 755
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: directory[/var/cache/apache2] owner changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: directory[/var/cache/apache2] group changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2.conf] backed up to /var/chef/backup/etc/apache2/apache2.conf.chef-20150118121123.714883
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2.conf] updated file contents /etc/apache2/apache2.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-security] created file /etc/apache2/conf.d/security.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-security] updated file contents /etc/apache2/conf.d/security.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-security] owner changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-security] group changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-security] mode changed to 644
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-security] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-charset] created file /etc/apache2/conf.d/charset.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-charset] updated file contents /etc/apache2/conf.d/charset.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-charset] owner changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-charset] group changed to 0
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-charset] mode changed to 644
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2-conf-charset] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/ports.conf] backed up to /var/chef/backup/etc/apache2/ports.conf.chef-20150118121123.730617
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/ports.conf] updated file contents /etc/apache2/ports.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/ports.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/sites-available/default] backed up to /var/chef/backup/etc/apache2/sites-available/default.chef-20150118121123.737255
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/sites-available/default] updated file contents /etc/apache2/sites-available/default
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/sites-available/default] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/status.conf] backed up to /var/chef/backup/etc/apache2/mods-available/status.conf.chef-20150118121123.744111
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/status.conf] updated file contents /etc/apache2/mods-available/status.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/status.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] backed up to /var/chef/backup/etc/apache2/mods-available/alias.conf.chef-20150118121123.750615
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] updated file contents /etc/apache2/mods-available/alias.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/autoindex.conf] backed up to /var/chef/backup/etc/apache2/mods-available/autoindex.conf.chef-20150118121123.759923
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/autoindex.conf] updated file contents /etc/apache2/mods-available/autoindex.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/autoindex.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/dir.conf] backed up to /var/chef/backup/etc/apache2/mods-available/dir.conf.chef-20150118121123.765335
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/dir.conf] updated file contents /etc/apache2/mods-available/dir.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/dir.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] backed up to /var/chef/backup/etc/apache2/mods-available/mime.conf.chef-20150118121123.774648
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] updated file contents /etc/apache2/mods-available/mime.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/negotiation.conf] backed up to /var/chef/backup/etc/apache2/mods-available/negotiation.conf.chef-20150118121123.779447
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/negotiation.conf] updated file contents /etc/apache2/mods-available/negotiation.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/negotiation.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] backed up to /var/chef/backup/etc/apache2/mods-available/setenvif.conf.chef-20150118121123.784516
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] updated file contents /etc/apache2/mods-available/setenvif.conf
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] not queuing delayed action reload on service[apache2] (delayed), as it's already been queued
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: can not load data_bag: Data bag path '/tmp/vagrant-toplevel-cookbooks/63b3b62fe28610b24b8b8c1ee5cb1f46/data_bags' is invalid
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/var/www/sample.html] created file /var/www/sample.html
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/var/www/sample.html] updated file contents /var/www/sample.html
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/var/www/sample.html] owner changed to 33
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/var/www/sample.html] group changed to 33
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[/var/www/sample.html] mode changed to 644
==> app_v1: [2015-01-18T12:11:23+00:00] INFO: template[apache2.conf] sending reload action to service[apache2] (delayed)
==> app_v1: [2015-01-18T12:11:25+00:00] INFO: service[apache2] reloaded
==> app_v1: [2015-01-18T12:11:25+00:00] INFO: Chef Run complete in 19.195461801 seconds
==> app_v1: [2015-01-18T12:11:25+00:00] INFO: Skipping removal of unused files from the cache
==> app_v1: [2015-01-18T12:11:25+00:00] INFO: Running report handlers
==> app_v1: [2015-01-18T12:11:25+00:00] INFO: Report handlers complete
==> app_v1: Configuring cache buckets...
tkn@dev-box:~/vagrant-workflow-tests/playground/sample-infrastructure-repo$ vagrant provision app_v1
==> app_v1: Using top-level cookbook 'https://github.com/tknerr/sample-toplevel-cookbook'
==> app_v1: Ensuring top-level cookbook is checked out at 'v0.2.0'
==> app_v1: Installing top-level cookbook dependencies to '/home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks'
Resolving cookbook dependencies...
Fetching 'sample-app' from source at .
Using apt (2.4.0)
Using iptables (0.13.2)
Using apache2 (1.10.4)
Using logrotate (1.6.0)
Using pacman (1.1.1)
Using sample-app (0.2.0) from source at .
Vendoring apache2 (1.10.4) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/apache2
Vendoring apt (2.4.0) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/apt
Vendoring iptables (0.13.2) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/iptables
Vendoring logrotate (1.6.0) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/logrotate
Vendoring pacman (1.1.1) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/pacman
Vendoring sample-app (0.2.0) to /home/tkn/vagrant-workflow-tests/playground/sample-infrastructure-repo/.vagrant/toplevel-cookbooks/app_v1/cookbooks/sample-app
==> app_v1: Configuring Chef Solo provisioner for top-level cookbook
==> app_v1: Configuring cache buckets...
==> app_v1: Chef 12.0.3 Omnibus package is already installed.
==> app_v1: Running provisioner: chef_solo...
==> app_v1: Detected Chef (latest) is already installed
Generating chef JSON and uploading...
==> app_v1: Running chef-solo...
==> app_v1: stdin: is not a tty
==> app_v1: [2015-01-18T12:12:08+00:00] INFO: Forking chef instance to converge...
==> app_v1: [2015-01-18T12:12:08+00:00] INFO: *** Chef 12.0.3 ***
==> app_v1: [2015-01-18T12:12:08+00:00] INFO: Chef-client pid: 3213
==> app_v1: [2015-01-18T12:12:09+00:00] INFO: Setting the run_list to ["recipe[sample-app]"] from CLI options
==> app_v1: [2015-01-18T12:12:09+00:00] INFO: Run List is [recipe[sample-app]]
==> app_v1: [2015-01-18T12:12:09+00:00] INFO: Run List expands to [sample-app]
==> app_v1: [2015-01-18T12:12:09+00:00] INFO: Starting Chef Run for appv1.local
==> app_v1: [2015-01-18T12:12:09+00:00] INFO: Running start handlers
==> app_v1: [2015-01-18T12:12:09+00:00] INFO: Start handlers complete.
==> app_v1: [2015-01-18T12:12:09+00:00] ERROR: Running exception handlers
==> app_v1: [2015-01-18T12:12:09+00:00] ERROR: Exception handlers complete
==> app_v1: [2015-01-18T12:12:09+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> app_v1: [2015-01-18T12:12:09+00:00] ERROR: Cookbook sample-app not found. If you're loading sample-app from another cookbook, make sure you configure the dependency in your metadata
==> app_v1: [2015-01-18T12:12:09+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
tkn@dev-box:~/vagrant-workflow-tests/playground/sample-infrastructure-repo$ /opt/vagrant/bin/vagrant ssh -c "ls /tmp/vagrant-toplevel-cookbooks/63b3b62fe28610b24b8b8c1ee5cb1f46/cookbooks" app_v1
Connection to 10.0.3.213 closed.
tkn@dev-box:~/vagrant-workflow-tests/playground/sample-infrastructure-repo$ /opt/vagrant/bin/vagrant ssh -c "ls -la /tmp/vagrant-toplevel-cookbooks/63b3b62fe28610b24b8b8c1ee5cb1f46/cookbooks" app_v1
total 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment