Bug 1478378 - Usage of abbreviated CIDR cause keepalived to segfault
Summary: Usage of abbreviated CIDR cause keepalived to segfault
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: zstream
: 8.0 (Liberty)
Assignee: Assaf Muller
QA Contact: Toni Freger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-04 13:15 UTC by David Hill
Modified: 2020-12-14 09:21 UTC (History)
8 users (show)

Fixed In Version: openstack-neutron-7.2.0-16.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-12 17:19:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1490885 0 None None None 2017-08-04 14:05:16 UTC
Launchpad 1707791 0 None None None 2017-08-04 13:52:58 UTC
OpenStack gerrit 219187 0 None None None 2017-08-04 14:05:34 UTC
Red Hat Product Errata RHBA-2017:2690 0 normal SHIPPED_LIVE openstack-neutron bug fix advisory 2017-09-12 21:19:00 UTC

Description David Hill 2017-08-04 13:15:44 UTC
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 17:19:28 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://access.redhat.com/errata/RHBA-2017:2690


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