-
Notifications
You must be signed in to change notification settings - Fork 376
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
udev: mark the SRIO-V functions as unamanged by NetworkManager #1622
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1622 +/- ##
==========================================
Coverage ? 66.17%
==========================================
Files ? 78
Lines ? 11175
Branches ? 1578
==========================================
Hits ? 7395
Misses ? 3445
Partials ? 335 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #1622 +/- ##
===========================================
+ Coverage 68.16% 69.15% +0.99%
===========================================
Files 80 82 +2
Lines 11609 11711 +102
Branches 1631 1642 +11
===========================================
+ Hits 7913 8099 +186
+ Misses 3359 3261 -98
- Partials 337 351 +14
Continue to review full report at Codecov.
|
DCR Tests (End to end tests) passed for this change |
@trstringer could you take a look? thanks! |
ping ping ping |
lala lala |
@lkundrak deploying a VM with the |
Thanks for the response.
Yes, but that's essentially a hack.
Yes. Essentially all distros these days provide an option to use NetworkManager, even if they happen not to install it by default.
Most importantly, the rule is Azure-specific. Without NetworkManager, the rule is somewhat unnecessary, yet it can't do any harm. It would do harm though, if it was present outside Azure, which is why it can't be shipped with NetworkManager. |
You bring up a good point. Ok let me do some testing and see what this looks like in other distros with other network services, and also we need to make sure this udev rule doesn't break any other networking configurations inadvertently. I'll test a few different scenarios and let you know what I find. Thanks for bringing this to our attention! |
So after much testing and investigation, I'm confident that this approach is a good one and I think we should move forward into getting this udev rule pushed into upstream. For documentation purposes, my findings include looking at how other distros and network services handle this. For instance, with Debian Stretch (with backports) the reason that this isn't a problem is because it doesn't utilize NetworkManager, but uses
So the reason why other non-NetworkManager implementations don't need to ignore/unmanage the SRIOV interface is because they are more explicit in which interfaces they will manage. Finally, what I like about this improvement is that if a user decides to utilize NetworkManager in the future for a VM or image, this udev rule will already exist, providing a seamless transition. @lkundrak can you rebase upstream develop branch on yours? Once this is done, I'll do a few things and then we can move forward. |
From https://bugzilla.redhat.com/show_bug.cgi?id=1720157: Accelerated Networking on Azure exposes a new SRIOV interface to the VM. This interface is transparently bonded to the synthetic interface, so NetworkManager should just ignore any SRIOV interfaces. The rule is originally from Haiyang Zhang <haiyangz@microsoft.com>.
Yes. Note that NetworkManager can be configured to behave in the same way (not attempt to configure interfaces unless asked to do so), by installing the NetworkManager-config-server package. That is in general not recommended, because it needs more manual tinkering.
I don't see why would I need to? The branch merges cleanly, and I'm not able to test the changes because my Azure account expired and I don't really have a time to spend on this any more (I'm now on a parental leave). |
Hi @lkundrak - Updated branch would help us test your changes against our E2E testing automation - so that the no old changes are tested (and throw us off if there are any issues). If you want, I can do the rebase if you don't have time? Please let me know. |
Lubomir is currently on a long term leave, I can pick this up from Red Hat side. Please let me know if anything else from us is needed to make this merged. Thanks! |
01c7e3f
to
0d8a01d
Compare
I assume you meant rebase on develop. Done. Note that I haven't tested the results, but there were no conflicts. |
@trstringer Can you take a look? I'll also run couple of runs from our Test Automation. |
@vrdmr Looks good to me. |
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM. | ||
# This interface is transparently bonded to the synthetic interface, | ||
# so NetworkManager should just ignore any SRIOV interfaces. | ||
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add", ENV{NM_UNMANAGED}="1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add", ENV{NM_UNMANAGED}="1" | |
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add|change|move", ENV{NM_UNMANAGED}="1" |
I was testing out a version of this over in coreos/fedora-coreos-config#2176 and wasn't observing NM_UNMANAGED=1
getting set in the initramfs until I added the change|move
, which is what is done over in https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/38d3834e2c464bd4820392800a3a1fe3f286fc62/data/85-nm-unmanaged.rules#L5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lkundrak WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would NOT recommend this change without a driver check (mlx4, mlx5). There is potential for hv_pci devices to be managed. We're working on a better story wrt MANA: https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-mana-linux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjp256 do you have an example modification to this rule to achieve that goal?
Description
From https://bugzilla.redhat.com/show_bug.cgi?id=1720157:
Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
This interface is transparently bonded to the synthetic interface,
so NetworkManager should just ignore any SRIOV interfaces.
The rule is originally from Haiyang Zhang haiyangz@microsoft.com.
PR information
Quality of Code and Contribution Guidelines
This change is