-
Notifications
You must be signed in to change notification settings - Fork 146
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 and predictable resource ids #603
Comments
In order to have a predictable environment variable name you would need a predictable instance id. However this would be difficult for udev as there are no unique identifier (other than node+device path), using something like vendor id/device id for a usb device wouldn't work if you have multiple of them. For the "requesting akri resources" usecase, #565 will surely help you when out. |
That PR would be great! Can't wait to see it merged. I don't want to add further requirements but would it make sense to use the suffix in the env variable only when more than one device is identified by the instance? |
For your first issue you can try to write your |
@febus982 this might be hard, but one thing we could do is always also set |
Issue has been automatically marked as stale due to inactivity for 90 days. Update the issue to remove label, otherwise it will be automatically closed. |
Issue has been automatically marked as stale due to inactivity for 90 days. Update the issue to remove label, otherwise it will be automatically closed. |
Is there a way to have a predictable naming strategy for the the
UDEV_DEVNODE
andUDEV_DEVPATH
environment variables?Using the hash to differentiate the different devices works as long as it's possible to list all the environment variables and parse all of their prefix.
When you want to run containers with existing software (e.g.
ser2net
orzigbee2mqtt
) it's difficult to specify the correct environment variable in the manifest because of the final name being unknown.I am using a single
ser2net
pod for a single USB device configuration and I'd need to pass the exact variable name (or the variable content) to the podspec.Right now I'm using this approach in a container containing the ser2net but it's kind of an hacky one.
Also the same device changes suffix if attached to different nodes, so it's impossible to schedule pods using a separate manifest simply by requesting akri resources.
Is there a way to have predictable resource ids instead of a hash? Or at least an hash that depends only on the physical device information so it remains consistent if attached to different nodes/usb_ports
The text was updated successfully, but these errors were encountered: