Container Undercloud - always deploys with /24 network mask

Bug #1756224 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Harald Jensås

Bug Description

Deploying containerised undercloud using the following config:

[DEFAULT]
undercloud_hostname = container-undercloud.lab.example.com
local_ip = 172.20.0.200/26
network_gateway = 172.20.0.254
undercloud_nameservers = 172.20.0.254
undercloud_ntp_servers = 0.se.pool.ntp.org
overcloud_domain_name = localdomain
local_interface = eth1
local_mtu = 1500
network_cidr = 172.20.0.192/26
dhcp_start = 172.20.0.210
dhcp_end = 172.20.0.219
inspection_interface = br-ctlplane
inspection_iprange = 172.20.0.220,172.20.0.229
container_images_file = docker_registry.yaml
container_image_namespace = docker.io/tripleomaster

Results:
5: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000
    link/ether 52:54:00:7a:f6:c5 brd ff:ff:ff:ff:ff:ff
    inet 172.20.0.200/24 brd 172.20.0.255 scope global br-ctlplane
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe7a:f6c5/64 scope link
       valid_lft forever preferred_lft forever

[root@container-undercloud stack]# cat /etc/os-net-config/config.json | json_reformat
{
    "network_config": [
        {
            "addresses": [
                {
                    "ip_netmask": "172.20.0.200/24"
                }
            ],
            "dns_servers": [
                "172.20.0.254"
            ],
            "members": [
                {
                    "mtu": 1500,
                    "name": "eth1",
                    "primary": true,
                    "type": "interface"
                }
            ],
            "name": "br-ctlplane",
            "ovs_extra": [
                "br-set-external-id br-ctlplane bridge-id br-ctlplane"
            ],
            "type": "ovs_bridge",
            "use_dhcp": false
        }
    ]
}

Revision history for this message
Harald Jensås (harald-jensas) wrote :
Download full text (12.7 KiB)

TASK [Output for NetworkDeployment] *************************************************************************************************************************************************************
ok: [172.20.0.200] => {
    "failed_when_result": false,
    "msg": [
        {
            "stderr": [
                "[2018-03-16 03:13:04,434] (heat-config) [DEBUG] Running /usr/libexec/heat-config/hooks/script < /var/lib/heat-config/deployed/ee7bd4e5-ebfd-4e9c-901b-d073ce2a3038.json",
                "[2018-03-16 03:13:11,512] (heat-config) [INFO] {\"deploy_stdout\": \"No metadata IP found. Skipping.\\n\", \"deploy_stderr\": \"+ '[' -n '{\\\"network_config\\\": [{\\\"addresses\\\": [{\\\"ip_netmask\\\": \\\"172.20.0.200/24\\\"}], \\\"dns_servers\\\": [\\\"172.20.0.254\\\"], \\\"members\\\": [{\\\"mtu\\\": 1500, \\\"name\\\": \\\"interface_name\\\", \\\"primary\\\": true, \\\"type\\\": \\\"interface\\\"}], \\\"name\\\": \\\"br-ctlplane\\\", \\\"ovs_extra\\\": [\\\"br-set-external-id br-ctlplane bridge-id br-ctlplane\\\"], \\\"type\\\": \\\"ovs_bridge\\\", \\\"use_dhcp\\\": false}]}' ']'\\n+ '[' -z True ']'\\n+ mkdir -p /etc/os-net-config\\n+ echo '{\\\"network_config\\\": [{\\\"addresses\\\": [{\\\"ip_netmask\\\": \\\"172.20.0.200/24\\\"}], \\\"dns_servers\\\": [\\\"172.20.0.254\\\"], \\\"members\\\": [{\\\"mtu\\\": 1500, \\\"name\\\": \\\"interface_name\\\", \\\"primary\\\": true, \\\"type\\\": \\\"interface\\\"}], \\\"name\\\": \\\"br-ctlplane\\\", \\\"ovs_extra\\\": [\\\"br-set-external-id br-ctlplane bridge-id br-ctlplane\\\"], \\\"type\\\": \\\"ovs_bridge\\\", \\\"use_dhcp\\\": false}]}'\\n++ type -t network_config_hook\\n+ '[' '' = function ']'\\n+ sed -i s/bridge_name/br-ex/ /etc/os-net-config/config.json\\n+ sed -i s/interface_name/eth1/ /etc/os-net-config/config.json\\n+ set +e\\n+ os-net-config -c /etc/os-net-config/config.json -v --detailed-exit-codes\\n[2018/03/16 03:13:04 AM] [INFO] Using config file at: /etc/os-net-config/config.json\\n[2018/03/16 03:13:04 AM] [INFO] Ifcfg net config provider created.\\n[2018/03/16 03:13:04 AM] [INFO] Not using any mapping file.\\n[2018/03/16 03:13:05 AM] [INFO] Finding active nics\\n[2018/03/16 03:13:05 AM] [INFO] eth1 is an embedded active nic\\n[2018/03/16 03:13:05 AM] [INFO] eth0 is an embedded active nic\\n[2018/03/16 03:13:05 AM] [INFO] lo is not an active nic\\n[2018/03/16 03:13:05 AM] [INFO] No DPDK mapping available in path (/var/lib/os-net-config/dpdk_mapping.yaml)\\n[2018/03/16 03:13:05 AM] [INFO] Active nics are ['eth0', 'eth1']\\n[2018/03/16 03:13:05 AM] [INFO] nic2 mapped to: eth1\\n[2018/03/16 03:13:05 AM] [INFO] nic1 mapped to: eth0\\n[2018/03/16 03:13:05 AM] [INFO] adding bridge: br-ctlplane\\n[2018/03/16 03:13:05 AM] [INFO] adding interface: eth1\\n[2018/03/16 03:13:05 AM] [INFO] applying network configs...\\n[2018/03/16 03:13:05 AM] [INFO] running ifdown on interface: eth1\\n[2018/03/16 03:13:05 AM] [INFO] running ifdown on bridge: br-ctlplane\\n[2018/03/16 03:13:05 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route6-br-ctlplane\\n[2018/03/16 03:13:05 AM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-br-ctlplane\\n[2018/03/16 03:13:05 AM] [INFO] Writing co...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Changed in tripleo:
assignee: nobody → Harald Jensås (harald-jensas)
status: Triaged → In Progress
Changed in tripleo:
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/553701
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=8393d3f64db26bdab1ee8e9850b9ee5b0229acf2
Submitter: Zuul
Branch: master

commit 8393d3f64db26bdab1ee8e9850b9ee5b0229acf2
Author: Harald Jensås <email address hidden>
Date: Fri Mar 16 03:06:18 2018 +0100

    Fix Issue: Netmask on br-ctlplane is always /24

    This change fixes a bug that cause the subnet mask for
    the undercloud br-ctlplane ip to be 24 bits no matter
    what was defined in configuration (local_ip option).

    - In config: Don't drop the cidr prefix length
    - In deploy:
     - Get the prefix lenght, not the netmask.
     - Set the ControlPlaneSubnetCidr parameter.

    Additinally:
     - Fix the ExternalNetCidr parameter.
       (It takes a string value not a json.)
     - Use constant VIP_CIDR_PREFIX_LEN for vip ports.
       (No CIDR in the config, just the ip address.
       Result of computing with netaddr will always be 32.)
     - Dropped use of netaddr to get ip address for vip's.
       (These are validated in preflight.)

    Closes-Bug: #1756224
    Change-Id: I8a7d19c2d1f7d9315a3e1add18762c89eb7e5515

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.0.0

This issue was fixed in the openstack/python-tripleoclient 10.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.