Skip to content
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

config-daemon: fix NM udev path #369

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Oct 10, 2022

Function tryCreateNMUdevRule() was wrongly
concatenating path components, as path.Join(...)
removes every trailing slashes to the output string.

This regression has been introduced by

Error showed up in logs with:

I1007 12:20:21.325679 10055 daemon.go:1026] tryCreateNMUdevRule()
I1007 12:20:21.325740 10055 daemon.go:1041] Old udev content '' and new content 'ACTION=="add|change|move", ATTRS

{device}=="0x1000|0x1003|0x1004|0x1014|0x1016|0x1018|0x101a|0x101c|0x101e|0x10ed|0x1515|0x154c|0x1565|0x1664|0x16c1|0x1806|0x1889|0x8090", ENV{NM_UNMANAGED}="1"
SUBSYSTEM=="net", ACTION=="add|move", ATTRS{phys_switch_id}!="", ATTR{phys_port_name}=="pf*vf*", ENV{NM_UNMANAGED}="1"' differ. Writing to file /host/etc/udev/rules.d10-nm-unmanaged.rules.
E1007 12:20:21.325772 10055 daemon.go:1048] tryCreateNMUdevRule(): failed to create dir /host/etc/udev/rules.d: mkdir /host: operation not permitted
I1007 12:20:21.325793 10055 daemon.go:294] Could not create udev rule: mkdir /host: operation not permitted

@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

coveralls commented Oct 10, 2022

Pull Request Test Coverage Report for Build 3220448657

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 25.284%

Files with Coverage Reduction New Missed Lines %
controllers/sriovnetworkpoolconfig_controller.go 4 52.03%
Totals Coverage Status
Change from base Build 3218204616: 0.3%
Covered Lines: 1894
Relevant Lines: 7491

💛 - Coveralls

pkg/daemon/daemon_test.go Outdated Show resolved Hide resolved
pkg/daemon/daemon_test.go Outdated Show resolved Hide resolved
Function `tryCreateNMUdevRule()` was wrongly
concatenating  path component, as path.Join(...)
removes every trailing  slashes to the output string.

Adding unit test to cover the func.

Signed-off-by: Andrea Panattoni <[email protected]>
@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

Copy link
Collaborator

@eoghanlawless eoghanlawless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cgoncalves
Copy link
Contributor

LGTM

@e0ne e0ne merged commit 54c377f into k8snetworkplumbingwg:master Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants