Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout causes Fact Cache Corruption #11645

Closed
hlieberman opened this issue Jul 19, 2015 · 1 comment
Closed

Timeout causes Fact Cache Corruption #11645

hlieberman opened this issue Jul 19, 2015 · 1 comment
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release

Comments

@hlieberman
Copy link
Contributor

Issue Type:

Bug Report

Ansible Version:

Ansible 1.9.2 (as distributed by Debian, 1.9.2+dfsg-1)

Ansible Configuration:

Any playbook containing conditionals involving facts.

Environment:

Debian Linux 8.1 (Jessie)

Summary:

After a timeout during a play on a slow host, plays involving conditionals fail on that host.

Steps To Reproduce:

(Copied from downstream ticket: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792793)

I faced a timeout on a (slow) host:

Daneel | FAILED >> {
    "cmd": "/bin/lsblk -ln --output UUID 
/dev/mapper/Daneel_xtra-backup",
    "failed": true,
    "msg": "Traceback (most recent call last):\n  File 
\"/root/.ansible/tmp/ansible-tmp-1437234237.91-43519604009961/setup\", 
line 1677, in run_command\n    rfd, wfd, efd = select.select(rpipes, [], 
rpipes, 1)\n  File 
\"/root/.ansible/tmp/ansible-tmp-1437234237.91-43519604009961/setup\", 
line 1807, in _handle_timeout\n    raise 
TimeoutError(error_message)\nTimeoutError: Timer expired\n",
    "rc": 257
}

Since this, playing playbooks failed on that host when conditionals
where used.

After some digging it appeared the fact cache for this host (using
jsonfile) only contained the following line:
{"module_setup": true}

So Ansible must not write in cache if any error occurred during fact
collection.

Expected Results:

Fact cache is either deleted upon failure to refresh on next run, or left intact with old data.

Actual Results:

Fact cache contains only module setup indication.

@abadger abadger added bug_report P2 Priority 2 - Issue Blocks Release labels Jul 21, 2015
@jimi-c
Copy link
Member

jimi-c commented Jul 22, 2015

Hi @hlieberman, this should have been fixed in d977da5, which is in devel, and will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.

Thank you!

@jimi-c jimi-c closed this as completed Jul 22, 2015
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

4 participants