Dynamic inventory clash between host group name and container group name
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_
belongs_to:
- horizon_containers
- os-infra_containers
contains:
- horizon
properties:
service_name: horizon
physical_skel:
horizon_
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": [
]
},
"horizon_all": {
"children": [
],
"hosts": [
"aio1"
]
},
"horizon_
"hosts": [
]
},
"horizon_
"children": [
],
"hosts": []
},
"horizon_
"hosts": [
"aio1"
]
}
Whereas it should look like this:
"horizon": {
"children": [],
"hosts": [
]
},
"horizon_all": {
"children": [
],
"hosts": []
},
"horizon_
"hosts": [
]
},
"horizon_
"children": [
],
"hosts": []
},
"horizon_
"hosts": [
"aio1"
]
}
Changed in openstack-ansible: | |
status: | New → Confirmed |
Changed in openstack-ansible: | |
assignee: | nobody → Nolan Brubaker (nolan-brubaker) |
The workaround is to implement an env.d entry with different physical_skel names:
component_skel:
horizon:
belongs_to:
- horizon_all
container_skel: container: containers
horizon_
belongs_to:
- dashboard_
- os-infra_containers
contains:
- horizon
properties:
service_name: horizon
physical_skel: containers:
dashboard_
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": {
"aio1_ horizon_ container- 237013bd" , containers" : {
"aio1- host_containers " hosts": {
"aio1_ horizon_ container- 237013bd"
"horizon" container" : {
"aio1_ horizon_ container- 237013bd"
"hosts": [
"aio1"
]
},
"dashboard_
"children": [
],
"hosts": []
},
"dashboard_
"hosts": [
"aio1"
]
},
"horizon": {
"children": [],
"hosts": [
]
},
"horizon_all": {
"children": [
],
"hosts": []
},
"horizon_
"hosts": [
]
}