Repository navigation
Conversation
|
I built a reproducer for this with an inventory plugin (intending to turn it into a test for this PR), but as-is doesn't fix the issue (piqued my interest as I've often wondered how we'd handle disappearing hosts)... |
|
@nitzmahone what is the reproducer? original issue was mostly a confluence of race conditions and i was having a hard time making it happen. |
|
vanish.py disappearing_host.yml disappear.vanish.yml
reproduces it 100% for me |
|
I suspect there are probably a number of other potential hazards for this, but handler exec is a big one. It seems to work as expected without a handler and using the default callback. |
|
this looks like diff case than the one i was handling: free strat + one of disappearing hosts being slow to return previous result when inventory (run_once) was refreshed. so we probably have multiple cases that cause errors when a host disappears mid play. |
|
Yeah, I thought about |
|
I'm also wondering if we should leave "removed" hosts in place and just have an active flag on them that play_iterator et al would just ignore when asking for the next host... Would probably solve a lot of these kinds of problems, since other things like task completion and stats that need to look up hosts would still find them. Otherwise this is probably going to be a long series of race condition whack-a-mole... |
|
discussed a lot in irc with original author so ticket does not have good reflection of full issue, still unsure that is the case since i could not easily reproduce. as for ignoring the host, that is kind of what this does, sets state to 'nothing to do' and puts in removed_keys() so it is skipped even if iterator has it in preset objects need to check why handlers still run, but also need to discuss |
This comment has been minimized.
This comment has been minimized.
|
new state 'removed' for host so iterator skips, but still reports on it (remove from hostvars?) |
Co-authored-by: David Shrewsbury <Shrews@users.noreply.github.com>
2a5a5e0 to
8dbf996
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
fixes #55669
ISSUE TYPE
COMPONENT NAME
core