diff options
author | Adrian Likins <alikins@redhat.com> | 2017-09-28 10:56:18 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2017-09-28 10:56:18 -0400 |
commit | 4025b4762908d00f0ba2fee7a4bd8e75941f854b (patch) | |
tree | fff2db47d1253008cadfcc5faabf94a53240f2f7 /CHANGELOG.md | |
parent | f7b09083159adbb20d5d3e81507b675cff770a69 (diff) | |
download | ansible-4025b4762908d00f0ba2fee7a4bd8e75941f854b.tar.gz |
Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors
Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.
But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet.
Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.
To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.
* Flip the loops when building collector names
iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.
This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors
For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.
* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.
fixes #30753
fixes #30623
(cherry picked from commit 95abc1d82e4c40832c802253107ad3f9aeebc68d)
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fd8fa378e..e950d7aee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Ansible Changes By Release * corrected dig lookup docs * fix type handling for sensu_silence so the module works * added fix for win_iis_webapppool to correctly handle array elements +* Fix bugs caused by lack of collector ordering like service_mgr being incorrect (https://github.com/ansible/ansible/issues/30753) <sdfasdfsadfsdflkjsdfklj3oiqrua id="2.4"></a> |