spine leaf undercloud installation missing ctlplane_ip exception error in master

Bug #1913551 reported by Michele Baldessari
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Harald Jensås

Bug Description

Since the change "131ff2b4b831 - (2021-01-19 09:17:01 +0100) Re-factor inventory.py use setdefault pervasively" https://review.opendev.org/c/openstack/tripleo-common/+/766109 undercloud.conf
fails to install with the following error:

PLAY [Load global variables] *************************************************** ^[[0;32m2021-01-23 20:57:15.255413 | 5254005e-d6c8-3f49-eab0-00000000000e | OK | include_vars | undercloud^[[0m ^[[1;30m2021-01-23 20:57:15.256753 | 5254005e-d6c8-3f49-eab0-00000000000e | TIMING | include_vars | undercloud | 0:00:02.635333 | 0.04s^[[0m ^[[0;32m2021-01-23 20:57:15.267562 | 5254005e-d6c8-3f49-eab0-00000000000e | OK | include_vars | undercloud-0^[[0m ^[[1;30m2021-01-23 20:57:15.268023 | 5254005e-d6c8-3f49-eab0-00000000000e | TIMING | include_vars | undercloud-0 | 0:00:02.646619 | 0.03s^[[0m ^M PLAY [Render all_nodes data as group_vars for overcloud] *********************** 2021-01-23 20:57:15.301062 | 5254005e-d6c8-3f49-eab0-000000000011 | TASK | Render all_nodes data as group_vars for overcloud Process Process-5:2:^M Traceback (most recent call last):^M File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap^M self.run()^M File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run^M self._target(*self._args, **self._kwargs)^M File "/usr/share/ansible/plugins/action/tripleo_all_nodes_data.py", line 84, in compute_service^M service_hosts))^M File "/usr/share/ansible/plugins/action/tripleo_all_nodes_data.py", line 83, in ^M map(lambda host: self.h_vars[host][service_network + '_ip'],^M File "/usr/lib/python3.6/site-packages/ansible/vars/hostvars.py", line 129, in __getitem__^M foo = templar.template(self._vars[var], fail_on_undefined=False, static_vars=STATIC_VARS)^M KeyError: 'ctlplane_ip'^M

Reverting that change makes the installation work correctly.

My undercloud.conf is
[DEFAULT]
undercloud_ntp_servers=ntp.corp
overcloud_domain_name = bgp.ftw
container_images_file=/home/stack/containers-prepare-parameter.yaml
undercloud_timezone = UTC
undercloud_hostname = undercloud-0.bgp.ftw
undercloud_nameservers = 10.19.42.41,10.11.5.19

local_interface = eth2
local_ip = 192.168.4.2/24
undercloud_public_host = 192.168.4.200
undercloud_admin_host = 192.168.4.201
enable_routed_networks = true
subnets=r1,r2,r3,r4
local_subnet=r4

[r1]
cidr = 192.168.1.0/24
dhcp_start = 192.168.1.160
dhcp_end = 192.168.1.170
inspection_iprange = 192.168.1.171,192.168.1.175
gateway = 192.168.1.1
masquerade = False
[r2]
cidr = 192.168.2.0/24
dhcp_start = 192.168.2.160
dhcp_end = 192.168.2.170
inspection_iprange = 192.168.2.171,192.168.2.175
gateway = 192.168.2.1
masquerade = False
[r3]
cidr = 192.168.3.0/24
dhcp_start = 192.168.3.160
dhcp_end = 192.168.3.170
inspection_iprange = 192.168.3.171,192.168.3.175
gateway = 192.168.3.1
masquerade = False
[r4]
cidr = 192.168.4.0/24
dhcp_start = 192.168.4.160
dhcp_end = 192.168.4.170
inspection_iprange = 192.168.4.171,192.168.4.175
gateway = 192.168.4.1
masquerade = False

description: updated
summary: - spine leaf undercloud installation missint ctlplane_ip exception error
+ spine leaf undercloud installation missing ctlplane_ip exception error
in master
description: updated
Changed in tripleo:
status: New → Triaged
importance: Medium → High
milestone: none → wallaby-2
tags: added: edge networking
Revision history for this message
Harald Jensås (harald-jensas) wrote :

I reproduced this and did some debugging.
Prior to the patch the 'Undercloud' entry added at the beginning of the list() function was actually completely overwritten when a role names 'Undercloud' is present in the heat stack.

After re-factoring we add to it instead, and end up with two hosts in the "Undercloud" group.

{'Undercloud': {
    'hosts': {
       'undercloud': {},
       'undercloud-0': { ...

We probably need to special case for the 'Undercloud' role in the _inventory_from_heat_outputs() method to ensure it overwrites instead of appending.

Changed in tripleo:
assignee: nobody → Harald Jensås (harald-jensas)
Revision history for this message
Harald Jensås (harald-jensas) wrote :
Changed in tripleo:
importance: High → Critical
Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Changed in tripleo:
milestone: wallaby-3 → wallaby-rc1
Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 15.0.0

This issue was fixed in the openstack/tripleo-common 15.0.0 release.

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.