From 66c42370e2d2c246a405bce79066e23e59be86f1 Mon Sep 17 00:00:00 2001 From: Nicolas Belouin Date: Tue, 28 Feb 2023 10:53:15 +0100 Subject: [PATCH 1/2] udev: Add devnode to mounts not devpath 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 --- .../udev/src/discovery_handler.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/discovery-handlers/udev/src/discovery_handler.rs b/discovery-handlers/udev/src/discovery_handler.rs index 77f44243c..e3e46e5ed 100644 --- a/discovery-handlers/udev/src/discovery_handler.rs +++ b/discovery-handlers/udev/src/discovery_handler.rs @@ -84,20 +84,23 @@ impl DiscoveryHandler for DiscoveryHandlerImpl { .into_iter() .map(|(path, node)| { let mut properties = std::collections::HashMap::new(); + let mut mounts = Vec::new(); if let Some(devnode) = node { - properties.insert(super::UDEV_DEVNODE_LABEL_ID.to_string(), devnode); + properties + .insert(super::UDEV_DEVNODE_LABEL_ID.to_string(), devnode.clone()); + mounts.push(Mount { + container_path: devnode.clone(), + host_path: devnode, + read_only: true, + }); } properties.insert(super::UDEV_DEVPATH_LABEL_ID.to_string(), path.clone()); - let mount = Mount { - container_path: path.clone(), - host_path: path.clone(), - read_only: true, - }; + // TODO: use device spec Device { id: path, properties, - mounts: vec![mount], + mounts, device_specs: Vec::default(), } }) From b8aba59de474f89299f6320e44cf2e333dbf8097 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 2 Mar 2023 00:41:58 +0000 Subject: [PATCH 2/2] Update patch version Signed-off-by: github-actions[bot] --- Cargo.lock | 28 +++++++++---------- agent/Cargo.toml | 2 +- controller/Cargo.toml | 2 +- deployment/helm/Chart.yaml | 4 +-- .../debug-echo-discovery-handler/Cargo.toml | 2 +- .../onvif-discovery-handler/Cargo.toml | 2 +- .../opcua-discovery-handler/Cargo.toml | 2 +- .../udev-discovery-handler/Cargo.toml | 2 +- discovery-handlers/debug-echo/Cargo.toml | 2 +- discovery-handlers/onvif/Cargo.toml | 2 +- discovery-handlers/opcua/Cargo.toml | 2 +- discovery-handlers/udev/Cargo.toml | 2 +- discovery-utils/Cargo.toml | 2 +- samples/brokers/udev-video-broker/Cargo.toml | 2 +- shared/Cargo.toml | 2 +- version.txt | 2 +- webhooks/validating/configuration/Cargo.toml | 2 +- 17 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3bf3d3b4..e00f892d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,7 +333,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "agent" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-debug-echo", "akri-discovery-utils", @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "akri-debug-echo" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "akri-shared", @@ -421,7 +421,7 @@ dependencies = [ [[package]] name = "akri-discovery-utils" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-shared", "anyhow", @@ -443,7 +443,7 @@ dependencies = [ [[package]] name = "akri-onvif" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "akri-shared", @@ -471,7 +471,7 @@ dependencies = [ [[package]] name = "akri-opcua" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "akri-shared", @@ -495,7 +495,7 @@ dependencies = [ [[package]] name = "akri-shared" -version = "0.9.2" +version = "0.9.3" dependencies = [ "anyhow", "async-trait", @@ -524,7 +524,7 @@ dependencies = [ [[package]] name = "akri-udev" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "anyhow", @@ -992,7 +992,7 @@ checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" [[package]] name = "controller" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-shared", "anyhow", @@ -1202,7 +1202,7 @@ dependencies = [ [[package]] name = "debug-echo-discovery-handler" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-debug-echo", "akri-discovery-utils", @@ -2433,7 +2433,7 @@ checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" [[package]] name = "onvif-discovery-handler" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "akri-onvif", @@ -2483,7 +2483,7 @@ dependencies = [ [[package]] name = "opcua-discovery-handler" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "akri-opcua", @@ -4144,7 +4144,7 @@ dependencies = [ [[package]] name = "udev-discovery-handler" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-discovery-utils", "akri-udev", @@ -4155,7 +4155,7 @@ dependencies = [ [[package]] name = "udev-video-broker" -version = "0.9.2" +version = "0.9.3" dependencies = [ "akri-shared", "env_logger", @@ -4425,7 +4425,7 @@ dependencies = [ [[package]] name = "webhook-configuration" -version = "0.9.2" +version = "0.9.3" dependencies = [ "actix", "actix-rt 2.7.0", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index ade9cb1f4..f44e47650 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agent" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring ", ""] edition = "2018" rust-version = "1.63.0" diff --git a/controller/Cargo.toml b/controller/Cargo.toml index 869e5080e..de8017972 100644 --- a/controller/Cargo.toml +++ b/controller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "controller" -version = "0.9.2" +version = "0.9.3" authors = ["", ""] edition = "2018" rust-version = "1.63.0" diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml index 5adb06743..2eddddca0 100644 --- a/deployment/helm/Chart.yaml +++ b/deployment/helm/Chart.yaml @@ -15,9 +15,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.9.2 +version: 0.9.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.9.2 +appVersion: 0.9.3 diff --git a/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml b/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml index 30a4be94d..5686a59a0 100644 --- a/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/debug-echo-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "debug-echo-discovery-handler" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handler-modules/onvif-discovery-handler/Cargo.toml b/discovery-handler-modules/onvif-discovery-handler/Cargo.toml index bf1a6fb4a..4d1f342f1 100644 --- a/discovery-handler-modules/onvif-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/onvif-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "onvif-discovery-handler" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handler-modules/opcua-discovery-handler/Cargo.toml b/discovery-handler-modules/opcua-discovery-handler/Cargo.toml index dbf7c7dd4..b6e6cdacf 100644 --- a/discovery-handler-modules/opcua-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/opcua-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "opcua-discovery-handler" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handler-modules/udev-discovery-handler/Cargo.toml b/discovery-handler-modules/udev-discovery-handler/Cargo.toml index 8f5e22b83..16e840bd6 100644 --- a/discovery-handler-modules/udev-discovery-handler/Cargo.toml +++ b/discovery-handler-modules/udev-discovery-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "udev-discovery-handler" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handlers/debug-echo/Cargo.toml b/discovery-handlers/debug-echo/Cargo.toml index 7c504443c..b24e57afb 100644 --- a/discovery-handlers/debug-echo/Cargo.toml +++ b/discovery-handlers/debug-echo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-debug-echo" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handlers/onvif/Cargo.toml b/discovery-handlers/onvif/Cargo.toml index 41422c643..513774bb9 100644 --- a/discovery-handlers/onvif/Cargo.toml +++ b/discovery-handlers/onvif/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-onvif" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handlers/opcua/Cargo.toml b/discovery-handlers/opcua/Cargo.toml index 477dbda5f..e79e219b7 100644 --- a/discovery-handlers/opcua/Cargo.toml +++ b/discovery-handlers/opcua/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-opcua" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-handlers/udev/Cargo.toml b/discovery-handlers/udev/Cargo.toml index 74de79606..53cd8c420 100644 --- a/discovery-handlers/udev/Cargo.toml +++ b/discovery-handlers/udev/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-udev" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/discovery-utils/Cargo.toml b/discovery-utils/Cargo.toml index d79bcee77..725ff8e64 100644 --- a/discovery-utils/Cargo.toml +++ b/discovery-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-discovery-utils" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring "] edition = "2018" rust-version = "1.63.0" diff --git a/samples/brokers/udev-video-broker/Cargo.toml b/samples/brokers/udev-video-broker/Cargo.toml index 094f4ff10..c88337b55 100644 --- a/samples/brokers/udev-video-broker/Cargo.toml +++ b/samples/brokers/udev-video-broker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "udev-video-broker" -version = "0.9.2" +version = "0.9.3" authors = ["Kate Goldenring ", ""] edition = "2018" rust-version = "1.63.0" diff --git a/shared/Cargo.toml b/shared/Cargo.toml index ccbbe1375..9b921f019 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "akri-shared" -version = "0.9.2" +version = "0.9.3" authors = [""] edition = "2018" rust-version = "1.63.0" diff --git a/version.txt b/version.txt index 2003b639c..965065db5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.9.2 +0.9.3 diff --git a/webhooks/validating/configuration/Cargo.toml b/webhooks/validating/configuration/Cargo.toml index bccef0459..98113991e 100644 --- a/webhooks/validating/configuration/Cargo.toml +++ b/webhooks/validating/configuration/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "webhook-configuration" -version = "0.9.2" +version = "0.9.3" authors = ["DazWilkin "] edition = "2018" rust-version = "1.63.0"