kubeovn / kube-ovn

A Bridge between SDN and Cloud Native (Project under CNCF)
https://kubeovn.github.io/docs/stable/en/
Apache License 2.0
1.92k stars 436 forks source link

provider-network bridges should leave systemd-network interfaces in a good state #3868

Closed Smithx10 closed 1 month ago

Smithx10 commented 5 months ago

I have Compute Nodes running systemd-network.

After applying this networkctl isn't happy.

root@use1-headnode-01:~/yamls/networking# cat storage-pn.yaml
apiVersion: kubeovn.io/v1
kind: ProviderNetwork
metadata:
  name: storage
spec:
  defaultInterface: storage
  excludeNodes:
    - use1-headnode-01
    - use1-headnode-02
    - use1-headnode-03

There are two scenarios that make systemd networkd unhappy.

If an source interface that gets bridged had an address that link is now considered degraded because systemd expects for it to be routable, we should add to our logic to mark these devices as "carrier" if possible.

if the source interface is a "carrier" without an address the newly created bridge interface is marked degraded because it should be created as a "carrier" interface. I believe "mirror0" falls into this also.

Here is the output from networkctl.

root@use1-nsc-01:~/post-boot# networkctl
 IDX LINK           TYPE     OPERATIONAL SETUP
   1 lo             loopback carrier     unmanaged
   2 enp33s0f0      ether    enslaved    unmanaged
   3 enp33s0f1      ether    enslaved    unmanaged
   4 enp1s0f0       ether    enslaved    unmanaged
   5 enp1s0f1       ether    enslaved    unmanaged
   6 enp65s0f0np0   ether    enslaved    unmanaged
   7 enp65s0f1np1   ether    enslaved    unmanaged
   8 admin          bond     routable    configured
   9 storage        bond     degraded    configured
  10 external       bond     carrier     configured
  11 nodeip         vlan     routable    configured
  12 underlay       vlan     routable    configured
  13 ovs-system     ether    off         unmanaged
  14 br-int         ether    off         unmanaged
  15 mirror0        ether    degraded    unmanaged
  16 ovn0           ether    routable    unmanaged
  17 genev_sys_6081 geneve   enslaved    unmanaged
  25 63cb5d288469_h ether    enslaved    unmanaged
  31 2aaf1ff02f1a_h ether    enslaved    unmanaged
  33 830de324a1f2_h ether    enslaved    unmanaged
  41 283b5d9171c0_h ether    enslaved    unmanaged
  43 5a62b359cec7_h ether    enslaved    unmanaged
  45 aa9b42691a2b_h ether    enslaved    unmanaged
  47 2254f2c8516f_h ether    enslaved    unmanaged
  49 4572bd678eed_h ether    enslaved    unmanaged
  51 aa87b1ecb9d7_h ether    enslaved    unmanaged
  53 7f4a1b2e887b_h ether    enslaved    unmanaged
3862 br-external    ether    degraded    unmanaged
3863 br-storage     ether    routable    unmanaged
3867 d49d7323c41b_h ether    enslaved    unmanaged
oilbeater commented 3 months ago

networkctl seems to display the status of all network cards without an IP as degraded. Adding an IP directly to the network card may cause other network issues. Is there a way to adjust this display status of networkctl? Additionally, what other negative impacts can this status have on the environment?

github-actions[bot] commented 1 month ago

Issues go stale after 60d of inactivity. Please comment or re-open the issue if you are still interested in getting this issue fixed.