- Related issues: #2988 [BUG] Network interface link status judgement did not match the available NICs in Harvester vlanconfig
Category:
- Network
Verification Steps
-
Create cluster network
cn1
-
Create a vlanconfig
config-n1
oncn1
which applied to node 1 only -
Select an available NIC on the Uplink
-
Create a vlan, the cluster network
cn1
vlanconfig and provide valid vlan id91
-
Edit
config-n1
, -
Check NICs list in Uplink
-
ssh to node 1
-
Check the available NICs on Network config
-
Check the state of linkmonitor nic on node1
harv221021:~ # kubectl get linkmonitor nic -o yaml apiVersion: network.harvesterhci.io/v1beta1 kind: LinkMonitor metadata: creationTimestamp: "2022-10-24T09:30:56Z" finalizers: - wrangler.cattle.io/harvester-network-link-monitor-controller generation: 4 name: nic resourceVersion: "43501" uid: a23fd9b8-afae-4ced-92b7-6f5a25c70a3c spec: targetLinkRule: typeRule: device status: linkStatus: harv221021: - index: 2 mac: 00:1b:21:38:5c:78 name: enp179s0f0 state: down type: device - index: 3 mac: e4:54:e8:7c:f3:d4 masterIndex: 6 name: eno1 state: up type: device - index: 4 mac: 00:1b:21:38:5c:79 name: enp179s0f1 state: down type: device
-
Check the
ip link
status on node1harv221021:~ # ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp179s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether 00:1b:21:38:5c:78 brd ff:ff:ff:ff:ff:ff 3: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master mgmt-bo state UP mode DEFAULT group default qlen 1000 link/ether e4:54:e8:7c:f3:d4 brd ff:ff:ff:ff:ff:ff altname enp0s31f6 4: enp179s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether 00:1b:21:38:5c:79 brd ff:ff:ff:ff:ff:ff 5: mgmt-br: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether e4:54:e8:7c:f3:d4 brd ff:ff:ff:ff:ff:ff 6: mgmt-bo: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master mgmt-br state UP mode DEFAULT group default qlen 1000 link/ether e4:54:e8:7c:f3:d4 brd ff:ff:ff:ff:ff:ff
-
Enable NIC
enp179s0f0
by plugging physical network cableharv221021:~ # ip a | grep enp179s0f* 2: enp179s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000 4: enp179s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
-
Check the available NICs on Network config on node 1
-
Check the state of linkmonitor nic on node 1
harv221021:~ # kubectl get linkmonitor nic -o yaml apiVersion: network.harvesterhci.io/v1beta1 kind: LinkMonitor metadata: creationTimestamp: "2022-10-24T09:30:56Z" finalizers: - wrangler.cattle.io/harvester-network-link-monitor-controller generation: 5 name: nic resourceVersion: "122674" uid: a23fd9b8-afae-4ced-92b7-6f5a25c70a3c spec: targetLinkRule: typeRule: device status: linkStatus: harv221021: - index: 2 mac: 00:1b:21:38:5c:78 name: enp179s0f0 state: down type: device - index: 3 mac: e4:54:e8:7c:f3:d4 masterIndex: 6 name: eno1 state: up type: device - index: 4 mac: 00:1b:21:38:5c:79 name: enp179s0f1 state: up type: device
-
check the
ip link
status on node 1harv221021:~ # ip link | grep enp179s* 2: enp179s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 4: enp179s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
Expected Results
-
The available NICs in Harvester vlanconfig can match the actual ip link status of all NICs
harv221021:~ # ip link | grep enp179s* 2: enp179s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 4: enp179s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
-
When we bring up specific NICs on node, the vlanconfig UI can also reflect the latest changes
harv221021:~ # ip link | grep enp179s* 2: enp179s0f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 4: enp179s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000