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

Fixing disk path matcher to really match agains DEVPATH of udev #1389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

timdeluxe
Copy link

Hi,
the autoinstall-reference says:

A match spec supports the following keys:
...
path: foo: matches a disk where DEVPATH=foo in udev, supporting globbing (the globbing support distinguishes this from specifying path: foo directly in the disk action)

The code is not looking for DEVPATH, like the other matchers are looking for their udev value. Instead it takes the path in probe_data. In my example that path is just "/dev/sda", but that does not help me matching exactly the disk i want. DEVPATH holds the real device path ("/device/pci..."), where i can better match what i want. Also the code should fit to the documentation.

This will not fix https://bugs.launchpad.net/subiquity/+bug/1952228, but is somewhat related to that.

@mwhudson
Copy link
Collaborator

Hmm I don't really thing we should change the behaviour like that, despite the documentation being, as you point out, wrong. It would be better to evaluate the glob under ['match']['path'] against the actual filesystem and then check we found a block device I think...

@timdeluxe
Copy link
Author

That is a bit behind my horizon. In that case the documentation would need to be adapted as well.
Can't we do it with two steps? First do/merge this fix, so it fits to the docs and second implement your suggestion including a documentation change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants