Add nm-dhcp-ib-interfaces element

Currently, NetworkManager can't automatically create default
connection profiles for InfiniBand interfaces.

So, as a workaround, we are adding nm-dhcp-ib-interfaces element to
install NetworkManager-system-connections-infiniband.nmconnection
to NetworkManager to create a wildcard InfiniBand connection profile.

The content of NetworkManager-system-connections-infiniband.nmconnection
is generated by running this command:
`nmcli --offline connection add type infiniband connection.multi-connect multiple`

Closes-Bug: #2016965
Change-Id: Ic972b90e4df9c4aa36cfe3c8631db3e4533045f4
This commit is contained in:
waleedm 2023-05-03 11:34:02 +00:00 committed by waleed mousa
parent d8eb624e72
commit 33c11e1e9c
4 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,9 @@
=====================
nm-dhcp-ib-interfaces
=====================
Add InfiniBand connection profile to run DHCP for InfiniBand interfaces
As it's not implemented yet to create default connection profiles for
InfiniBand interfaces in NetworkManager, we are providing a wildcard
InfiniBand connection profile to allow it to run DHCP for InfiniBand
interfaces.

View File

@ -0,0 +1,16 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
SCRIPTDIR=$(dirname $0)
# Because NetworkManager can't automatically create default connection
# profiles for InfiniBand interfaces, we are installing
# NetworkManager-system-connections-infiniband.nmconnection to
# NetworkManager to create a wildcard InfiniBand connection profile
install -D -g root -o root -m 0600 ${SCRIPTDIR}/NetworkManager-system-connections-infiniband.nmconnection /etc/NetworkManager/system-connections/infiniband.nmconnection
exit 0

View File

@ -0,0 +1,17 @@
[connection]
id=infiniband
type=infiniband
multi-connect=3
[infiniband]
transport-mode=datagram
[ipv4]
method=auto
[ipv6]
addr-gen-mode=default
method=auto
[proxy]

View File

@ -0,0 +1,7 @@
---
fixes:
- |
As NetworkManager can't automatically create default connection profiles
for InfiniBand interfaces, we are adding nm-dhcp-ib-interfaces element
to install NetworkManager-system-connections-infiniband.nmconnection to
NetworkManager to create a wildcard InfiniBand connection profile.