community.general icon indicating copy to clipboard operation
community.general copied to clipboard

Add transport_mode configuration for Infiniband devices

Open ThomasGebert opened this issue 3 years ago • 4 comments

SUMMARY

Adds transport_mode configuration for Infiniband based IPoIB devices, which is one of:

  • datagram (default)
  • connected

Fixes #5356

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

nmcli.py

ADDITIONAL INFORMATION

For Infiniband IPoIB devices like ib0 there are two different transport modes that can be chosen.

  • datagram
  • connected
# nmcli -t con show ib0 | grep infiniband.transport-mode
infiniband.transport-mode:datagram
# grep -H . /sys/class/net/ib0/{mtu,mode}
/sys/class/net/ib0/mtu:2044
/sys/class/net/ib0/mode:datagram

# nmcli -t con show ib0 | grep infiniband.transport-mode
infiniband.transport-mode:connected
# grep -H . /sys/class/net/ib0/{mtu,mode}
/sys/class/net/ib0/mtu:65520
/sys/class/net/ib0/mode:connected


ThomasGebert avatar Oct 14 '22 13:10 ThomasGebert

cc @alcamie101 click here for bot help

ansibullbot avatar Oct 14 '22 13:10 ansibullbot

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace

click here for bot help

ansibullbot avatar Oct 14 '22 13:10 ansibullbot

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

github-actions[bot] avatar Oct 14 '22 13:10 github-actions[bot]

It would be great if you could extend the tests in tests/unit/plugins/modules/net_tools/test_nmcli.py to cover this new option.

felixfontein avatar Oct 14 '22 20:10 felixfontein

It would be great if you could extend the tests in tests/unit/plugins/modules/net_tools/test_nmcli.py to cover this new option.

@felixfontein: not sure if I did the correct things while adding the tests. I tried to copy the ethernet test. At least the local ansible-test did succeed for me.

ThomasGebert avatar Oct 17 '22 15:10 ThomasGebert

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/b54483b52eecaa2c6c5446f1d13f73f6d95d409e/pr-5361

Backported as https://github.com/ansible-collections/community.general/pull/5408

🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.

patchback[bot] avatar Oct 23 '22 09:10 patchback[bot]

@ThomasGebert thanks for your contribution! @russoz thanks for reviewing!

felixfontein avatar Oct 23 '22 09:10 felixfontein