quattor / configuration-modules-core

Node Configuration Manager Components for Everyone
www.quattor.org
Other
7 stars 56 forks source link

ncm-network: nmstate ipoib support #1665

Open kwaegema opened 8 months ago

kwaegema commented 8 months ago

current ncm-network using nmstate doesn't seem to support ipoib. @aka7 Is there a way to do this on EL9 using ncm-network?

I've seen two issues:

this changes to


2024/03/01-16:53:11 [VERB] Getting output of command: /usr/bin/nmstatectl apply /etc/nmstate/ib0.yml
2024/03/01-16:53:11 [ERROR] Error '/usr/bin/nmstatectl apply /etc/nmstate/ib0.yml' output: NmstateError: InvalidArgument: Invalid propriety: unknown field `infiniband
[root@node4230 ~]# diff -bu ib0.yml ib0.yml_ok
--- ib0.yml 2024-03-01 17:11:50.585099054 +0100
+++ ib0.yml_ok  2024-03-01 17:16:50.498239387 +0100
@@ -7,12 +7,13 @@
       prefix-length: 19
     dhcp: false
     enabled: true
-  link-aggregation:
-    port: []
   name: ib0
   profile-name: ib0
   state: up
-  type: bond
+  type: infiniband
+  infiniband:
+    mode: datagram
+    pkey: '0xffff'
 routes:
   config:
   - next-hop-interface: ib0
aka7 commented 8 months ago

You are right in the fact that nmstste module doesn't support this type. In fact not sure if ncm-network supported it? Maybe maintainers can confirm?

There has been few fixes went into master that would have stopped it from being configured as type bond though.

Regarding renaming of interface, nmstate module in ncm-network doesn't rename interfaces, so that's probably happening outside of ncm-network.

aka7 commented 8 months ago

@kwaegema sorry, to answer your question, I think we can look to add the support in nmstate, if you provide full details of config needed for a infiniband type configuration, and if we can separate the schema for nmstate only options, which @jrha is going to see if it's possible.

stdweird commented 8 months ago

@aka7 we will investigate, but this was all working in old ncm-network. but some of the details are handled by OFED config files and services, maybe something is also going wrong there as well (eg we are missing some rpms that handle this). there is interface renaming code in the old ncm-network though; not sure how this works anymore

kwaegema commented 8 months ago

Hi @aka7 thanks! i don't find a lot of docs on ib config with nmstate, but this is a basic example what is needed:

https://github.com/nmstate/nmstate/blob/base/examples/infiniband_pkey_ipoib_create.yml

interfaces:
  - name: mlx5_ib0.80ff
    type: infiniband
    state: up
    infiniband:
      base-iface: mlx5_ib0
      mode: datagram
      pkey: '0x80ff'

right now I use this to get it running when i manually renamed the interface (that part is to be investigated)

interfaces:
- ipv4:
    address:
    - ip: 10.143.7.160
      prefix-length: 19
    dhcp: false
    enabled: true
  name: ib0
  profile-name: ib0
  state: up
  type: infiniband
  infiniband:
    mode: datagram
    pkey: '0xffff'
stdweird commented 8 months ago

@kwaegema some of this data comes from ncm-ofed, like the datagram mode. not sure how we can mix this

kwaegema commented 8 months ago

@kwaegema some of this data comes from ncm-ofed, like the datagram mode. not sure how we can mix this

we already set some ncm-network params based on this, like: SELF[bonddev]["mtu"] = if (IPOIB_CM) { ... so we'll set this in the profile i guess

kwaegema commented 8 months ago

Hi @aka7 Would you have time to look into this https://github.com/quattor/configuration-modules-core/issues/1665#issuecomment-1976639779 No problem if not, but then we know we have to look into it ourselves :) Thanks!

aka7 commented 8 months ago

@kwaegema I thought there were questions round how this can be mix with ncm-network and ncm-fed, question from @stdweird ?

I think its probably worth you looking into this setup since I don't really have any test host to do these type of test. other then looking at generating the expected output. But there are few things that needs to be discussed though, such as how we separate the core-schama and nmstate only schema. something which was raised before, anything we do to support this issue will be nmstate specific only.

stdweird commented 8 months ago

@aka7 wrt infiniband, i just checked: for initscript network config, there is no explicit infiniband support; and all is left to (ncm-)ofed. i can add infiniband data to the core network schema, and change ncm-ofed to read some stuff from the network schema instead of it's own schema; or some clever mix to make it compatible. i'll try to work this out next week