Nolan Brubaker
59aaac0cb5
Only insert container hosts into lxc_hosts
...
This change introduces a set of functions for dynamically populating the
lxc_hosts function on each inventory run. Any previous membership is
overwritten each time. The output is written to the
openstack_inventory.json still in order to provide parity with the
values provided to the ansible executable on stdout.
Previous code was fairly naive, inserting hosts into lxc_hosts when they
were marked as `is_metal`. This would add hosts, such as Ceph, that
were on metal but had no LXC containers.
A previous attempt at fixing this changed the _build_container_hosts
function to provide more information about the container build process,
then used that data in the _append_host_containers function to populate
the lxc_hosts group. However, this approach failed due to limited
information in each pass of the loop - if a node was an AIO, it might be
erroneously removed from the lxc_hosts group because a container wasn't
built on a given pass, and due to ordering, that pass may be the last
one of the loop.
To get around such problems, this code instead processes the inventory
in whole, after all containers have been made. Population into the group
is determined according to whether or not a given host's `physical_host`
hostvar matches the host name.
Change-Id: I9f3336f77cd0ef05fe1c7edeaf7defc6d93c3111
Closes-Bug: #1660996
2017-02-28 20:43:48 +00:00
..
2015-11-12 14:12:45 +00:00
2016-06-02 21:05:45 +00:00
2017-02-17 15:53:01 +00:00
2016-11-08 10:25:29 +00:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-11-10 13:16:37 +00:00
2016-11-18 13:36:17 +00:00
2016-07-27 10:59:57 +00:00
2016-07-30 06:49:41 +00:00
2016-08-31 10:46:18 +01:00
2016-08-18 01:39:10 +00:00
2016-11-11 09:13:47 +02:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-10-02 13:07:54 +08:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-09-16 14:03:48 +00:00
2016-11-18 13:36:17 +00:00
2016-10-22 15:03:18 +08:00
2016-09-16 14:03:48 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2017-01-24 14:02:34 +00:00
2016-10-27 12:39:47 -04:00
2016-09-07 17:04:03 +00:00
2016-10-07 17:31:39 +00:00
2016-05-20 13:01:26 +01:00
2016-05-23 09:48:56 +00:00
2016-06-02 21:05:45 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2016-03-08 17:15:19 +00:00
2016-09-16 14:03:48 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-11-02 06:38:52 -07:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-10-04 18:05:01 +00:00
2016-08-31 10:46:18 +01:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2016-06-02 21:05:45 +00:00
2016-02-04 16:04:08 +00:00
2016-07-27 10:59:57 +00:00
2017-01-19 08:47:10 -06:00
2016-05-13 10:44:54 +00:00
2016-07-27 10:59:57 +00:00
2016-03-03 12:25:18 +00:00
2016-11-18 13:36:17 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2016-06-02 21:05:45 +00:00
2016-12-14 14:20:37 +00:00
2016-07-27 10:59:57 +00:00
2016-03-08 15:40:02 -06:00
2016-08-20 21:02:01 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2017-02-03 14:32:19 +00:00
2016-09-16 14:03:48 +00:00
2016-11-18 13:36:17 +00:00
2016-12-13 12:21:21 -05:00
2016-08-31 10:46:18 +01:00
2016-03-08 17:08:05 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-11-18 13:36:17 +00:00
2016-05-12 10:40:29 +00:00
2016-06-02 21:05:45 +00:00
2016-04-06 18:21:26 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-06-02 21:05:45 +00:00
2016-08-22 20:31:29 +00:00
2016-08-22 18:30:15 +00:00
2016-06-02 21:05:45 +00:00
2017-01-27 01:56:10 +00:00
2016-06-02 21:05:45 +00:00
2016-03-17 12:09:36 -05:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-09-21 09:44:48 +00:00
2016-06-02 21:05:45 +00:00
2016-11-18 13:36:17 +00:00
2016-06-02 21:05:45 +00:00
2017-01-27 01:56:10 +00:00
2016-12-02 20:27:48 -06:00
2016-07-27 10:59:57 +00:00
2016-07-23 10:34:42 +01:00
2016-09-16 14:03:48 +00:00
2016-07-21 17:58:37 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-09-22 02:50:01 +00:00
2016-11-07 13:48:34 +00:00
2016-11-18 13:36:17 +00:00
2016-09-16 14:03:48 +00:00
2016-11-18 13:36:17 +00:00
2017-02-28 20:43:48 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2017-01-27 01:56:10 +00:00
2016-07-27 10:59:57 +00:00
2017-01-27 01:56:10 +00:00
2016-12-14 14:20:37 +00:00
2016-12-14 14:20:37 +00:00
2016-09-16 14:03:48 +00:00
2016-12-14 14:20:37 +00:00
2016-11-18 13:36:17 +00:00
2016-03-29 12:34:26 +00:00
2016-07-27 10:59:57 +00:00
2016-08-22 15:16:38 +01:00
2016-06-02 21:05:45 +00:00
2016-09-21 09:44:48 +00:00
2016-12-14 14:20:37 +00:00
2017-01-27 01:56:10 +00:00
2017-01-27 01:56:10 +00:00
2016-07-08 11:33:14 -07:00
2016-12-05 13:29:49 -05:00
2016-06-02 21:05:45 +00:00
2016-04-27 18:36:07 +00:00
2016-11-18 13:36:17 +00:00
2016-05-27 11:12:17 +00:00
2016-08-14 08:55:36 +00:00
2016-07-03 12:53:51 -05:00
2016-07-25 11:00:12 -05:00
2016-03-03 16:46:29 +00:00
2016-01-22 21:44:03 +00:00
2016-07-27 11:03:53 +00:00
2016-11-18 13:36:17 +00:00
2016-12-14 16:36:50 -06:00
2016-09-16 14:03:48 +00:00
2016-07-27 10:59:57 +00:00
2017-01-27 01:56:10 +00:00
2016-07-27 10:59:57 +00:00
2016-03-16 07:07:04 +00:00
2016-06-02 21:05:45 +00:00
2016-08-05 21:23:36 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-01 16:40:28 +00:00
2016-06-05 20:56:28 +00:00
2016-02-25 10:13:52 -05:00
2016-10-28 16:00:33 -04:00
2016-09-22 21:11:43 -04:00
2016-09-28 17:00:36 -04:00
2016-07-27 10:59:57 +00:00
2016-04-21 10:48:12 +00:00
2016-12-14 14:20:37 +00:00
2017-02-03 14:32:19 +00:00
2016-09-20 04:07:55 +00:00
2016-05-26 10:41:27 +00:00
2017-01-27 01:56:10 +00:00
2016-10-12 10:09:56 +00:00
2016-04-13 12:05:32 +00:00
2016-06-02 21:05:45 +00:00
2016-03-03 22:17:08 +00:00
2016-02-11 16:24:12 -06:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-02-01 17:13:35 +00:00
2016-09-16 14:03:48 +00:00
2016-07-27 10:59:57 +00:00
2016-03-01 15:42:09 -05:00
2016-12-14 14:20:37 +00:00
2016-09-16 02:31:50 +00:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-06-02 21:05:45 +00:00
2016-08-20 13:11:28 +00:00
2016-11-18 13:36:17 +00:00
2016-05-25 08:49:54 -05:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2017-01-27 01:56:10 +00:00
2016-06-27 16:46:38 -04:00
2016-08-05 12:46:58 +01:00
2016-07-27 10:59:57 +00:00
2016-04-27 18:34:21 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-08-12 18:17:35 +00:00
2016-08-31 10:46:18 +01:00
2016-05-10 20:15:58 +00:00
2016-01-26 13:08:57 +00:00
2017-01-27 01:56:10 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-08-24 22:48:58 +00:00
2016-06-18 05:29:09 +00:00
2016-06-02 21:05:45 +00:00
2016-03-26 23:02:00 +07:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-03-18 14:56:59 -05:00
2016-05-09 11:46:24 +00:00
2016-07-27 10:59:57 +00:00
2017-02-03 14:32:19 +00:00
2016-04-19 10:00:04 +00:00
2016-06-02 21:05:45 +00:00
2016-03-29 14:13:35 +01:00
2016-05-31 13:04:06 +01:00
2016-03-09 23:50:30 +00:00
2016-06-02 21:05:45 +00:00
2016-03-09 09:52:04 -06:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-03-12 05:27:09 +00:00
2016-03-03 11:20:17 +00:00
2016-02-10 10:57:31 -06:00
2016-12-14 14:20:37 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-12-14 14:20:37 +00:00
2016-07-27 10:59:57 +00:00
2017-01-27 01:56:10 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-09-27 15:05:51 +01:00
2016-07-27 10:59:57 +00:00
2017-02-03 14:32:19 +00:00
2016-11-18 13:36:17 +00:00
2016-09-21 09:44:48 +00:00
2016-12-14 14:20:37 +00:00
2016-12-14 14:20:37 +00:00
2016-12-14 14:20:37 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-07-27 10:59:57 +00:00
2016-11-18 13:36:17 +00:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-09-16 14:03:48 +00:00
2017-01-27 01:56:10 +00:00
2016-06-02 21:05:45 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2017-01-18 15:14:41 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-09-16 14:03:48 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-13 08:36:24 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-20 13:08:58 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-13 01:10:17 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-11-18 13:36:17 +00:00
2016-08-31 10:46:18 +01:00
2016-05-03 16:37:02 +00:00
2016-11-18 13:36:17 +00:00
2016-03-02 20:06:24 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-02-10 11:17:47 +00:00
2016-11-18 13:36:17 +00:00
2016-09-16 14:03:48 +00:00
2016-11-18 13:36:17 +00:00
2016-12-14 14:20:37 +00:00
2017-01-27 01:56:10 +00:00
2016-02-23 19:42:58 +00:00
2016-11-18 13:36:17 +00:00
2016-01-22 21:42:12 +00:00
2017-01-27 01:56:10 +00:00
2016-06-01 09:24:06 +00:00
2016-08-25 01:17:02 +00:00
2016-09-16 14:03:48 +00:00
2016-07-22 05:20:46 +00:00
2016-06-02 21:05:45 +00:00
2016-05-18 10:09:47 -04:00
2016-12-19 19:53:16 -05:00
2016-05-05 10:23:42 +00:00
2016-03-04 10:54:14 +11:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-11-01 10:48:33 -07:00
2016-06-16 06:48:50 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-11-18 13:36:17 +00:00
2016-08-31 10:46:18 +01:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-09-16 14:03:48 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-06-01 18:54:52 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2017-01-27 01:56:10 +00:00
2016-07-27 10:59:57 +00:00
2016-11-18 13:36:17 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-09-16 14:03:48 +00:00
2016-06-24 00:01:16 -05:00
2016-10-02 13:07:54 +08:00
2016-08-31 10:46:18 +01:00
2016-06-02 21:05:45 +00:00
2017-02-01 07:36:38 -06:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-08-31 10:46:18 +01:00
2016-06-02 21:05:45 +00:00
2016-05-24 17:32:34 -04:00
2016-06-02 21:05:45 +00:00
2016-09-21 09:44:48 +00:00
2016-12-14 14:20:37 +00:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-09-16 14:03:48 +00:00
2016-07-27 10:59:57 +00:00
2016-03-29 03:27:34 +00:00
2016-07-27 10:59:57 +00:00
2016-12-14 14:20:37 +00:00
2017-01-27 01:56:10 +00:00
2016-06-02 21:05:45 +00:00
2016-09-16 14:03:48 +00:00
2016-06-02 21:05:45 +00:00
2016-06-02 21:05:45 +00:00
2016-08-31 10:46:18 +01:00
2016-12-14 14:20:37 +00:00
2016-12-14 14:20:37 +00:00
2016-06-02 21:05:45 +00:00
2016-11-18 13:36:17 +00:00
2016-10-03 16:11:36 +00:00
2016-12-08 10:02:41 +00:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-08-26 10:11:22 -05:00
2016-06-02 21:05:45 +00:00
2016-07-27 10:59:57 +00:00
2016-06-02 21:05:45 +00:00
2016-02-09 09:42:42 -06:00
2016-07-27 10:59:57 +00:00
2016-08-31 10:46:18 +01:00
2016-07-27 10:59:57 +00:00
2016-07-27 10:59:57 +00:00
2016-06-18 09:04:49 +00:00
2016-01-25 10:27:14 +00:00
2016-08-31 10:46:18 +01:00
2016-12-14 14:20:37 +00:00
2016-12-14 14:20:37 +00:00
2016-11-18 13:36:17 +00:00
2016-08-31 10:46:18 +01:00