Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving host interface to OVS bridge failed due to interface altname #6301

Closed
jianjuns opened this issue May 7, 2024 · 13 comments · Fixed by #6321
Closed

Moving host interface to OVS bridge failed due to interface altname #6301

jianjuns opened this issue May 7, 2024 · 13 comments · Fixed by #6321
Assignees
Labels
area/interface Issues or PRs related to network interfaces area/OS/linux Issues or PRs related to the Linux operating system. kind/bug Categorizes issue or PR as related to a bug.

Comments

@jianjuns
Copy link
Contributor

jianjuns commented May 7, 2024

Describe the bug
With some Linux distros, after moving the interface to an OVS bridge as an uplink and renaming it (e.g. from eth0 to eth0~), it fails to create a new bridge interface with the same name to move the host interface IP and routes. Seems it is because after the renaming, the host interface will get an "altname" using the original interface name (e.g. eth0) which conflicts with the new bridge interface name.

To Reproduce
@meibensteiner reported this issue with the following steps to create a secondary OVS bridge with a Node's primary interface.

antrea-agent config:

featureGates:
  SecondaryNetwork: true
secondaryNetwork:
  ovsBridges: [{bridgeName: "secondary-test-br", physicalInterfaces: ["enp0s1"]}] 

Then agent lost network.

ovs-vsctl shows:

root@server:/# ovs-vsctl show
905937ae-1200-4c26-82ce-69d67eeda32e
    Bridge secondary-test-br
        datapath_type: system
        Port enp0s1
            Interface enp0s1
                type: internal
                error: "could not add network device enp0s1 to ofproto (File exists)"
    Bridge br-int
        datapath_type: system
        Port antrea-gw0
            Interface antrea-gw0
                type: internal
        Port antrea-tun0
            Interface antrea-tun0
                type: vxlan
                options: {key=flow, remote_ip=flow}
    ovs_version: "2.17.7"

From ip addr outputs, we can see the host interface after moved to OVS and renamed to enp0s1~, has an altname of enp0s1.
Before antrea-agent installation, the interface did not have an altname.

agent logs:

I0507 17:17:51.452667       1 log_file.go:93] Set log file max size to 104857600
I0507 17:17:51.453066       1 feature_gate.go:249] feature gates: &{map[Multicast:true SecondaryNetwork:true ServiceExternalIP:true]}
I0507 17:17:51.453090       1 agent.go:105] "Starting Antrea agent" version="v2.0.0"
I0507 17:17:51.453099       1 client.go:89] No kubeconfig file was specified. Falling back to in-cluster config
I0507 17:17:51.453347       1 prometheus.go:189] Initializing prometheus metrics
I0507 17:17:51.453437       1 ovs_client.go:70] Connecting to OVSDB at address /var/run/openvswitch/db.sock
I0507 17:17:51.453675       1 agent.go:377] Setting up node network
I0507 17:17:51.453767       1 discoverer.go:82] Starting ServiceCIDRDiscoverer
F0507 17:17:51.453838       1 main.go:53] Error running agent: error initializing agent: failed to get Node with name server from K8s: Get "[https://10.43.0.1:443/api/v1/nodes/server](https://10.43.0.1/api/v1/nodes/server)": dial tcp 10.43.0.1:443: connect: network
 is unreachable
goroutine 1 [running]:
k8s.io/klog/v2/internal/dbg.Stacks(0x0)
        k8s.io/klog/[email protected]/internal/dbg/dbg.go:35 +0x8c
k8s.io/klog/v2.(*loggingT).output(0x4339b80, 0x3, 0x0, 0x40002a1a40, 0x1, {0x33e2e76?, 0x1?}, 0x4000100000?, 0x0)
        k8s.io/klog/[email protected]/klog.go:957 +0x610
k8s.io/klog/v2.(*loggingT).printfDepth(0x40006f8fc0?, 0xefd50?, 0x0, {0x0, 0x0}, 0x0?, {0x26b8f9e, 0x17}, {0x4000370d90, 0x1, ...})
        k8s.io/klog/[email protected]/klog.go:750 +0x1ac
k8s.io/klog/v2.(*loggingT).printf(...)
        k8s.io/klog/[email protected]/klog.go:727
k8s.io/klog/v2.Fatalf(...)
        k8s.io/klog/[email protected]/klog.go:1661
main.newAgentCommand.func1(0x4000174000?, {0x40000efd50, 0x0, 0x7})
        antrea.io/antrea/cmd/antrea-agent/main.go:53 +0x258
github.com/spf13/cobra.(*Command).execute(0x4000678000, {0x400004c090, 0x7, 0x7})
        github.com/spf13/[email protected]/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x4000678000)
        github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:1039
