Interface reconfiguration for data class VLAN interfaces fail

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

Bug Description

*+Brief Description+*

It was observed that interfaces of class data and type VLAN are failing to execute ifdown operations.

This error was introduced in https://review.opendev.org/c/starlingx/config/+/871391

*+Severity+*

<Minor: System/Feature is usable with minor issue>

*+Steps to Reproduce+*

Add a data class with type vlan interface
After lock/unlock modify the interface (e.g. MTU size)
In the next lock/unlock cycle the interface will be brought down by apply_network_config to update the MTU size and then bring up again

But since ifdown fails it will also fail the ifup operation.

*+Expected Behavior+*

Interface reconfiguration should work without errors

*+Actual Behavior+*

The interface fails to bringup again

*+Reproducibility+*

Reproducible

*+System Configuration+*

Any install that contains a data class VLAN interface that requires reconfiguration of a parameter

*+Last Pass+*

NA

*+Test Activity+*

Developer Testing

*+Workaround+*

None

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/+/902641

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

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

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

Reviewed: https://review.opendev.org/c/starlingx/config/+/902642
Committed: https://opendev.org/starlingx/config/commit/090c4e7e7b1e9a9c726b539d6a8cf472fe7b5e64
Submitter: "Zuul (22348)"
Branch: master

commit 090c4e7e7b1e9a9c726b539d6a8cf472fe7b5e64
Author: Andre Kantek <email address hidden>
Date: Mon Dec 4 15:19:15 2023 -0300

    add post-down op for vlan's data class interfaces

    Vlan's data class do not use the formats vlanNNN os ethX.NNN when
    applied in Linux. It creates with the name used in sysinv DB. To
    achieve that it uses a pre-up op with "ip link add ..."

    This change adds the reverse operation for ifdown, removing the device
    in the 'post-down' to make sure the link is removed at the end, in the
    same manner that happens for vlanNNN or ethX.NNN interfaces (via
    ifup/ifdown binaries from ifupdown package)

    Test Plan:
    [PASS] add a interface with class=data and type=vlan, then execute
           a) lock/unlock to create the interface in the node
           b) modify the MTU in the new interface
           c) lock/unlock to modify the interface in the node
           After that check interface creation in the kernel

    Closes-Bug: 2045658

    Change-Id: Ifc9ac45657fafbaa60366bc06decf0ccc6d53341
    Signed-off-by: Andre Kantek <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
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/+/902641
Committed: https://opendev.org/starlingx/stx-puppet/commit/6bd7c368ba69ea7cfa4da59966cba9e3a95d5b3c
Submitter: "Zuul (22348)"
Branch: master

commit 6bd7c368ba69ea7cfa4da59966cba9e3a95d5b3c
Author: Andre Kantek <email address hidden>
Date: Mon Dec 4 15:26:54 2023 -0300

    Filter correctly for VLAN in interfaces with class=data

    It was detected that vlan interfaces with class data were not
    correctly handled in the function is_vlan(). Since they do not use
    name format used in ifupdown (vlanNNN or ethX.NNN) the test need to
    include the pre-up operation that will create the device.

    This change prevents that a non-starlingX interface with a network
    configuration to be handled by apply_network_config. This script
    handles only interfaces managed by starlingX, if there are other
    interface configuration files in /etc/network/interfaces.d/ they need
    to be handled by the originator (another process, the system
    admin, others)

    Test Plan:
    [PASS] add a interface with class=data and type=vlan, then execute
           a) lock/unlock to create the interface in the node
           b) modify the MTU in the new interface
           c) lock/unlock to modify the interface in the node
           After that check interface creation in the kernel
    [PASS] Create a vlan configuration file in /etc/network/interfaces.d/
           that is not part of starlingX's managed interfaces. Check that
           does not attempt to bringup the interface

    Closes-Bug: 2045658

    Change-Id: Ic10d83cd140e6a8283de8733c172142a9288b8c5
    Signed-off-by: Andre Kantek <email address hidden>

Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
assignee: nobody → Andre Kantek (akantek)
tags: added: stx.9.0 stx.networking
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.