networks have empty string IP values when disabling networks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Undecided
|
Harald Jensås |
Bug Description
I'm seeing an issue with Rocky deployments where networks seem to be getting empty strings as IPs (when deploying with all networks disabled except ctlplane). I first noticed it when I see this entry in my overcloud /etc/hosts file:
#rocky
# HEAT_HOSTS_START - Do not edit manually within this section!
192.0.2.10 overcloud.
192.0.2.10 overcloud.
192.0.2.10 overcloud.
192.0.2.10 overcloud.
192.0.2.10 overcloud.
overcloud-
192.0.2.3 overcloud-
It can be seen that the overcloud-
Master seems to work fine and with the same network_data file produces:
# HEAT_HOSTS_START - Do not edit manually within this section!
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
#ROCKY
# HEAT_HOSTS_START - Do not edit manually within this section!
192.0.2.10 overcloud.
192.0.2.10 overcloud.
192.0.2.10 overcloud.
192.0.2.10 overcloud.
192.0.2.10 overcloud.
overcloud-
192.0.2.3 overcloud-
###NET HOST MAP
| CREATE_COMPLETE | 2018-12-
| NetHostMap | overcloud-
| attributes | {u'value': {u'ctlplane': {u'short': u'overcloud-
###NET IP MAP
| CREATE_COMPLETE | 2018-12-
| attributes | {u'net_ip_map': {u'tenant_uri': u'', u'storage_
###Looking at hieradata internal_api is empty:
net_ip_map.json: "internal_api": "",
net_ip_map.json: "internal_
net_ip_map.json: "internal_api_uri": "",
### network data:
(undercloud) [stack@undercloud ~]$ cat network_data.yaml
- enabled: false
ip_subnet: 11.0.0.0/24
name: Tenant
name_lower: tenant
vip: false
- allocation_pools:
- end: 192.168.37.199
start: 192.168.37.10
enabled: false
gateway_ip: 192.168.37.1
ip_subnet: 192.168.37.0/24
name: External
name_lower: external
vip: true
- enabled: false
ip_subnet: fd00:fd00:
name: InternalApi
name_lower: internal_api
vip: true
- enabled: false
ip_subnet: 12.0.0.0/24
name: Storage
name_lower: storage
vip: true
- allocation_pools:
- end: 172.16.3.250
start: 172.16.3.4
enabled: false
ip_subnet: 172.16.3.0/24
name: StorageMgmt
name_lower: storage_mgmt
vip: true
### MASTER
# HEAT_HOSTS_START - Do not edit manually within this section!
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.28 overcloud.
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
192.0.2.36 overcloud-
net_ip_map.json: "internal_api": "192.0.2.36",
net_ip_map.json: "internal_
net_ip_map.json: "internal_api_uri": "192.0.2.36",
(undercloud) [stack@undercloud ~]$ cat network_data.yaml
- allocation_pools:
- end: 192.168.37.199
start: 192.168.37.10
enabled: false
gateway_ip: 192.168.37.1
ip_subnet: 192.168.37.0/24
name: External
name_lower: external
vip: true
- enabled: false
ip_subnet: fd00:fd00:
name: InternalApi
name_lower: internal_api
vip: true
- enabled: false
ip_subnet: 12.0.0.0/24
name: Storage
name_lower: storage
vip: true
- enabled: false
ip_subnet: 11.0.0.0/24
name: Tenant
name_lower: tenant
vip: false
- allocation_pools:
- end: 172.16.3.250
start: 172.16.3.4
enabled: false
ip_subnet: 172.16.3.0/24
name: StorageMgmt
name_lower: storage_mgmt
vip: true
tags: | added: queens-backport-potential |
I think that's because we don't create resources for disabled networks any more and {{role. name}}HostnameR esolveNetwork maps to internal-api[1] that you've disabled in your network_data.yaml.
If you've to disable internal_api network, you've override ServiceNetMap to set {{role. name}}HostnameR esolveNetwork to ctlplane (the only one enabled).
[1] https:/ /github. com/openstack/ tripleo- heat-templates/ blob/master/ network/ service_ net_map. j2.yaml# L92
On master you're seeing the old behaviour as you're probably not using the latest.