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

udev: Add devnode to mounts not devpath #562

Merged
merged 2 commits into from Apr 4, 2023

Conversation

diconico07
Copy link
Contributor

@diconico07 diconico07 commented Feb 28, 2023

What this PR does / why we need it:
The udev discovery handler currently adds the udev devpath to the device mounts, this doesn't allow access to the devnode and moreover said devpath is not a correct absolute path (it is relative to /sys).

This PR changes the current behavior to add the devnode (if any) to the device mounts instead of the (wrong) sysfs devpath.

Special notes for your reviewer:

If applicable:

  • this PR has an associated PR with documentation in akri-docs
  • this PR contains unit tests
  • added code adheres to standard Rust formatting (cargo fmt)
  • code builds properly (cargo build)
  • code is free of common mistakes (cargo clippy)
  • all Akri tests succeed (cargo test)
  • inline documentation builds (cargo doc)
  • all commits pass the DCO bot check by being signed off -- see the failing DCO check for instructions on how to retroactively sign commits

The udev discovery handler currently adds the udev devpath to
the device mounts, this doesn't allow access to the devnode and moreover
said devpath is not a correct absolute path (it is relative to `/sys`).

This commit changes the current behavior to add the devnode (if any) to
the device mounts instead of the (wrong) sysfs devpath.

Signed-off-by: Nicolas Belouin <nicolas.belouin@suse.com>
@kate-goldenring
Copy link
Contributor

@diconico07 great catch! This was caused by my changes here not keeping the mounting of the devnode consistent: #534.

@kate-goldenring
Copy link
Contributor

/version patch

@github-actions github-actions bot added the version/patch Patch version change is needed label Mar 2, 2023
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@kate-goldenring
Copy link
Contributor

I am not sure why e2e tests are not being kicked off

@diconico07
Copy link
Contributor Author

I am not sure why e2e tests are not being kicked off

From what I read in run-test-cases.yml it doesn't trigger for changes limited to discovery handlers (as the e2e tests are only using the debugEcho handler this doesn't seems wrong)

@yujinkim-msft yujinkim-msft merged commit 8d08f90 into project-akri:main Apr 4, 2023
@diconico07 diconico07 deleted the fix_mount_path branch April 17, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version/patch Patch version change is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants