Bug 1266509 - local_ip gets set as /32 address on undercloud when no subnet mask is provided
Summary: local_ip gets set as /32 address on undercloud when no subnet mask is provided
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 10.0 (Newton)
Assignee: Dmitry Tantsur
QA Contact: Arik Chernetsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-25 12:53 UTC by Marius Cornea
Modified: 2016-12-14 15:16 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, instack-undercloud did not verify that a subnet mask was provided for the `local_ip` parameter, and incorrectly used a /32 mask. Consequently, networking would not work correctly on the undercloud in this case (for example, introspection would not work). With this update, instack-undercloud now validates that a correct subnet mask has been provided.
Clone Of:
Environment:
Last Closed: 2016-12-14 15:16:25 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC

Description Marius Cornea 2015-09-25 12:53:30 UTC
Description of problem:
If no subnet mask is provider for the local_ip in undercloud.conf it gets set as /32 address on the br-ctlplane interface. 

Version-Release number of selected component (if applicable):
instack-undercloud-2.1.2-26.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. local_ip = 192.0.2.1 in undercloud.conf
2. Run openstack undercloud install

Actual results:
[stack@instack ~]$ ip a s dev br-ctlplane
9: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 00:5a:d5:ca:6e:f2 brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.1/32 brd 192.0.2.1 scope global br-ctlplane
       valid_lft forever preferred_lft forever
    inet6 fe80::25a:d5ff:feca:6ef2/64 scope link 
       valid_lft forever preferred_lft forever


Expected results:
the install script should fail if no subnet mask is provided or set the subnet mask for local_ip in a separate variable

Comment 2 James Slagle 2015-09-25 13:35:16 UTC
we should probably fail if local_ip is not in CIDR notation

Comment 5 Mike Burns 2016-04-07 20:50:54 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 7 Dmitry Tantsur 2016-10-14 15:28:51 UTC
I think we should fail in this case. This has hit me several times already.

Comment 9 Dmitry Tantsur 2016-10-20 12:28:15 UTC
This was fixed in Newton apparently.

Comment 11 mkovacik 2016-10-20 13:16:57 UTC
# this was fixed indeed

stack@undercloud ~]$ sudo ip a s dev br-ctlplane
7: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000
    link/ether 00:5c:80:70:b2:81 brd ff:ff:ff:ff:ff:ff
    inet 192.0.2.1/24 brd 192.0.2.255 scope global br-ctlplane
       valid_lft forever preferred_lft forever
    inet 192.0.2.3/32 scope global br-ctlplane
       valid_lft forever preferred_lft forever
    inet 192.0.2.2/32 scope global br-ctlplane
       valid_lft forever preferred_lft forever
    inet6 fe80::25c:80ff:fe70:b281/64 scope link
       valid_lft forever preferred_lft forever
[stack@undercloud ~]$ grep local_ip undercloud.conf
local_ip = 192.0.2.1/24
# instances. This should match the local_ip above when using
[stack@undercloud ~]$ vi undercloud.conf
[stack@undercloud ~]$ grep local_ip undercloud.conf
local_ip = 192.0.2.1
# instances. This should match the local_ip above when using
[stack@undercloud ~]$ openstack undercloud install
Logging to /home/stack/.instack/install-undercloud.log
Checking for a FQDN hostname...
Static hostname detected as undercloud.localdomain
Transient hostname detected as undercloud.localdomain
Undercloud configuration validation failed: local_ip "192.0.2.1" not valid: "Invalid netmask" Value must be in CIDR format.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1179, in install
    _validate_configuration()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 633, in _validate_configuration
    _validate_network()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 606, in _validate_network
    validator.validate_config(params, error_handler)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/validator.py", line 32, in validate_config
    _validate_value_formats(local_params, error_callback)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/validator.py", line 54, in _validate_value_formats
    error_callback(message)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 602, in error_handler
    raise validator.FailedValidation(message)
instack_undercloud.validator.FailedValidation: local_ip "192.0.2.1" not valid: "Invalid netmask" Value must be in CIDR format.
Command 'instack-install-undercloud' returned non-zero exit status 1
[stack@undercloud ~]$ rpm -q openstack-nova-common
openstack-nova-common-14.0.1-2.el7ost.noarch
[stack@undercloud ~]$

Comment 14 errata-xmlrpc 2016-12-14 15:16:25 UTC
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://rhn.redhat.com/errata/RHEA-2016-2948.html


Note You need to log in before you can comment on or make changes to this bug.