Bug 1298663 - os-net-config cannot handle IPv6 static routes
os-net-config cannot handle IPv6 static routes
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: os-net-config (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
unspecified Severity unspecified
: y3
: 7.0 (Kilo)
Assigned To: Dan Sneddon
yeylon@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-14 12:06 EST by Dan Sneddon
Modified: 2016-04-18 03:14 EDT (History)
7 users (show)

See Also:
Fixed In Version: os-net-config-0.1.4-7.el7ost
Doc Type: Bug Fix
Doc Text:
'os-net-config' only wrote IPv4 routes to /etc/sysconfig/network-scripts/route-*. However, IPv6 routes used /etc/sysconfig/network-scripts/route6-* files. This fix modifies 'os-net-config' to detect whether a route is IPv4 or IPv6 and write to the appropriate file. This allows 'os-net-config' to define IPv6 in the Linux configuration.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 11:49:52 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 268806 None None None 2016-01-22 13:33 EST

  None (edit)
Description Dan Sneddon 2016-01-14 12:06:02 EST
Description of problem:
os-net-config does not handle IPv6 static routes (they appear in the wrong file, so the route never gets installed).

Version-Release number of selected component (if applicable):
os-net-config.noarch               0.1.4-6.el7ost

How reproducible:
100%

Steps to Reproduce:
1. Configure a static IPv6 route in os-net-config template
2. Run os-net-config
3. 

Actual results:
The IPv6 route gets put into /etc/syssconfig/network-scripts/route-<iface>, but it never gets installed.

Expected results:
The IPv6 route should be installed.

Additional info:
os-net-config is only capable of writing to /etc/default/sysconfig/route-<iface>, while for IPv6 routes we need to write to /etc/sysconfig/network-scripts/route6-<iface>

I think we can use a basic regex to determine if we have an IPv6 or IPv4 route, and deal with it accordingly.
Comment 2 Dan Sneddon 2016-01-17 16:11:44 EST
Upstream patch submitted for os-net-config to support IPv6 routes: https://review.openstack.org/#/c/268806/
Comment 3 Dan Sneddon 2016-01-18 04:30:45 EST
Created downstream review for rhos-7.0-patches: https://code.engineering.redhat.com/gerrit/65764
Comment 5 Marius Cornea 2016-01-19 06:40:48 EST
Destination subnet is in IPv4 format:
[root@overcloud-controller-0 ~]# cat /etc/sysconfig/network-scripts/route6-vlan10 
0.0.0.0/0 via 2001:db8:fd00:1000:dead:beef:cafe:f00 dev vlan10

IPv6 format:
[root@overcloud-controller-0 ~]# cat /etc/sysconfig/network-scripts/route6-vlan10 
::/0 via 2001:db8:fd00:1000:dead:beef:cafe:f00 dev vlan10
Comment 6 Marius Cornea 2016-01-19 06:48:43 EST
I've just realized that I need to adjust the nic templates with the ipv6 formatted default route. Moving this back to ON_QA.
Comment 7 Marius Cornea 2016-01-19 06:57:40 EST
Looks good after updating the nic templates:

in controller.yaml:
-
  type: vlan
  vlan_id: {get_param: ExternalNetworkVlanID}
  addresses:
  -
    ip_netmask: {get_param: ExternalIpSubnet}
  routes:
    -
      ip_netmask: ::/0
      next_hop: {get_param: ExternalInterfaceDefaultRoute}

[root@overcloud-controller-0 heat-admin]# ip -6 r | grep default
default via 2001:db8:fd00:1000:dead:beef:cafe:f00 dev vlan10  metric 1024
Comment 9 errata-xmlrpc 2016-02-18 11:49:52 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/RHBA-2016-0264.html

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