Debian Networking: Package ifupdow and networking-routes are using distinct format (prefix-len or netmask) to create routes

Bug #1974229 reported by Andre Kantek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Andre Kantek

Bug Description

Brief Description
-----------------
It was detected a discrepancy between the format used on the scripts

/etc/network/if-up.d/20static-routes
requires routes with netmask (because is using the old "route" command)

/etc/init.d/networking-routes
is using prefix-len (using the new "ip route" command)

This is causing failure to create IPv6 routes as the script 20static-routes is having error to execute the route command:
root@controller-0:/var/home/sysadmin# route -6 add -net 3001:64:ff9b:: netmask ffff:ffff:ffff:ffff:: gw fd00::1 dev enp0s3
getaddrinfo: #net: -2
#net: Resolver Error 0 (no error)

And the script networking-routes also fail because it uses prefix-len and the routes file contains netmask

Severity
--------
<Major: System/Feature is usable but degraded>

Steps to Reproduce
------------------
Add IPv6 static routes with
system host-if-modify 1 enp0s9 -n test1 -c data --ipv6-mode static
system host-addr-add 1 test1 dead:beef::1 64
system host-route-add 1 test1 dead:aaaa::0 64 dead:beef::254
system host-route-add 1 test1 dead:bbbb::0 64 dead:beef::254
system host-route-add 1 test1 dead:cccc::0 64 dead:beef::254

Expected Behavior
------------------
routes are created after lock/unlock

Actual Behavior
----------------
Routes are not present

Reproducibility
---------------
Reproducible

System Configuration
--------------------
One node system, IPv6

Andre Kantek (akantek)
Changed in starlingx:
assignee: nobody → Andre Kantek (akantek)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/stx-puppet/+/842613

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to integ (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/integ/+/842614

Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.7.0 stx.debian stx.networking
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-puppet (master)

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/842613
Committed: https://opendev.org/starlingx/stx-puppet/commit/1d5ea136fc599d6f3a00c450e8527823b5ffe96c
Submitter: "Zuul (22348)"
Branch: master

commit 1d5ea136fc599d6f3a00c450e8527823b5ffe96c
Author: Andre Fernando Zanella Kantek <email address hidden>
Date: Thu May 19 16:37:31 2022 -0300

    Debian: accept netmask or prefix-length on routes file

    This change add support to accept netmask or prefix-length on the
    routes file. Puppet will still generate in netmask format

    Test Plan:
    PASS add IPv6 static routes with system host-route-add
    PASS add IPv4 static routes with system host-route-add
    PASS remove IPv6 static routes with system host-route-delete
    PASS remove IPv4 static routes with system host-route-delete

    Closes-Bug: 1974229

    Signed-off-by: Andre Fernando Zanella Kantek <email address hidden>
    Change-Id: Ibfb71c98c431370b338a51097dd93899d829f13e

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to integ (master)

Reviewed: https://review.opendev.org/c/starlingx/integ/+/842614
Committed: https://opendev.org/starlingx/integ/commit/ee4abe513bce5a44e9be140c1f3c8f3ed94ade0d
Submitter: "Zuul (22348)"
Branch: master

commit ee4abe513bce5a44e9be140c1f3c8f3ed94ade0d
Author: Andre Fernando Zanella Kantek <email address hidden>
Date: Thu May 19 10:54:56 2022 -0300

    Debian: accept netmask or prefix-length on /etc/network/routes file

    This change add support to accept netmask or prefix-length on the
    routes file, internally the commands will use prefix-len

    Change the command from "route" to "ip route" as this one have better
    support for IPv6 (route --inet6 add is failing on Debian).

    Also, on the validation functions, the address family is set to allow
    IPv6 route check.

    Test Plan:
    PASS add IPv6 static routes with system host-route-add
    PASS add IPv4 static routes with system host-route-add
    PASS remove IPv6 static routes with system host-route-delete
    PASS remove IPv4 static routes with system host-route-delete

    Closes-Bug: 1974229

    Signed-off-by: Andre Fernando Zanella Kantek <email address hidden>
    Change-Id: I33d249892b717f4e808a995ced455c4c9ac763f2

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tools (master)

Reviewed: https://review.opendev.org/c/starlingx/tools/+/846494
Committed: https://opendev.org/starlingx/tools/commit/5152a9e33357ae52b43c9626ec3252ed43ff5572
Submitter: "Zuul (22348)"
Branch: master

commit 5152a9e33357ae52b43c9626ec3252ed43ff5572
Author: Scott Little <email address hidden>
Date: Fri Jun 17 12:39:59 2022 -0400

    ifupdown-extra packaging fix

    ifupdown-extra was recently added to the set of packages that StarlingX
    compiles. Previously StarlingX was using a pre-compiled package provided
    by upstream. THe update that introduced ifupdown-extra was...

    https://review.opendev.org/c/starlingx/integ/+/842614

    When the change was made, the packaging changes defining the iso content
    were not updated. As a result, the upstream version of ifupdown-extra
    continued to be used.

    This update the the iso packaging to include the locally compiled
    ifupdown-extra, rather than the upstream version.

    Testing:

    Build and install the iso.
    Verify that the StarlingX modified version is present by looking for
    the new function 'get_prefix_length'. e.g.

       cat /usr/etc/network/if-up.d/20static-routes | grep get_prefix_length

    Closes-Bug: 1974229
    Signed-off-by: Scott Little <email address hidden>
    Change-Id: Iab3c83ae8373923cb0358c7324c9e13542f50327

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.