ansible/test/integration
Adrian Likins 4025b47629 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 95abc1d82e)
2017-09-28 10:56:18 -04:00
..
group_vars Move networking provider options to subspec (#28894) 2017-09-01 11:53:51 -04:00
host_vars
roles Add a code-smell test for smart quotes and remove smart quotes from all files 2017-09-19 13:00:56 -07:00
targets Fix fact failures cause by ordering of collectors (#30777) 2017-09-28 10:56:18 -04:00
vars
amazon.yml
asa.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00
azure.yml
cleanup_azure.py
cleanup_ec2.py
cleanup_gce.py
cleanup_rax.py
cloud-config-aws.yml.template
cloud-config-azure.yml.template Fix Azure config template. 2017-08-16 12:17:38 -07:00
cloud-config-cs.ini.template
cloudflare.yml
cloudscale.yml
cnos.yaml
connection-buildah.yaml
consul.yml Adds support for all Consul 0.8 ACL rule scopes (#25800) 2017-08-09 15:21:12 -04:00
consul_inventory.yml
consul_running.py
credentials.template
dellos6.yaml
dellos9.yaml
dellos10.yaml
eos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00
exoscale.yml
galaxy_playbook.yml
galaxy_playbook_git.yml
galaxy_roles.yml
galaxy_rolesfile
gce.yml
gce_credentials.py
integration_config.yml
inventory Fix fact failures cause by ordering of collectors (#30777) 2017-09-28 10:56:18 -04:00
inventory.network
inventory.networking.template
inventory.remote.template
inventory.winrm.template
inventory.yaml
ios.yaml IOS Ping: Add new module to support ping tests from IOS devices (#28557) 2017-08-29 11:21:49 -04:00
iosxr.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00
jenkins.yml
junos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00
Makefile
netscaler.yaml Lowercase enabled, disabled option values (#27764) 2017-08-25 13:11:48 -04:00
network-all.yaml
network-integration.cfg Increase socket connect retry timeout for integration test (#30681) (#30683) 2017-09-21 11:02:22 +01:00
nuage.yaml
nxos.yaml Fix nxos_snmp_community idempotence issue (#30388) 2017-09-15 07:52:44 -07:00
ops.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00
ovs.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00
platform_agnostic.yaml remove net_command (#28525) 2017-08-23 02:07:39 +05:30
rackspace.yml
setup_gce.py
target-prefixes.network
vyos.yaml Fix trailing space in ec2_vol example, fix 'the the' typos (#28440) 2017-08-19 23:00:51 +02:00