Bug 2116633
| Summary: | os-net-config should not restart interfaces when ETHTOOL_OPTS is changed | |||
|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Keigo Noha <knoha> | |
| Component: | os-net-config | Assignee: | Karthik Sundaravel <ksundara> | |
| Status: | CLOSED ERRATA | QA Contact: | Nobody <nobody> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 16.1 (Train) | CC: | astupnik, bfournie, cfontain, hakhande, hbrock, jslagle, ksundara, mburns, rdiazcam, vcandapp | |
| Target Milestone: | zstream | Keywords: | RFE, Triaged | |
| Target Release: | 16.2 (Train on RHEL 8.4) | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | os-net-config-11.5.1-2.20230728005156.8a89b94.el8ost | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2118206 (view as bug list) | Environment: | ||
| Last Closed: | 2023-11-08 19:18:30 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2118206 | |||
|
Description
Keigo Noha
2022-08-09 06:03:34 UTC
os-net-config generates the ifcfg files based on config.json. If there is a change in the current ifcfg vs new one, it performs ifdown and ifup for the same. Since the issue is not reproducible with network-scripts can you please help us with more clarity on why the routes are not added back. Also if the change in ethtool_opts needs to be handled without restarting the interface it would be a RFE. Hi Karthik, Currently, we're working with SBR-Networking team for the issue that routes are not back. On the other hand, changing or adding ETHTOOL_OPTS can be applied online. So, the current implementation has a room to improve. Once I get a result from the investigation from networking side, I'll update this case. Best Regards, Keigo Noha Hi Karthik, I can reproduce the issue manually. The key thing is what interface runs ifdown/ifup. The proper down step is # ifdown eth0 # ifdown eth1 # ifdown bond0 # ifup eth0 # ifup eth1 # ifup bond0 This correct steps doesn't trigger the issue. However, os-net-config did the following steps. # ifdown eth0 # ifdown eth1 # ifup eth0 # ifup eth1 # ifup bond0 The way in os-net-config lacks 'ifdown bond0'. Due to that, ifup-routes are not run. I think we should create a new bugzilla to focus on adding steps to run ifdown bond0. I'll clone this bugzilla for adding steps to run ifdown bond0. Best Regards, Keigo Noha Hi Karthik, In upstream, the proposed fix for this issue was merged into stable/wallaby and stable/train. Is it possible to backport the fix into OSP17.1 and OSP16.2? Best regards, Keigo Noha RHOSP and RPM versions:
~~~
[stack@undercloud-0 ~]$ cat /etc/rhosp-release
Red Hat OpenStack Platform release 16.2.6 (Train)
[root@computedpdksriov-0 ~]# rpm -aq |grep os-net-config
os-net-config-11.5.1-2.20230728005156.8a89b94.el8ost.noarch
~~~
Modified config.json to include ethtool_opts for a Linux bond:
~~~
root@computedpdksriov-0 ~]# cat /etc/os-net-config/config.json
...
{
"bonding_options": "mode=active-backup",
"ethtool_opts": "speed 1000",
"members": [
{
"name": "nic3",
"primary": true,
"type": "interface"
},
{
"name": "nic4",
"type": "interface"
}
],
"name": "bond_api",
"type": "linux_bond",
"use_dhcp": false
},
...
~~~
When running os-net-config we can see the ethtool command execution (ignore the error) and the interfaces set down and up:
~~~
[root@computedpdksriov-0 ~]# os-net-config -c /etc/os-net-config/config.json -v
[2023/10/02 03:12:04 PM] [INFO] Using config file at: /etc/os-net-config/config.json
...
[2023/10/02 03:12:04 PM] [INFO] Running ethtool -s bond_api speed 1000
[2023/10/02 03:12:04 PM] [WARNING] Error in 'ethtool -s bond_api speed 1000', restarting bond_api:
Unexpected error while running command.
Command: /sbin/ethtool -s bond_api speed 1000
Exit code: 75
Stdout: ''
Stderr: 'netlink error: Operation not supported\n')
[2023/10/02 03:12:04 PM] [INFO] running ifdown on interface: bond_api
[2023/10/02 03:12:05 PM] [INFO] running ifdown on interface: enp130s0f0
[2023/10/02 03:12:05 PM] [INFO] running ifdown on interface: enp130s0f1
[2023/10/02 03:12:05 PM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-bond_api
[2023/10/02 03:12:05 PM] [INFO] running ifup on interface: bond_api
[2023/10/02 03:12:08 PM] [INFO] running ifup on interface: enp130s0f0
[2023/10/02 03:12:08 PM] [INFO] running ifup on interface: enp130s0f1
[2023/10/02 03:12:08 PM] [INFO] running ifup on interface: bond_api
~~~
The same behavior when configuring ethtool_opts for one of the interfaces:
~~~
root@computedpdksriov-0 ~]# cat /etc/os-net-config/config.json
...
{
"bonding_options": "mode=active-backup",
"members": [
{
"name": "nic3",
"ethtool_opts": "speed 1000",
"primary": true,
"type": "interface"
},
{
"name": "nic4",
"type": "interface"
}
],
"name": "bond_api",
"type": "linux_bond",
"use_dhcp": false
},
...
[root@computedpdksriov-0 ~]# os-net-config -c /etc/os-net-config/config.json -v
[2023/10/02 03:27:40 PM] [INFO] Using config file at: /etc/os-net-config/config.json
...
[2023/10/02 03:27:41 PM] [INFO] Running ethtool -s enp130s0f0 speed 1000
[2023/10/02 03:27:41 PM] [WARNING] Error in 'ethtool -s enp130s0f0 speed 1000', restarting enp130s0f0:
Unexpected error while running command.
Command: /sbin/ethtool -s enp130s0f0 speed 1000
Exit code: 75
Stdout: ''
Stderr: 'netlink error: link settings update failed\nnetlink error: Operation not supported\n')
[2023/10/02 03:27:41 PM] [INFO] running ifdown on interface: vlan516
[2023/10/02 03:27:41 PM] [INFO] running ifdown on interface: vlan518
[2023/10/02 03:27:41 PM] [INFO] running ifdown on interface: enp130s0f0
[2023/10/02 03:27:41 PM] [INFO] running ifdown on interface: enp130s0f1
[2023/10/02 03:27:42 PM] [INFO] running ifdown on interface: enp130s0f0
[2023/10/02 03:27:42 PM] [INFO] running ifdown on interface: bond_api
[2023/10/02 03:27:42 PM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-enp130s0f0
[2023/10/02 03:27:42 PM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-bond_api
[2023/10/02 03:27:42 PM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-vlan516
[2023/10/02 03:27:42 PM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-vlan518
[2023/10/02 03:27:42 PM] [INFO] running ifup on interface: enp130s0f0
[2023/10/02 03:27:43 PM] [INFO] running ifup on interface: enp130s0f1
[2023/10/02 03:27:43 PM] [INFO] running ifup on interface: enp130s0f0
[2023/10/02 03:27:43 PM] [INFO] running ifup on interface: bond_api
[2023/10/02 03:27:44 PM] [INFO] running ifup on interface: vlan516
[2023/10/02 03:27:48 PM] [INFO] running ifup on interface: vlan518
...
~~~
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 (Red Hat OpenStack Platform 16.2.6 (Train) bug fix and enhancement 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://access.redhat.com/errata/RHBA-2023:6307 |