{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/4355","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/4355/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/4355/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/4355/events","html_url":"https://github.com/ansible/ansible/issues/4355","id":20452957,"number":4355,"title":"Failed to lock apt for exclusive operation","user":{"login":"Ravenwater","id":466641,"avatar_url":"https://avatars.githubusercontent.com/u/466641?v=3","gravatar_id":"","url":"https://api.github.com/users/Ravenwater","html_url":"https://github.com/Ravenwater","followers_url":"https://api.github.com/users/Ravenwater/followers","following_url":"https://api.github.com/users/Ravenwater/following{/other_user}","gists_url":"https://api.github.com/users/Ravenwater/gists{/gist_id}","starred_url":"https://api.github.com/users/Ravenwater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ravenwater/subscriptions","organizations_url":"https://api.github.com/users/Ravenwater/orgs","repos_url":"https://api.github.com/users/Ravenwater/repos","events_url":"https://api.github.com/users/Ravenwater/events{/privacy}","received_events_url":"https://api.github.com/users/Ravenwater/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2013-10-03T13:12:36Z","updated_at":"2016-05-31T08:07:31Z","closed_at":"2013-10-03T14:11:21Z","body":"ansible 1.3.2 on Ubuntu precise32\r\n\r\nvagrant@ansible-head:~$ ansible-playbook -i inventory ubuntu-apache2.yaml -vvvv\r\n\r\nPLAY [webserver] **************************************************************\r\n\r\nGATHERING FACTS ***************************************************************\r\n<192.168.35.11> ESTABLISH CONNECTION FOR USER: vagrant\r\n<192.168.35.11> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o',  ControlPersist=60s', '-o', 'ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.35.11', \"/bin/sh -c\r\n'mkdir -p $HOME/.ansible/tmp/ansible-1380805110.18-64078362144750 && chmod a+rx $HOME/.ansible/tmp/ansible-1380805110.18-64078362144750 && echo $HOME/.ansible/tmp/ansible-1380805110.18-64078362144750'\r\n\"]\r\n<192.168.35.11> REMOTE_MODULE setup\r\n<192.168.35.11> PUT /tmp/tmpJt1mst TO /home/vagrant/.ansible/tmp/ansible-1380805110.18-64078362144750/setup\r\n<192.168.35.11> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s','-o', 'ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,pub\r\nlickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.35.11', \"/bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-1380805110.18-64078362144750/setup; rm -rf /home/vagrant/.ansible/tmp/ansible-1380805110.18-64078362144750/ >/dev/null 2>&1'\"]\r\nok: [host1.***.***]\r\n\r\nTASK: [Updates apt cache] *****************************************************\r\n<192.168.35.11> ESTABLISH CONNECTION FOR USER: vagrant\r\n<192.168.35.11> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s','-o', 'ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.35.11', \"/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1380805110.43-31666560672201 && chmod a+rx $HOME/.ansible/tmp/ansible-1380805110.43-31666560672201 && echo $HOME/.ansible/tmp/ansible-1380805110.43-31666560672201' \"]\r\n<192.168.35.11> REMOTE_MODULE apt update_cache=true\r\n<192.168.35.11> PUT /tmp/tmpX1Y8Pe TO /home/vagrant/.ansible/tmp/ansible-1380805110.43-31666560672201/apt\r\n<192.168.35.11> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.35.11', \"/bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-1380805110.43-31666560672201/apt; rm -rf /home/vagrant/.ansible/tmp/ansible-1380805110.43-31666560672201/ >/dev/null 2>&1'\"]\r\nfailed: [host1.***.***] => {\"failed\": true}\r\n\r\nmsg: Failed to lock apt for exclusive operation\r\n\r\nFATAL: all hosts have already failed -- aborting\r\n\r\nPLAY RECAP ********************************************************************\r\n           to retry, use: --limit @/home/vagrant/ubuntu-apache2.yaml.retry\r\n\r\nhost1.***.***      : ok=1    changed=0    unreachable=0    failed=1\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/222619701","html_url":"https://github.com/ansible/ansible/issues/4355#issuecomment-222619701","issue_url":"https://api.github.com/repos/ansible/ansible/issues/4355","id":222619701,"user":{"login":"richard-scott","id":5149834,"avatar_url":"https://avatars.githubusercontent.com/u/5149834?v=3","gravatar_id":"","url":"https://api.github.com/users/richard-scott","html_url":"https://github.com/richard-scott","followers_url":"https://api.github.com/users/richard-scott/followers","following_url":"https://api.github.com/users/richard-scott/following{/other_user}","gists_url":"https://api.github.com/users/richard-scott/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-scott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-scott/subscriptions","organizations_url":"https://api.github.com/users/richard-scott/orgs","repos_url":"https://api.github.com/users/richard-scott/repos","events_url":"https://api.github.com/users/richard-scott/events{/privacy}","received_events_url":"https://api.github.com/users/richard-scott/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T08:07:31Z","updated_at":"2016-05-31T08:07:31Z","body":"If it helps, I've been seeing this lock issue when my VM is usign a Vagrant image based on one that has an empty /var/lib/apt folder (to save space).  Vagrant seems to take a while to populate these folders hence the lock when running the Ansible provisioning script via the Vagrantfile."}}
{"actor":{"display_login":"richard-scott"}}