quickstart pm_addr is wrong if you specify undercloud_local_ip parameter with netmask

Bug #1774232 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
wes hayutin

Bug Description

In tripleo-quickstart/roles/libvirt/setup/overcloud/templates/instackenv.json.j2 we have the following:
 "pm_user": "admin",
 "pm_addr": "{{ undercloud_local_ip|default(undercloud_network_cidr|nthhost(1)) }}",
 "pm_port": "{{ node.virtualbmc_port }}",

If you specify an undercloud_local_ip parameter without the netmask the undercloud installation will fail because it actually does require a netmask to be added. See:
https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L142
https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L1421

So if you specify an ip with netmask (say 192.168.24.1) the instackenv.json file will be broken:
      "name": "control-2",
              "pm_password": "password",
                  "pm_type": "ipmi",
                "pm_user": "admin",
        "pm_addr": "192.168.24.1/24",
        "pm_port": "6232",
            "mac": [
        "00:b0:d5:84:0f:11"
      ],

ipmitool will fail the call to 192.168.24.1/24 and hence ironic node registration will fail.

Tags: quickstart
summary: quickstart pm_addr is wrong if you specify undercloud_local_ip parameter
+ with netmask
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart (master)

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

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
Michele Baldessari (michele) wrote :

"So if you specify an ip with netmask (say 192.168.24.1) the instackenv.json"

should obviously have been

"So if you specify an ip with netmask (say 192.168.24.1/24) the instackenv.json"

Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
assignee: Michele Baldessari (michele) → wes hayutin (weshayutin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart (master)

Reviewed: https://review.openstack.org/571256
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart/commit/?id=977f91c683e00c262c9a7302f83edc29e4de07d3
Submitter: Zuul
Branch: master

commit 977f91c683e00c262c9a7302f83edc29e4de07d3
Author: Michele Baldessari <email address hidden>
Date: Wed May 30 18:55:20 2018 +0200

    Fix up pm_addr when undercloud_local_ip is specified

    In tripleo-quickstart/roles/libvirt/setup/overcloud/templates/instackenv.json.j2
    we have the following:

     "pm_addr": "{{ undercloud_local_ip|default(undercloud_network_cidr|nthhost(1)) }}",

    If you specify an undercloud_local_ip parameter without the netmask the
    undercloud installation will fail because it actually does require a
    netmask to be added. See:
    https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L142
    https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L1421

    So if you specify an ip with netmask (say 192.168.24.1) the instackenv.json file will be broken:

    "name": "control-2",
    "pm_password": "foo",
    "pm_type": "ipmi",
    "pm_user": "admin",
    "pm_addr": "192.168.24.1/24",
    "pm_port": "6232",
    "mac": [ "00:b0:d5:84:0f:11" ],

    ipmitool will fail the call to 192.168.24.1/24 (as it does not like the added netmask)
    and hence ironic node registration will fail.

    Let's just pick the first host for both undercloud_network_cidr and
    undercloud_local_ip, no matter what.

    Change-Id: I55afef6f7133b87c45b4dec41095c1fba65f3703
    Closes-Bug: #1774232

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

This issue was fixed in the openstack/tripleo-quickstart 2.1.1 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.