Bug 1478378 - Usage of abbreviated CIDR cause keepalived to segfault [NEEDINFO]
Usage of abbreviated CIDR cause keepalived to segfault
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron (Show other bugs)
8.0 (Liberty)
Unspecified Unspecified
medium Severity medium
: zstream
: 8.0 (Liberty)
Assigned To: Assaf Muller
Toni Freger
: Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-04 09:15 EDT by David Hill
Modified: 2017-09-12 13:19 EDT (History)
7 users (show)

See Also:
Fixed In Version: openstack-neutron-7.2.0-16.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-12 13:19:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ccollett: needinfo? (amuller)


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1490885 None None None 2017-08-04 10:05 EDT
Launchpad 1707791 None None None 2017-08-04 09:52 EDT
OpenStack gerrit 219187 None None None 2017-08-04 10:05 EDT

  None (edit)
Description David Hill 2017-08-04 09:15:44 EDT
Description of problem:
Usage of abbreviated CIDR cause keepalived to segfault upon startup.  This is fixed in later releases of OpenStack but not in RHOSP 8.  Here is a quick patch designed by the customer that fixes it in RHOSP 8.

--- /usr/lib/python2.7/site-packages/neutron/api/v2/attributes.py.rpm	2016-09-23 14:02:40.000000000 +0000
+++ /usr/lib/python2.7/site-packages/neutron/api/v2/attributes.py	2017-08-01 18:03:59.864409739 +0000
@@ -318,11 +318,11 @@
 
 def _validate_subnet(data, valid_values=None):
     msg = None
     try:
         net = netaddr.IPNetwork(_validate_no_whitespace(data))
-        if '/' not in data:
+        if '/' not in data or (net.version == 4 and str(net) != data):
             msg = _("'%(data)s' isn't a recognized IP subnet cidr,"
                     " '%(cidr)s' is recommended") % {"data": data,
                                                      "cidr": net.cidr}
         else:
             return


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a router using abbreviated CIDR such as 10/8 or 172.16/12
2.
3.

Actual results:
keepalived will segfault but also affects non-HA routers

Expected results:
Should not segfaults the underlying services

Additional info:
This is fixed in later release of openstack.
Comment 5 errata-xmlrpc 2017-09-12 13:19:28 EDT
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://access.redhat.com/errata/RHBA-2017:2690

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