+++ This bug was initially created as a clone of Bug #1689384 +++ Description of problem: Undercloud install failed when there are no `ctlplane-subnet` subnet defined in undercloud.conf. python-tripleoclient - does _not_ put `ctlplane-subnet` into the parameters. It happened when install undercloud with custom undercloud.conf for Spine-Leaf network topology. $ cat undercloud.conf [DEFAULT] local_interface = eth0 local_ip = 192.168.24.1/24 undercloud_ntp_servers=clock.redhat.com hieradata_override = /home/stack/hiera_override.yaml container_images_file=/home/stack/containers-prepare-parameter.yaml container_insecure_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888 undercloud_service_certificate = /etc/pki/instack-certs/undercloud.pem enable_routed_networks = true subnets = leaf0,leaf1,leaf2 local_subnet = leaf0 [leaf0] cidr = 192.168.24.0/24 dhcp_start = 192.168.24.10 dhcp_end = 192.168.24.90 inspection_iprange = 192.168.24.100,192.168.24.190 gateway = 192.168.24.254 masquerade = False [leaf1] cidr = 192.168.34.0/24 dhcp_start = 192.168.34.10 dhcp_end = 192.168.34.90 inspection_iprange = 192.168.34.100,192.168.34.190 gateway = 192.168.34.254 masquerade = False [leaf2] cidr = 192.168.44.0/24 dhcp_start = 192.168.44.10 dhcp_end = 192.168.44.90 inspection_iprange = 192.168.44.100,192.168.44.190 gateway = 192.168.44.254 masquerade = False $ cat tripleo-config-generated-env-files/undercloud_parameters.yaml parameter_defaults: { .. SNIP .. } ControlPlaneStaticRoutes: - ip_netmask: 192.168.34.0/24 next_hop: 192.168.24.254 - ip_netmask: 192.168.44.0/24 next_hop: 192.168.24.254 { .. SNIP .. } IronicInspectorInterface: br-ctlplane { .. SNIP .. } IronicInspectorSubnets: - gateway: 192.168.24.254 ip_range: 192.168.24.100,192.168.24.190 netmask: 255.255.255.0 tag: leaf0 - gateway: 192.168.34.254 ip_range: 192.168.34.100,192.168.34.190 netmask: 255.255.255.0 tag: leaf1 - gateway: 192.168.44.254 ip_range: 192.168.44.100,192.168.44.190 netmask: 255.255.255.0 tag: leaf2 { .. SNIP .. } MasqueradeNetworks: {} { .. SNIP .. } UndercloudCtlplaneLocalSubnet: leaf0 UndercloudCtlplaneSubnets: leaf0: AllocationPools: - end: 192.168.24.90 start: 192.168.24.10 HostRoutes: [] NetworkCidr: 192.168.24.0/24 NetworkGateway: 192.168.24.254 leaf1: AllocationPools: - end: 192.168.34.90 start: 192.168.34.10 HostRoutes: [] NetworkCidr: 192.168.34.0/24 NetworkGateway: 192.168.34.254 leaf2: AllocationPools: - end: 192.168.44.90 start: 192.168.44.10 HostRoutes: [] NetworkCidr: 192.168.44.0/24 NetworkGateway: 192.168.44.254 UndercloudEnableRoutedNetworks: true Yet, when https://github.com/openstack/tripleo-heat-templates/blob/master/extraconfig/post_deploy/undercloud_post.yaml#L248 passes `UndercloudCtlplaneSubnets` to the script setting up the networks there is a `ctlplane-subnet`. config={\"cloud_name\": \"undercloud\", \"enable_routed_networks\": true, \"home_dir\": \"/home/stack\", \"local_ip\": \"192.168.24.3\", \"local_subnet\": \"leaf0\", \"mtu\": 1500, \"nameservers\": [], \"physical_network\": \"ctlplane\", \"subnets\": {\"ctlplane-subnet\": {\"DhcpRangeEnd\": \"192.168.24.24\", \"DhcpRangeStart\": \"192.168.24.5\", \"NetworkCidr\": \"192.168.24.0/24\", \"NetworkGateway\": \"192.168.24.1\"}, \"leaf0\": {\"AllocationPools\": [{\"end\": \"192.168.24.90\", \"start\": \"192.168.24.10\"}], \"HostRoutes\": [], \"NetworkCidr\": \"192.168.24.0/24\", \"NetworkGateway\": \"192.168.24.254\"}, \"leaf1\": {\"AllocationPools\": [{\"end\": \"192.168.34.90\", \"start\": \"192.168.34.10\"}], \"HostRoutes\": [], \"NetworkCidr\": \"192.168.34.0/24\", \"NetworkGateway\": \"192.168.34.254\"}, \"leaf2\": {\"AllocationPools\": [{\"end\": \"192.168.44.90\", \"start\": \"192.168.44.10\"}], \"HostRoutes\": [], \"NetworkCidr\": \"192.168.44.0/24\", \"NetworkGateway\": \"192.168.44.254\"}}} Version-Release number of selected component (if applicable): 2019-03-15 15:42:00.832 14286 WARNING tripleoclient.v1.undercloud.InstallUndercloud [ ] Running: sudo --preserve-env \ openstack tripleo deploy \ --standalone \ --standalone-role Undercloud \ --stack undercloud \ --local-domain=localdomain \ --local-ip=192.168.24.1/24 \ --templates=/usr/share/openstack-tripleo-heat-templates/ \ --networks-file=network_data_undercloud.yaml \ ## The following file includes the values: ## https://github.com/openstack/tripleo-heat-templates/blob/master/environments/undercloud.yaml#L154-L159 --heat-native -e /usr/share/openstack-tripleo-heat-templates/environments/undercloud.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/use-dns-for-vips.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/podman.yaml \ -e /home/stack/containers-prepare-parameter.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/ironic.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/ironic-inspector.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/mistral.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/zaqar-swift-backend.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/tripleo-ui.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/tempest.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/undercloud-haproxy.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/undercloud-keepalived.yaml \ --public-virtual-ip 192.168.24.2 \ --control-virtual-ip 192.168.24.3 \ -e /usr/share/openstack-tripleo-heat-templates/environments/ssl/tls-endpoints-public-ip.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/undercloud-haproxy.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/services/undercloud-keepalived.yaml \ --deployment-user stack \ --output-dir=/home/stack \ --cleanup \ ## The following file should override what's in environments/undercloud.yaml#L154-L159 # # Yet it looks like it's somehow merged? # -e /home/stack/tripleo-config-generated-env-files/undercloud_parameters.yaml \ --hieradata-override=/home/stack/hiera_override.yaml \ -e /usr/share/openstack-tripleo-heat-templates/environments/tripleo-validations.yaml \ --log-file=install-undercloud.log \ -e /usr/share/openstack-tripleo-heat-templates/undercloud-stack-vstate-dropin.yaml How reproducible: 100% Steps to Reproduce: 1. Edit default undercloud.conf with Spine-Leaf network topoly as https://gitlab.cee.redhat.com/yobshans/rhos-qe-edge-stuff/raw/master/osp15/undercloud/undercloud.conf 2. Start undercloud install Actual results: Deployment Failed! More details http://pastebin.test.redhat.com/738312 Expected results: No failure. Additional info: --- Additional comment from Harald Jensås on 2019-03-19 00:11:53 UTC --- The patch actually implements the workaround. tbh, I'm surprised, why does these dicts are merge? The default merge strategy should be "overwrite" according to heat docs[1]. I don't see anywhere where we override any environment's merge strategy. [1] https://docs.openstack.org/heat/latest/template_guide/environment.html#environment-merging
The scenario verified on OSP 14 puddle 2019-06-10.3 Undercloud succesfully installed with custom undercloud.conf without ctlplane-network defined in it. ansible-role-tripleo-modify-image-1.0.1-0.20190419231031.f1dfdc6.el7ost.noarch openstack-tripleo-validations-9.3.2-0.20190420045626.361061f.el7ost.noarch python2-tripleo-common-9.5.0-5.el7ost.noarch openstack-tripleo-common-containers-9.5.0-5.el7ost.noarch openstack-tripleo-common-9.5.0-5.el7ost.noarch python-tripleoclient-heat-installer-10.6.2-0.20190425150604.ba03c5e.el7ost.noarch puppet-tripleo-9.4.1-0.20190508182401.89735a1.el7ost.noarch openstack-tripleo-heat-templates-9.3.1-0.20190513171729.9995be9.el7ost.noarch python-tripleoclient-10.6.2-0.20190425150604.ba03c5e.el7ost.noarch openstack-tripleo-puppet-elements-9.0.1-3.el7ost.noarch openstack-tripleo-image-elements-9.0.1-0.20181102144447.9f1c800.el7ost.noarch ansible-tripleo-ipsec-9.1.0-2.el7ost.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:1672