undercloud.conf requires a [ctplane-subnet] section

Bug #1751815 reported by James Slagle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Invalid
Medium
Unassigned
tripleo
Invalid
Medium
Ben Nemec

Bug Description

Since https://review.openstack.org/#/c/533365 landed,
you are required to have a [ctplane-subnet] section in your undercloud config, otherwise you can get a "None" value rendered in the hieradata file.

For example, a minimal config for undercloud.conf where you only overrode specific values used to work:

~~~~
[DEFAULT]
net_config_override = net-config-override.json
~~~~

Now, at a minimum, this is requred:

~~~~
[DEFAULT]
net_config_override = net-config-override.json

[ctlplane-subnet]
~~~~

Perhaps there is an option in oslo.cfg to make a section assumed to be present by default.

Changed in tripleo:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → rocky-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (master)

Fix proposed to branch: master
Review: https://review.openstack.org/548061

Changed in tripleo:
assignee: nobody → Ben Nemec (bnemec)
status: Confirmed → In Progress
Revision history for this message
Ben Nemec (bnemec) wrote :

I think instack-undercloud is incorrectly doing the config initialization in such a way that the dynamically registered opts are getting wiped out, but I'm going to leave this open against oslo.config too until we verify.

Changed in oslo.config:
importance: Undecided → Medium
Revision history for this message
Harald Jensås (harald-jensas) wrote :

Which value is rendered to None?

I tried to reproduce this with the undercloud.conf below, and I don't see the issue? Undercloud installs, and thinks look ok.

[stack@bug1751815 ~]$ rpm -q instack-undercloud
instack-undercloud-8.2.1-0.20180220181914.529796b.el7.centos.noarch

[stack@bug1751815 ~]$ cat undercloud.conf
[DEFAULT]

undercloud_hostname = bug1751815.lab.example.com

net_config_override = net-config-override.json

[stack@bug1751815 ~]$ cat net-config-override.json
"network_config": [
 {
  "type": "ovs_bridge",
  "name": "br-ctlplane",
  "ovs_extra": [
   "br-set-external-id br-ctlplane bridge-id br-ctlplane"
  ],
  "addresses": [
    {
      "ip_netmask": "{{PUBLIC_INTERFACE_IP}}"
    }
  ],
  "routes": {{SUBNETS_STATIC_ROUTES}},
  "mtu": {{LOCAL_MTU}}
}
]

[stack@bug1751815 ~]$ sudo grep -R none /etc/puppet/hieradata/
[stack@bug1751815 ~]$ sudo grep -R None /etc/puppet/hieradata/

5: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000
    link/ether f2:dc:59:34:0e:41 brd ff:ff:ff:ff:ff:ff
    inet 192.168.24.1/24 brd 192.168.24.255 scope global br-ctlplane
       valid_lft forever preferred_lft forever
    inet6 fe80::f0dc:59ff:fe34:e41/64 scope link
       valid_lft forever preferred_lft forever

[root@bug1751815 ~]# json_reformat < /etc/os-net-config/config.json
{
    "network_config": [
        {
            "addresses": [
                {
                    "ip_netmask": "192.168.24.1/24"
                }
            ],
            "mtu": 1500,
            "ovs_extra": [
                "br-set-external-id br-ctlplane bridge-id br-ctlplane"
            ],
            "routes": [

            ],
            "type": "ovs_bridge",
            "name": "br-ctlplane"
        }
    ]
}

#############################################################################
Undercloud install complete.

Revision history for this message
James Slagle (james-slagle) wrote :

i can't seem to reproduce this any longer, so marking invalid for now

Changed in tripleo:
status: In Progress → Invalid
Changed in oslo.config:
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to instack-undercloud (master)

Reviewed: https://review.openstack.org/548061
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=0497316fae160e5aaa59887bad1ad06a40f7088a
Submitter: Zuul
Branch: master

commit 0497316fae160e5aaa59887bad1ad06a40f7088a
Author: Ben Nemec <email address hidden>
Date: Mon Feb 26 16:17:53 2018 +0000

    Don't double load config

    This isn't necessary and will likely have some bad side effects
    because re-calling the conf object clears all previously registered
    opts, which defeats the purpose of the second call.

    Change-Id: I59bd78e85b3d55aea23b46809f4de678d394f66d
    Related-Bug: 1751815

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.