main.main()
        antrea.io/antrea/cmd/antrea-agent/main.go:32 +0x2

Versions:
Ubuntu 23.10 Server with RKE2 1.29.

@jianjuns jianjuns added kind/bug Categorizes issue or PR as related to a bug. area/interface Issues or PRs related to network interfaces labels May 7, 2024
@jianjuns
Copy link
Contributor Author

jianjuns commented May 7, 2024

@jianjuns
Copy link
Contributor Author

jianjuns commented May 7, 2024

Even the issue was reported for the secondary OVS bridge, it should apply to the primary bridge too with bridging mode when we move the host interface to the primary bridge as the uplink. It is not clear what Linux distros/config will lead to the altname setting on the interfaces.

@meibensteiner
Copy link

Thank you @jianjuns !

My test machine is a Ubuntu 23.10 Server on ARM64.
If you want to quickly set up RKE2:

mkdir -p /etc/rancher/rke2/
cat >/etc/rancher/rke2/config.yaml <<EOL
disable: 
 - rke2-ingress-nginx
 - rke2-snapshot-controller-crd
 - rke2-snapshot-controller
 - rke2-snapshot-validation-webhook
disable-cloud-controller: true
cni: none
write-kubeconfig-mode: 600
EOL
curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=latest INSTALL_RKE2_VERSION=v1.29.2+rke2r1 sh -
systemctl enable rke2-server --now
cat /etc/rancher/rke2/rke2.yaml

@gran-vmv
Copy link
Contributor

gran-vmv commented May 8, 2024

This is a new feature enabled by default in some new Linux distros.
Need to find a way to work in this env.

root@antrea:/# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic
root@antrea:/# cat /lib/systemd/network/99-default.link 
#  SPDX-License-Identifier: LGPL-2.1+
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Link]
NamePolicy=kernel database onboard slot path
MACAddressPolicy=persistent

root@antrea2:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy
root@antrea2:~# cat /lib/systemd/network/99-default.link 
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent

@gran-vmv
Copy link
Contributor

gran-vmv commented May 8, 2024

Thank you @jianjuns !

My test machine is a Ubuntu 23.10 Server on ARM64. If you want to quickly set up RKE2:

mkdir -p /etc/rancher/rke2/
cat >/etc/rancher/rke2/config.yaml <<EOL
disable: 
 - rke2-ingress-nginx
 - rke2-snapshot-controller-crd
 - rke2-snapshot-controller
 - rke2-snapshot-validation-webhook
disable-cloud-controller: true
cni: none
write-kubeconfig-mode: 600
EOL
curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=latest INSTALL_RKE2_VERSION=v1.29.2+rke2r1 sh -
systemctl enable rke2-server --now
cat /etc/rancher/rke2/rke2.yaml

Could you run below command in your env and post the result here?

lsb_release -a
cat /lib/systemd/network/99-default.link # Please also display the link config if it is set in other link file

@gran-vmv
Copy link
Contributor

gran-vmv commented May 9, 2024

@meibensteiner Could you provide more detailed information of your env?
I tried to repro this but it seems uplink's altname won't conflict with uplink's name.
Ubuntu 23.10 AMD64 with RKE2 in #6301 (comment)
Enable FlexibleIPAM mode in Antrea v2.0.0 and the network works fine
Altname enp11s0 exists no matter before or after antrea-agent started.
@jianjuns @wenyingd Any idea?

root@ubuntuguest:/# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.10
Release:	23.10
Codename:	mantic
root@ubuntuguest:/# cat /usr/lib/systemd/network/99-default.link
# SPDX-License-Identifier: MIT-0
#
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
# To make local modifications, one of the following methods may be used:
# 1. add a drop-in file that extends this file by creating the
#    /etc/systemd/network/99-default.link.d/ directory and creating a
#    new .conf file there.
# 2. copy this file into /etc/systemd/network or one of the other paths checked
#    by systemd-udevd and edit it there.
# This file should not be edited in place, because it'll be overwritten on upgrades.

