openstack overcloud ceph deploy --network-data could better handle an invalid network_data_v2.yaml file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
Low
|
John Fulton |
Bug Description
The error [1] was seen after running the following command with [2] as network_
openstack overcloud ceph deploy \
-y -o deployed_ceph.yaml \
[1]
~~~
Exception occured while running the command
Traceback (most recent call last):
File "/usr/local/
super(Command, self).run(
File "/usr/lib/
return super(Command, self).run(
File "/usr/lib/
return_code = self.take_
File "/usr/local/
parsed_
File "/usr/local/
subnet = _get_subnet(net, ip_subnet)
File "/usr/local/
return ','.join(
TypeError: sequence item 0: expected str instance, NoneType found
sequence item 0: expected str instance, NoneType found
~~~
[2]
~~~
- name: Storage
name_lower: storage
subnets:
storage_subnet:
enable_dhcp: true
ipv6_
ipv6_
- end: fd00:fd00:
start: fd00:fd00:
ipv6_ra_mode: dhcpv6-stateful
ipv6_subnet: fd00:fd00:
physical_
vlan: 30
vip: true
- name: StorageMgmt
name_lower: storage_mgmt
subnets:
storage_
enable_dhcp: true
ipv6_
ipv6_
- end: fd00:fd00:
start: fd00:fd00:
ipv6_ra_mode: dhcpv6-stateful
ipv6_subnet: fd00:fd00:
physical_
vlan: 40
vip: true
- name: InternalApi
name_lower: internal_api
subnets:
internal_
enable_dhcp: true
ipv6_
ipv6_
- end: fd00:fd00:
start: fd00:fd00:
ipv6_ra_mode: dhcpv6-stateful
ipv6_subnet: fd00:fd00:
physical_
vlan: 20
vip: true
- name: Tenant
name_lower: tenant
subnets:
tenant_subnet:
allocatio
- end: 172.17.2.149
start: 172.17.2.10
ip_subnet: 172.17.2.0/24
physical_
vlan: 50
- name: External
name_lower: external
vip: true
subnets:
external_
enable_dhcp: true
gateway_ipv6: 2620:52:0:13b8::fe
ipv6_
ipv6_
- end: 2620:52:
start: 2620:52:
ipv6_ra_mode: dhcpv6-stateful
ipv6_subnet: 2620:52:0:13b8::/64
physical_
vlan: 10
- name: Management
name_lower: management
subnets:
management_
enable_dhcp: true
gateway_ipv6: fd00:fd00:
ipv6_
ipv6_
- end: fd00:fd00:
start: fd00:fd00:
ipv6_ra_mode: dhcpv6-stateful
ipv6_subnet: fd00:fd00:
physical_
vlan: 60
~~~
summary: |
- openstack overcloud ceph deploy --network-data not parsing valid - network_data_v2.yaml file + openstack overcloud ceph deploy --network-data could better handle an + invalid network_data_v2.yaml file |
This is not a bug. Invalid input was provided.
The network_ data_v2. yaml is missing the 'ipv6' key which must be provided when using IPv6. As per Harald Jensås in a review of the code in question [1]
""" /opendev. org/openstack/ tripleo- ansible/ src/branch/ master/ tripleo_ ansible/ ansible_ plugins/ modules/ tripleo_ composable_ network. py#L437
When creating networks/subnets as IPv6 the 'ipv6' key for the network must be set to true, see:
https:/
i.e you can determine which version to use from the network-data provided. If ipv6 != true you pick the IPv4 keys, else pick the ipv6 keys. See: https:/ /opendev. org/openstack/ tripleo- ansible/ src/branch/ master/ tripleo_ ansible/ ansible_ plugins/ modules/ tripleo_ composable_ network. py#L270- L305
"""
I updated the network_ data_v2. yaml file to make it valid and confirmed I no longer get the error message which was reported.
[1] https:/ /review. opendev. org/c/openstack /python- tripleoclient/ +/817131/ 6/tripleoclient /v2/overcloud_ ceph.py# 103