# Akri Bug Bash – April 2023 ###### tags: `Bug Bash` The goal of this bug bash is to discover any bugs before Akri creates a new release. This release contains the following major changes: - Enable mounting connectivity information for multiple devices/instances in a pod - Grouping of udev devices based on parent/child relation - Added support for devicespec usage for udev - Mount udev devpath in Akri brokers Other release notes: - Updated OPC UA demo with OPC PLC containers - Fixes for OPC UA discoveryURL (DNS/IP) - Added nodeSelector to specify where Agent is deployed - ListAndWatch only sends device list when it is updated/changed - Support for K8s v1.26 - Upgraded Ubuntu build agents to latest version - Added more securityContext to ensure Helm templates use the most restrictive setting Please leave a comment in the [scenario outcomes](#Scenario-Outcomes) section with the scenario's you tested and whether it was successful. If you find issues, please create an issue on Akri's [GitHub](https://github.com/project-akri/akri) and comment it in the [discovered issues](#Discovered-Issues-or-Enhancements) section. As always, feel free to post any questions on Akri's [Slack](https://kubernetes.slack.com/messages/akri). ## Background Akri is an Open Source project that automates the discovery and usage of IoT devices around Kubernetes clusters on the Edge. Akri can automatically deploy user-provided workloads to the discovered devices. It handles device appearance and disappearance, allowing device deployments to expand and contract and enabling high resource utilization.     ## Setting Up an Environment Akri is regularly tested on K3s, MicroK8s, and standard Kubernetes clusters versioned 1.23-1.26 (see [previous release](https://github.com/project-akri/akri/releases) for list of exact versions tested) with Ubuntu 22.04 node. While we only test on these K8s distributions, feel free to try it out on the distribution and Linux OS of your choice. Here are some examples of what you can do: - Hyper-V Ubuntu 20.04 VM - Set up Linux VM with cloud provider - Try out Akri on a managed Kubernetes service ## Scenarios   Choose any of the following scenarios (none are pre-requisite of the others). This release has changes in the udev and OPC UA discovery handlers, so we will focus on these scenarios. NOTE: Make sure to use the **akri-dev chart** (`helm install akri akri-helm-charts/akri-dev`) when installing Akri with Helm. If you have previously installed akri, be sure to run `helm repo update`. ### Scenario A: Test the udev discovery handler (grouping of devices) Connect udev devices (i.e. keyboard, touchpad, etc.) and deploy the udev discovery handler set the configuration parameter `udev.configuration.discoveryDetails.groupRecursive=true`. This should group the udev devices if they share the same parent/child relation. To group a USB device nodes the easiest udev rule to use is `ENV{ID_SERIAL}=="xxx"`, the exact value will depends on your hardware. You should see a single discovered instance with multiple device nodes under "Broker Properties" when you run `kubectl describe akrii`. ### Scenario B: Test the unprivileged broker pod scenario with udev Set `udev.configuration.brokerPod.securityContext.privileged=false` when applying the udev configuration. See if the broker pod is able to properly access the udev devices in this case. ### Scenario C: Test the OPC UA discovery handler Option 1: Follow the instructions with our new doc for running and discovering OPC PLC containers [here](https://docs.akri.sh/demos/opc-thermometer-demo). Option 2: Download the [Prosys OPC UA Simulation Server](https://downloads.prosysopc.com/opc-ua-simulation-server-downloads.php), run a simulated server, and see if the OPC UA discovery handler will discover the server with the discoveryURL copied from Prosys. ### Scenario D: Documentation Walkthrough It would be great to walk through the documentation with the bug bash and note which changes to docs we would need to make. There are some pending PRs on the documentations as well that go with the release. ## Discovered Issues or Enhancements If you have discovered any issues, bugs or enhancements, please write them here and feel free to post them in our Slack. Additionally, please file a bug on [Github Issues](https://github.com/project-akri/akri/issues/new?assignees=&labels=bug&template=bug_report.md&title=) as you see fit. ## Scenario Outcomes Please write the environment you used (Kubernetes distro/version and VM), the scenarios you tested, and whether it was a success or had issues. | Environment | Scenario | Success/Issue | |--------------|-----------|---------------| | K3s v1.24.6, AKS Edge Essentials | OPC discovery handler with 2 OPC PLC servers and 1 Prosys OPC UA server | Success | | K3s v1.24.12, Bare metal openSuse MicroOS | Udev device grouping with non privileged broker | Success | | | | | | | | | | | | |