Dynamic inventory clash between host group name and container group name

Bug #1623584 reported by Jesse Pretorius
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Confirmed
Low
Nolan Brubaker

Bug Description

When implementing an env.d entry such as:

component_skel:
  horizon:
    belongs_to:
      - horizon_all

container_skel:
  horizon_container:
    belongs_to:
      - horizon_containers
      - os-infra_containers
    contains:
      - horizon
    properties:
      service_name: horizon

physical_skel:
  horizon_containers:
    belongs_to:
    - all_containers
  horizon_hosts:
    belongs_to:
    - hosts

With a conf.d entry such as:

horizon_hosts:
  aio1:
    ip: 172.29.236.100

The resulting inventory.json output is like this:

    "horizon": {
        "children": [],
        "hosts": [
            "aio1_horizon_container-2b3d0f02"
        ]
    },
    "horizon_all": {
        "children": [
            "horizon"
        ],
        "hosts": [
            "aio1_horizon_container-2b3d0f02",
            "aio1"
        ]
    },
    "horizon_container": {
        "hosts": [
            "aio1_horizon_container-2b3d0f02"
        ]
    },
    "horizon_containers": {
        "children": [
            "aio1-host_containers"
        ],
        "hosts": []
    },
    "horizon_hosts": {
        "hosts": [
            "aio1"
        ]
    }

Whereas it should look like this:

    "horizon": {
        "children": [],
        "hosts": [
            "aio1_horizon_container-2b3d0f02"
        ]
    },
    "horizon_all": {
        "children": [
            "horizon"
        ],
        "hosts": []
    },
    "horizon_container": {
        "hosts": [
            "aio1_horizon_container-2b3d0f02"
        ]
    },
    "horizon_containers": {
        "children": [
            "aio1-host_containers"
        ],
        "hosts": []
    },
    "horizon_hosts": {
        "hosts": [
            "aio1"
        ]
    }

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

The workaround is to implement an env.d entry with different physical_skel names:

component_skel:
  horizon:
    belongs_to:
      - horizon_all

container_skel:
  horizon_container:
    belongs_to:
      - dashboard_containers
      - os-infra_containers
    contains:
      - horizon
    properties:
      service_name: horizon

physical_skel:
  dashboard_containers:
    belongs_to:
    - all_containers
  dashboard_hosts:
    belongs_to:
    - hosts

With a conf.d entry such as:

dashboard_hosts:
  aio1:
    ip: 172.29.236.100

The resulting inventory.json output is like this:

    "dashboard_all": {
        "hosts": [
            "aio1_horizon_container-237013bd",
            "aio1"
        ]
    },
    "dashboard_containers": {
        "children": [
            "aio1-host_containers"
        ],
        "hosts": []
    },
    "dashboard_hosts": {
        "hosts": [
            "aio1"
        ]
    },
    "horizon": {
        "children": [],
        "hosts": [
            "aio1_horizon_container-237013bd"
        ]
    },
    "horizon_all": {
        "children": [
            "horizon"
        ],
        "hosts": []
    },
    "horizon_container": {
        "hosts": [
            "aio1_horizon_container-237013bd"
        ]
    }

Changed in openstack-ansible:
status: New → Confirmed
Changed in openstack-ansible:
assignee: nobody → Nolan Brubaker (nolan-brubaker)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

Fix proposed to branch: master
Review: https://review.openstack.org/371140

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Marking as low as there is a suitable workaround for this.

Changed in openstack-ansible:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible (master)

Change abandoned by Nolan Brubaker (<email address hidden>) on branch: master
Review: https://review.openstack.org/371140

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.