hashbangcode / vlad

Vlad - Vagrant LAMP Ansible Drupal
173 stars 53 forks source link

build failing on Ubuntu with either 1.1.6 or current dev #319

Closed mattv99 closed 8 years ago

mattv99 commented 8 years ago

I'm having trouble getting VLAD to provision a new Ubuntu box using either version 1.1.6 or the current dev release:

TASK: [base | apt-get | apt-get update and ensure core packages are installed] ***
failed: [192.168.100.100] => (item=ssh-import-id,gcc,unzip,curl,atop,vim,make,iptables,language-pack-en) => {"failed": true, "item": "ssh-import-id,gcc,unzip,curl,atop,vim,make,iptables,language-pack-en"}
stderr: E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  language-pack-en-base
Suggested packages:
  zip
The following NEW packages will be installed:
  atop language-pack-en language-pack-en-base unzip
0 upgraded, 4 newly installed, 0 to remove and 199 not upgraded.

msg: '/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"   install 'unzip' 'atop' 'language-pack-en'' failed: E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/matt.vance/site.retry

192.168.100.100            : ok=6    changed=0    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

I debated about whether this might be related to #315, since it's failing at a similar step, but the error message is different from that issue.

zxaos commented 8 years ago

That looks to me like either ansible failed to sudo properly before running apt. Alternatively, if you have the vagrant-cachier plugin installed, it's possible you don't have write access to the cache buckets.

If you have vagrant-cachier installed, try uninstalling and re-provisioning.

It also could just also be ansible being weird. It happens sometimes. Try vagrant provision again?

mattv99 commented 8 years ago

Uninstalling vagrant-cachier made the problem go away, but reinstalling it brought it back. Ultimately, either a reboot of the host or reprovisioning of one of the existing guest VMs seems to have done the trick. Thanks a lot zxaos!