-
Notifications
You must be signed in to change notification settings - Fork 164
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
dpcreconciler: set MAC and interface rename while interface is DOWN #4193
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4193 +/- ##
=======================================
Coverage 19.69% 19.69%
=======================================
Files 8 8
Lines 2600 2600
=======================================
Hits 512 512
Misses 1985 1985
Partials 103 103 ☔ View full report in Codecov by Sentry. |
Did we see these errors in the test logs in the last few days? Or how have you noticed it? |
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.
Thanks for finding this, added some comments.
// Make sure that the interface is UP right after MAC address assignment | ||
// and interface rename. In case of incorrect order operation fails | ||
// with `Device or resource busy`. | ||
if err := netlink.LinkSetUp(link); err != nil { |
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 suggest to put this at the end (after LinkSetUp(bridge)
) and with kernLink
as the argument. In the past I saw LinkSetMaster
changing the interface status to DOWN.
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.
Done.
8e93369
to
5d0f018
Compare
…le interface is DOWN On attempt to set MAC address or rename interface which is UP host returns `Device or resource busy`. Patch fixes the error by changing the order: first set MAC and rename interface, then bring interface UP. Patch fixes inability to use host interface, the problem was reproduced on RPI4 board. Presumably any device should be affected. Signed-off-by: Roman Penyaev <[email protected]> Fixes: 7a6981b ("Add support for switch network instance with multiple ports")
5d0f018
to
52fdb5d
Compare
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.
Starting eden tests. Let us know when you complete testing with the physical device.
@eriknordmark Please do not make EVE release until we merge this. |
Have just updated the "Radiatore" board (in Berlin-Lab), all good, keth0 appeared. |
On attempt to set MAC address or rename interface which is UP host returns
Device or resource busy
. Patch fixes the error by changing the order: first set MAC and rename interface, then bring interface UP.Patch fixes inability to use host interface, the problem was reproduced on RPI4 board. Presumably any device should be affected.
Fixes: 7a6981b ("Add support for switch network instance with multiple ports")
PS. This PR is not tested. Need some comments from Milan, will do testing next week.