running apt: update_cache=yes is failing the entire play

742 views
Skip to first unread message

Lokesh Dokara

unread,
Jul 19, 2014, 3:33:04 AM7/19/14
to ansible...@googlegroups.com
invalid output was: SUDO-SUCCESS-siogahtpvfcksvvxfxqslqrszpkxisfp
bzip2: (stdin) is not a bzip2 file.
bzip2: (stdin) is not a bzip2 file.
bzip2: (stdin) is not a bzip2 file.
bzip2: (stdin) is not a bzip2 file.
Traceback (most recent call last):
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1405754512.83-262599342047331/apt", line 1762, in <module>
    main()
  File "/home/vagrant/.ansible/tmp/ansible-tmp-1405754512.83-262599342047331/apt", line 492, in main
    cache.update()
  File "/usr/lib/python2.7/dist-packages/apt/deprecation.py", line 98, in deprecated_function
    return func(*args, **kwds)
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 418, in update
    raise FetchFailedException(e)
apt.cache.FetchFailedException: W:Failed to fetch bzip2:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages  Hash Sum mismatch
, W:Failed to fetch bzip2:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-i386_Packages  Hash Sum mismatch
, E:Some index files failed to download. They have been ignored, or old ones used instead.

Michael DeHaan

unread,
Jul 19, 2014, 7:54:55 AM7/19/14
to ansible...@googlegroups.com
So this is a traceback that looks like it needs to be caught to raise a proper error.

Please let us know what version of Ansible you are using, though in this case it seems like we need to catch an exception in the apt module.

Once you have pinned down the Ansible version, please file a ticket at github.com/ansible/ansible per CONTRIBUTING.md and include the line from your playbook that you used to trigger the task, as well as the output above.




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/27d2ec3f-4359-4ee4-bc30-5bba3887edb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael DeHaan

unread,
Jul 19, 2014, 8:50:35 AM7/19/14
to ansible...@googlegroups.com
Just wanted to clarify some behavior -- that this does not fail the entire play in a way that is abnormal.

It takes the host out of rotation for the rest of the playbook - the host has failed.

If there are other hosts under configuration, those hosts will still be configured, unless they have this same problem.

If it actually failed to download, and the exception *was* caught, and it returned failed=True, the same thing happens.

Think of this as "the message out of this error condition is not good", basically, but the error condition would still be there.

The question of why may deal with the upstream repo or your network or apt configuration, I'm not sure.



Reply all
Reply to author
Forward
0 new messages