[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent
root@ubuntuguest:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens192~: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
    link/ether 00:50:56:a6:68:79 brd ff:ff:ff:ff:ff:ff
    altname enp11s0
    inet6 fe80::250:56ff:fea6:6879/64 scope link 
       valid_lft forever preferred_lft forever
3: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 82:ac:9a:03:45:3c brd ff:ff:ff:ff:ff:ff
4: antrea-gw0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether ee:b1:c8:7f:e2:04 brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global antrea-gw0
       valid_lft forever preferred_lft forever
    inet6 fe80::ecb1:c8ff:fe7f:e204/64 scope link 
       valid_lft forever preferred_lft forever
5: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 00:50:56:a6:68:79 brd ff:ff:ff:ff:ff:ff
    inet 10.221.157.248/23 brd 10.221.157.255 scope global ens192
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fea6:6879/64 scope link 
       valid_lft forever preferred_lft forever
root@ubuntuguest:/# /var/lib/rancher/rke2/bin/kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml get po -A -owide
NAMESPACE     NAME                                                    READY   STATUS              RESTARTS      AGE     IP               NODE          NOMINATED NODE   READINESS GATES
kube-system   antrea-agent-g62sj                                      1/2     Running             0             4m59s   10.221.157.248   ubuntuguest   <none>           <none>
kube-system   antrea-controller-768b4dbcb5-gggm8                      0/1     ImagePullBackOff    0             4m59s   10.221.157.248   ubuntuguest   <none>           <none>

### Uninstall antrea
root@ubuntuguest:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:a6:68:79 brd ff:ff:ff:ff:ff:ff
    altname enp11s0
    inet 10.221.157.248/23 brd 10.221.157.255 scope global dynamic ens192
       valid_lft 7196sec preferred_lft 7196sec
    inet6 fe80::250:56ff:fea6:6879/64 scope link 
       valid_lft forever preferred_lft forever
3: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 82:ac:9a:03:45:3c brd ff:ff:ff:ff:ff:ff
4: antrea-gw0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether ee:b1:c8:7f:e2:04 brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global antrea-gw0
       valid_lft forever preferred_lft forever
    inet6 fe80::ecb1:c8ff:fe7f:e204/64 scope link 
       valid_lft forever preferred_lft forever

@wenyingd
Copy link
Contributor

wenyingd commented May 9, 2024

@gran-vmv I found that the altname on the uplink is different from the interface name in your env (interface name: ens192, altname enp11s0), so it won't cause conflict when we try to create OVS internal interface using the uplink name after uplink is renamed. Could you try to update uplink's altname as "ens192" first, then perform the test to move it to OVS?

root@ubuntuguest:/# ip a
...
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:a6:68:79 brd ff:ff:ff:ff:ff:ff
    altname enp11s0
    inet 10.221.157.248/23 brd 10.221.157.255 scope global dynamic ens192
       valid_lft 7196sec preferred_lft 7196sec
    inet6 fe80::250:56ff:fea6:6879/64 scope link 
       valid_lft forever preferred_lft forever

@meibensteiner
Copy link

As requested

root@server:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.10
Release:	23.10
Codename:	mantic
root@server:~# cat /usr/lib/systemd/network/99-default.link 
# SPDX-License-Identifier: MIT-0
#
# This config file is installed as part of systemd.
# It may be freely copied and edited (following the MIT No Attribution license).
#
# To make local modifications, one of the following methods may be used:
# 1. add a drop-in file that extends this file by creating the
#    /etc/systemd/network/99-default.link.d/ directory and creating a
#    new .conf file there.
# 2. copy this file into /etc/systemd/network or one of the other paths checked
#    by systemd-udevd and edit it there.
# This file should not be edited in place, because it'll be overwritten on upgra
des.

[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent

@gran-vmv
Copy link
Contributor

gran-vmv commented May 9, 2024

@gran-vmv I found that the altname on the uplink is different from the interface name in your env (interface name: ens192, altname enp11s0), so it won't cause conflict when we try to create OVS internal interface using the uplink name after uplink is renamed. Could you try to update uplink's altname as "ens192" first, then perform the test to move it to OVS?

root@ubuntuguest:/# ip a
...
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:50:56:a6:68:79 brd ff:ff:ff:ff:ff:ff
    altname enp11s0
    inet 10.221.157.248/23 brd 10.221.157.255 scope global dynamic ens192
       valid_lft 7196sec preferred_lft 7196sec
    inet6 fe80::250:56ff:fea6:6879/64 scope link 
       valid_lft forever preferred_lft forever

No. The altname cannot conflict with other names and altnames, thus we cannot set uplink altname to ens192 when the uplink name is ens192

root@ubuntuguest:/# ip l property add dev ens192 altname ens192
RTNETLINK answers: File exists

@gran-vmv
Copy link
Contributor

gran-vmv commented May 9, 2024

@meibensteiner Could you try below steps on your env?

  1. Select a NIC which is not the main NIC, or add a new NIC, and turn it up to check the name and altname.
  2. Set the NIC down, change it name from to ~, and then check the name and altname
  3. Set the NIC up, and check the name and altname

@meibensteiner
Copy link

Added second NIC named enp0s2

root@server:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s1~: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b2:ad:75:32:99:36 brd ff:ff:ff:ff:ff:ff
    altname enp0s1
3: enp0s2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0e:cb:d8:a6:65:2f brd ff:ff:ff:ff:ff:ff
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b2:f4:91:b4:39:ae brd ff:ff:ff:ff:ff:ff
5: vxlan_sys_4789: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65000 qdisc noqueue master ovs-system state UNKNOWN gr
oup default qlen 1000
    link/ether 62:44:22:83:06:6f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a84b:58ff:fe98:d49b/64 scope link 
       valid_lft forever preferred_lft forever
6: antrea-gw0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether e2:82:99:1a:0e:21 brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global antrea-gw0
       valid_lft forever preferred_lft forever
    inet6 fe80::e082:99ff:fe1a:e21/64 scope link 
       valid_lft forever preferred_lft forever
7: antrea-egress0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 7e:5c:6b:13:ee:88 brd ff:ff:ff:ff:ff:ff

Set enp0s2 down, renamed it to enp0s2~, check naming:

root@server:~# ip link set dev enp0s2 down
root@server:~# ip link set dev enp0s2 name enp0s2~
root@server:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s1~: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b2:ad:75:32:99:36 brd ff:ff:ff:ff:ff:ff
    altname enp0s1
3: enp0s2~: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0e:cb:d8:a6:65:2f brd ff:ff:ff:ff:ff:ff
    altname enp0s2
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b2:f4:91:b4:39:ae brd ff:ff:ff:ff:ff:ff
5: vxlan_sys_4789: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65000 qdisc noqueue master ovs-system state UNKNOWN gr
oup default qlen 1000
    link/ether 62:44:22:83:06:6f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a84b:58ff:fe98:d49b/64 scope link 
       valid_lft forever preferred_lft forever
6: antrea-gw0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether e2:82:99:1a:0e:21 brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global antrea-gw0
       valid_lft forever preferred_lft forever
    inet6 fe80::e082:99ff:fe1a:e21/64 scope link 
       valid_lft forever preferred_lft forever
7: antrea-egress0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 7e:5c:6b:13:ee:88 brd ff:ff:ff:ff:ff:ff

Set enp0s2 to up, check naming:

root@server:~# ip link set dev enp0s2 up
root@server:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s1~: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b2:ad:75:32:99:36 brd ff:ff:ff:ff:ff:ff
    altname enp0s1
3: enp0s2~: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 0e:cb:d8:a6:65:2f brd ff:ff:ff:ff:ff:ff
    altname enp0s2
    inet6 fe80::ccb:d8ff:fea6:652f/64 scope link tentative 
       valid_lft forever preferred_lft forever
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b2:f4:91:b4:39:ae brd ff:ff:ff:ff:ff:ff
5: vxlan_sys_4789: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 65000 qdisc noqueue master ovs-system state UNKNOWN gr
oup default qlen 1000
    link/ether 62:44:22:83:06:6f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a84b:58ff:fe98:d49b/64 scope link 
       valid_lft forever preferred_lft forever
6: antrea-gw0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether e2:82:99:1a:0e:21 brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global antrea-gw0
       valid_lft forever preferred_lft forever
    inet6 fe80::e082:99ff:fe1a:e21/64 scope link 
       valid_lft forever preferred_lft forever
7: antrea-egress0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 7e:5c:6b:13:ee:88 brd ff:ff:ff:ff:ff:ff

@gran-vmv
Copy link
Contributor

Reproduced.

If there is only one and same valid value in both NamePolicy and AlternativeNamesPolicy (in this issue it is path), it will perform below behavior and caused antrea failed to bridge uplink to ovs bridge:

  1. the interface will get name name1 and no altname
  2. After the name changed to another one, the interface will have altname name1 immediately

@gran-vmv gran-vmv added the area/OS/linux Issues or PRs related to the Linux operating system. label May 10, 2024
@gran-vmv
Copy link
Contributor

gran-vmv commented May 10, 2024

To support this case, we need to delete unexpected altname after rename interface, probably a short sleep is also needed.

However, altname support in netlink lib vishvananda/netlink@a008cbd is not included by any tag (antrea is using v1.2.1-beta.2).

@wenyingd @luolanzone

gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 11, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 11, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 13, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 13, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 13, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 13, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 13, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 16, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 16, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 29, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 30, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue May 30, 2024
@tnqn tnqn closed this as completed in #6321 Jun 5, 2024
tnqn pushed a commit that referenced this issue Jun 5, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue Jun 5, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue Jun 5, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue Jun 7, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue Jun 7, 2024
gran-vmv added a commit to gran-vmv/antrea that referenced this issue Jun 7, 2024
tnqn pushed a commit that referenced this issue Jun 11, 2024
tnqn pushed a commit that referenced this issue Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/interface Issues or PRs related to network interfaces area/OS/linux Issues or PRs related to the Linux operating system. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants