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

ncm-network: nmstate, add support for OVS bridges and ports #1718

Closed
alvarosimon opened this issue Sep 19, 2024 · 6 comments · Fixed by #1719
Closed

ncm-network: nmstate, add support for OVS bridges and ports #1718

alvarosimon opened this issue Sep 19, 2024 · 6 comments · Fixed by #1719
Milestone

Comments

@alvarosimon
Copy link
Member

OVS bridges and ports are not supported with ncm-network nmstate yet, just to add this example:

interfaces:
- name: eth100
  type: ovs-interface
  state: up
  ipv4:
    enabled: true
    address:
      - ip: 192.168.1.1
        prefix-length: 24
- name: br100
  type: ovs-bridge
  state: up
  bridge:
    options:
      stp: true
    port:
    - name: bond0
    - name: eth100

Including the new interface names for NetworkManager ovs-bridgeand ovs-interface

@alvarosimon
Copy link
Member Author

These changes also require NetworkManager-ovs rhel9 package to make it work

@stdweird
Copy link
Member

in network.pm: with schema

    +-bond1
      +-bonding_opts
        $ lacp_rate : 1
        $ miimon : 100
        $ mode : 4
        $ xmit_hash_policy : 'layer3+4'
      $ bootproto : 'none'
      $ driver : 'bonding'
      $ ovs_bridge : 'br100'
      $ type : 'OVSPort'
    +-br100
      $ bootproto : 'none'
      $ ovs_extra : 'set Interface br100 type=internal'
      $ type : 'OVSBridge'
    +-eth100
      $ broadcast : '10.141.31.255'
      $ ip : '10.141.15.51'
      $ netmask : '255.255.224.0'
      $ ovs_bridge : 'br100'
      $ type : 'OVSIntPort'
 cat /etc/sysconfig/network-scripts/ifcfg-br100 
ONBOOT=yes
NM_CONTROLLED='no'
DEVICE=br100
TYPE=OVSBridge
DEVICETYPE='ovs'
OVS_EXTRA="set Interface br100 type=internal"
BOOTPROTO=none
RESOLV_MODS=no
PEERDNS=no
[root@hyp301 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth100 
ONBOOT=yes
NM_CONTROLLED='no'
DEVICE=eth100
TYPE=OVSIntPort
DEVICETYPE='ovs'
OVS_BRIDGE='br100'
BOOTPROTO=static
IPADDR=10.141.15.51
NETMASK=255.255.224.0
BROADCAST=10.141.31.255
RESOLV_MODS=no
PEERDNS=no
[root@hyp301 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond1
ONBOOT=yes
NM_CONTROLLED='no'
DEVICE=bond1
TYPE=OVSPort
DEVICETYPE='ovs'
OVS_BRIDGE='br100'
BOOTPROTO=none
BONDING_OPTS='lacp_rate=1 miimon=100 mode=4 xmit_hash_policy=layer3+4'
RESOLV_MODS=no
PEERDNS=no

@stdweird
Copy link
Member

@alvarosimon what is the bond1 nmstate yaml for this host? (does it need references to ovs)

@stdweird
Copy link
Member

the device bring up order be very important: bond -> slave -> ovs bridge -> ovs interface

@aka7 do you think it makes sense to drop all interfaces in one yml file, so nmstate can sort out the bring-up order?

@aka7
Copy link
Contributor

aka7 commented Sep 19, 2024 via email

@alvarosimon
Copy link
Member Author

@stdweird I did a very quick test with what provides current ncm-network, so yes the bond0 was already there using several nics (eth0 and eth1 in our case). So I have created an extra yaml to add it to ovs bridge as external port. It works but this is not optimal, this is a kernel bond and it should be managed by OVS. I have to check if NetworkManager is also able to manage ovs bonding (https://docs.openvswitch.org/en/latest/topics/bonding/)

@jrha jrha added this to the 24.10 milestone Sep 20, 2024
@jrha jrha closed this as completed in #1719 Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants