Bug 1298663 - os-net-config cannot handle IPv6 static routes
Summary: os-net-config cannot handle IPv6 static routes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: os-net-config
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: y3
: 7.0 (Kilo)
Assignee: Dan Sneddon
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-14 17:06 UTC by Dan Sneddon
Modified: 2016-04-18 07:14 UTC (History)
7 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-02-18 16:49:52 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
OpenStack gerrit 268806 None MERGED Add ability to set IPv6 routes in os-net-config templates 2020-06-11 17:08:03 UTC
Red Hat Product Errata RHBA-2016:0264 normal SHIPPED_LIVE Red Hat Enterprise Linux OSP 7 director Bug Fix Advisory 2016-02-18 21:41:29 UTC

Description Dan Sneddon 2016-01-14 17:06:02 UTC
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 21:11:44 UTC
Upstream patch submitted for os-net-config to support IPv6 routes: https://review.openstack.org/#/c/268806/

Comment 3 Dan Sneddon 2016-01-18 09:30:45 UTC
Created downstream review for rhos-7.0-patches: https://code.engineering.redhat.com/gerrit/65764

Comment 5 Marius Cornea 2016-01-19 11:40:48 UTC
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 11:48:43 UTC
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 11:57:40 UTC
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 16:49:52 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/RHBA-2016-0264.html


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