Bug 1266509 - local_ip gets set as /32 address on undercloud when no subnet mask is provided
local_ip gets set as /32 address on undercloud when no subnet mask is provided
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
high Severity high
: rc
: 10.0 (Newton)
Assigned To: Dmitry Tantsur
Arik Chernetsky
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-25 08:53 EDT by Marius Cornea
Modified: 2016-12-14 10:16 EST (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-14 10:16:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marius Cornea 2015-09-25 08:53:30 EDT
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 09:35:16 EDT
we should probably fail if local_ip is not in CIDR notation
Comment 5 Mike Burns 2016-04-07 16:50:54 EDT
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.
Comment 7 Dmitry Tantsur 2016-10-14 11:28:51 EDT
I think we should fail in this case. This has hit me several times already.
Comment 9 Dmitry Tantsur 2016-10-20 08:28:15 EDT
This was fixed in Newton apparently.
Comment 11 mkovacik 2016-10-20 09:16:57 EDT
# 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 10:16:25 EST
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.