Lucas Ratusznei Fonseca 64d4d7e522 Fix long labels cause ifup/ifdown commands to fail
When labels with more than 15 characters are used for addresses, the
ifup/ifdown commands fail due to the hard limit on label length imposed
by the linux kernel. The label for addresses in starlingx is composed by
the interface name followed by a colon and a string in the format
<network_id>-<address_id>, which can surpass the 15 character limit if
the interface name is sufficiently long.
For example: enp0s10vlan100:0-35
This commit patches the ifupdown package to add a conditional to the
source code where the 'ip' command is formatted. The conditional
replaces the label name by the interface name itself, if the former is
more than 15 characters long.

Test plan

Setup:
- System: AIO-SX
- Interfaces:
  > enp0s8: ethernet, assigned to mgmt and cluster-host networks
  > enp0s9: bond slave
  > enp0s10: bond slave
  > bond0longname: bond on top of enp0s9 and enp0s10, data
  > vlanshort: vlan id 300 on top of bond0longname, data
  > vlan400longname: vlan id 400 on top of bond0longname, data
- Both mgmt and cluster-host networks are dual stack
- All data interfaces have both IPv4 and IPv6 static addresses

[PASS] Run ifup command individually for all labels, check that
       addresses are correctly assigned
[PASS] Run ifdown command individually for all labels, check that
       addresses are correctly removed
[PASS] Manually change MTU value in /etc/network/interfaces.d/ifcfg-*
       files for enp0s8 and enp0s9, call /usr/local/bin/
       apply_network_config.sh script, check that all interfaces were
       correctly configured (changing MTU causes the affected interfaces
       and all the dependent ones and corresponding labels to be put
       down and up again, logs are in /var/log/user.log)

Story: 2011027
Task: 50775
Change-Id: I10da435437356c943d6e30341e7322e25094f407
Signed-off-by: Lucas Ratusznei Fonseca <lucas.ratuszneifonseca@windriver.com>
2024-08-07 13:20:16 -03:00
2024-07-15 13:47:07 +00:00
2023-08-29 16:52:04 -03:00
2024-05-01 16:39:19 -04:00
2024-07-11 07:45:02 +00:00
2024-05-01 16:39:19 -04:00
2019-01-08 11:42:04 -05:00
2019-04-19 19:52:31 +00:00
2023-09-06 17:54:55 -03:00
2021-09-09 19:05:36 +03:00
2023-09-06 17:54:55 -03:00
2024-07-15 13:47:07 +00:00
2018-05-31 07:36:35 -07:00
2023-09-06 17:54:55 -03:00

integ

StarlingX Integration

Description
StarlingX Integration and packaging
Readme 53 MiB
Languages
Shell 27.7%
Python 22.8%
JavaScript 21.6%
Perl 12.8%
C++ 5.8%
Other 9.2%