md5sum command failed unusually

Hi,

I’ve run “vagrant provision” against Ubuntu 12.04 VM and got this message to report this mistake to the list.

Ansible version is 1.2.2

Here is an output:

PLAY [Set the locale] *********************************************************

TASK: [create locale.gen] *****************************************************
warning: md5sum command failed unusually, please report this to the list so it can be fixed
command: [u’(/usr/bin/md5sum /etc/locale.gen 2>/dev/null)‘, u’(/sbin/md5sum -q /etc/locale.gen 2>/dev/null)‘, u’(/usr/bin/digest -a md5 /etc/locale.gen 2>/dev/null)‘, u’(/sbin/md5 -q /etc/locale.gen 2>/dev/null)‘, u’(/usr/bin/md5 -n /etc/locale.gen 2>/dev/null)‘, u’(/bin/md5 -q /etc/locale.gen 2>/dev/null)']

Do I infer correctly you are seeing this in 1.2.2?

If you run each of those md5sum commands (for the ones that are present on your filesystem, in order) do any of them output failure codes?

command: [u’(/usr/bin/md5sum /etc/locale.gen 2>/dev/null)‘, u’(/sbin/md5sum -q /etc/locale.gen 2>/dev/null)‘, u’(/usr/bin/digest -a md5 /etc/locale.gen 2>/dev/null)‘, u’(/sbin/md5 -q /etc/locale.gen 2>/dev/null)‘, u’(/usr/bin/md5 -n /etc/locale.gen 2>/dev/null)‘, u’(/bin/md5 -q /etc/locale.gen 2>/dev/null)']

Yes, ansible 1.2.2.

Yes, every command returns "file not found", so it seems that problem
is on template rendering or somewhere around.
I think so because of this strange "/copy" in a response:

invalid output was: /usr/bin/python: can't open file '/copy': [Errno 2] No such file or directory

Is there any method to have an extended log for the playbook?

A.

Can you please try this on 1.3?

I am using 12.04 without any problems.

Also, I should point out, all versions have been happy on 12.04, so I am interested in what is up with your environment.

1.3 gives better output on some things.

Thanks!

It's definitely something strange with my testing farm. Ansible 1.3
claims no task had been failed, but not file is changed on target VM,
no failed task in summary, but failure message exists in the end of
output.

I'm going to reinstall testing farm and make another try.

FYI output of ansible 1.3:

[default] Running provisioner: ansible...

PLAY [Set the locale] *********************************************************

TASK: [create locale.gen] *****************************************************

ok: [192.168.100.14] => {"changed": false, "gid": 1000, "group":
"vagrant", "mode": "0600", "owner": "vagrant", "path":
"/etc/locale.gen", "size": 285, "state": "file", "uid": 1000}

PLAY [Set the time zone] ******************************************************

TASK: [set /etc/localtime to Europe/Moscow] ***********************************

changed: [192.168.100.14] => {"changed": true, "cmd": ["/bin/cp",
"/usr/share/zoneinfo/Europe/Moscow", "/etc/localtime"], "delta":
"0:00:00.002052", "end": "2013-07-26 21:46:44.668869", "rc": 0,
"start": "2013-07-26 21:46:44.666817", "stderr": "", "stdout": ""}

TASK: [set /etc/timezone to Europe/Moscow] ************************************

ok: [192.168.100.14] => {"changed": false, "gid": 0, "group": "root",
"mode": "0644", "owner": "root", "path": "/etc/timezone", "size": 14,
"state": "file", "uid": 0}

PLAY RECAP ********************************************************************

192.168.100.14 : ok=3 changed=1 unreachable=0 failed=0

Ansible failed to complete successfully. Any error output should be

visible above. Please fix these errors and try again.

A.

It looks like Vagrant treats ansible return code as "ansible failed".

A.

You didn’t have any failed hosts, so ansible-playbook should be returning 0 in this case.

Perhaps the vagrant plugin is more generally confused?

May be. I’ll try to reproduce it under control.

A.

Hi,

I got the same error with an OpenBSD host and ansible 1.2.2 when the destination file does not yet exist. The copy task is

  • name: Create rc.local to startup nginx and Redis
    copy: src=rc.conf.local dest=/etc/rc.conf.local

and the ansible-playbook output is:

TASK: [Create rc.local to startup nginx and Redis] ****************************
warning: md5sum command failed unusually, please report this to the list so it can be fixed
command: [u’(/usr/bin/md5sum /etc/rc.conf.local 2>/dev/null)‘, u’(/sbin/md5sum -q /etc/rc.conf.local 2>/dev/null)‘, u’(/usr/bin/digest -a md5 /etc/rc.conf.local 2>/dev/null)‘, u’(/sbin/md5 -q /etc/rc.conf.local 2>/dev/null)‘, u’(/usr/bin/md5 -n /etc/rc.conf.local 2>/dev/null)‘, u’(/bin/md5 -q /etc/rc.conf.local 2>/dev/null)']

stdout/stderr probably isn’t split here the way we are invoking things, but rather the output from OpenBSD md5 is likely different than we would normally expect.

This should be easy to work around, can you please make sure there is a github ticket filed for this?

Thanks!

Here you go: https://github.com/ansible/ansible/issues/3754

Thanks!

Mark

I ran into this problem and patched the md5 binary on OpenBSD. This has
been commited to CVS, see my comment on the ticket for more information.

Regards,
Patrik Lundin