openstack-ansible/releasenotes/notes/group_branches-281e8d5fe2a54425.yaml
Nolan Brubaker 3fc41e29c1 Document and test group membership constraints
This patch tries to document and test the following invariant that
should apply for all groups in the environment:

    A group should have either child groups, or hosts, not both.

Tests are introduced to confirm and enforce this behavior, based on the
reported failing configuration.

A new function, _check_group_branches, is added which will detect a
failing scenario before code that uses it is executed. If a conflict is
found, a GroupConflict exception will be raised indicating why.

The _check_group_branches function was placed before the physical skel
loading because the problem occurs during that phase; placing this in
the _check_config_settings function would be checking after the error's
already been raised.

A note was also added to _parse_belongs_to to communicate it's implicit
dependence on state as checked by _check_group_branches.

Parent-Id: I1e746bfbda430076459d757039bc21f9df6a4a8a
Change-Id: I7830915fbdf9ed814846b69b1293729fb59ece79
Closes-Bug: #1646136
2016-12-05 13:29:49 -05:00

6 lines
201 B
YAML

---
fixes:
- Errors relating to groups containing both hosts and other groups as
children now raise a more descriptive error. See inventory documentation
for more details. Fixes bug #1646136