I am seeing a problem with Ansible (1.9.4) and Debian 7 (wheezy) timing out and failing on gathering facts, specifically with autofs/network mounted volumes. Its not limited to a specific host, as it is happening at random times across 200 hosts that have autofs setup.
GATHERING FACTS ***************************************************************
failed: [localhost] => {“cmd”: “/bin/lsblk -ln --output UUID /etc/auto.net”, “failed”: true, “rc”: 257}
msg: Traceback (most recent call last):
File “/root/.ansible/tmp/ansible-tmp-1461943252.91-163803999777791/setup”, line 1668, in run_command
cmd = subprocess.Popen(args, **kwargs)
File “/usr/lib/python2.7/subprocess.py”, line 679, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1153, in _execute_child
self.pid = os.fork()
File “/root/.ansible/tmp/ansible-tmp-1461943252.91-163803999777791/setup”, line 1823, in _handle_timeout
raise TimeoutError(error_message)
TimeoutError: Timer expired
When the fact gather task does work:
{
“device”: “/etc/auto.net”,
“fstype”: “autofs”,
“mount”: “/mnt/net”,
“options”: “rw,relatime,fd=27,pgrp=27931,timeout=300,minproto=5,maxproto=5,indirect”,
“size_available”: 0,
“size_total”: 0,
“uuid”: “NA”
}
Run manually
lsblk -ln --output UUID /etc/auto.net
lsblk: /etc/auto.net: not a block device
Relevant bugs:
https://github.com/ansible/ansible/issues/11005
https://github.com/ansible/ansible/issues/6891
Has anyone come across this issue? Alternatively, is there a way to disable certain facts from being gathered?
Thanks.