Skip to content

Commit

Permalink
document how to filter for only devices with devnodes when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-goldenring committed Nov 20, 2020
1 parent 6169c1f commit fa9a27b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/udev-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ To test which devices Akri will discover with a udev rule, you can run the rule
sudo udevadm control --reload
sudo udevadm trigger
```
1. List the devices that have been tagged, which Akri will discover.
1. List the devices that have been tagged, which Akri will discover. Akri will only discover devices with device nodes (devices within the `/dev` directory). These device node paths will be mounted into broker Pods so the brokers can utilize the devices.
```sh
udevadm trigger --verbose --dry-run --type=devices --tag-match=akri_tag
udevadm trigger --verbose --dry-run --type=devices --tag-match=akri_tag | xargs -l bash -c 'if [ -e $0/dev ]; then echo $0/dev; fi'
```
1. Explore the attributes of each device in order to decide how to refine your udev rule.
```sh
udevadm trigger --verbose --dry-run --type=devices --tag-match=akri_tag | xargs -l bash -c 'if [ -e $0/dev ]; then echo $0; fi' | xargs -l bash -c 'udevadm info --path=$0 --attribute-walk' | less
```
1. Modify the rule as needed, being sure to reload and trigger the rules each time.
1. Remove the tag from the devices -- note how `+=` turns to `-=` -- and reload and trigger the udev rules. Alternatively, if you are trying to discover devices with fields that Akri does not yet support, such as `ATTRS`, you could leave the tag and add it to the rule in your Configuration with `TAG=="akri_tag"`.
Expand Down

0 comments on commit fa9a27b

Please sign in to comment.