project-akri / akri

A Kubernetes Resource Interface for the Edge

Home Page:https://docs.akri.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing a `Configuration` freezes the other ones for that discovery handler

diconico07 opened this issue · comments

Describe the bug
With multiple Configuration for a given discovery handler (only tested udev one, but as the issue is in the agent, they all should be affected), a change to one of the Configuration "freezes" the other ones, they won't get any new device nor delete old ones.

To Reproduce

  1. With akri installed with udev discovery handler activated
  2. Create 2 Configuration items matching for removable devices
  3. Ensure device instances appears
  4. Modify or delete one of the Configuration
  5. Unplug one of devices matching the other Configuration
  6. Nothing happens (instance is not deleted)

Logs (please share snips of applicable logs)

[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::config_action] handle_config - something happened to a configuration
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z INFO  agent::util::config_action] handle_config - added or modified Configuration "udev-keyboard"
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z INFO  agent::util::config_action] handle_config - modified Configuration Some("udev-keyboard")
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::config_action] handle_config_delete - for config ("akri-discovered", "udev-keyboard") telling do_periodic_discovery to end
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::discovery_operator::start_discovery] start_discovery - received message to stop checking connectivity status for configuration udev-keyboard
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::discovery_operator::start_discovery] listen_for_new_discovery_handlers - received message to stop discovery for configuration Some("udev-keyboard")
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::discovery_operator] stop_all_discovery - discovery client for udev discovery handler at endpoint Uds("/var/lib/akri/udev.sock") told to stop
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::discovery_operator] internal_do_discover - received message to stop discovery for endpoint Uds("/var/lib/akri/udev.sock") serving protocol udev
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::discovery_operator] internal_do_discover - received message to stop discovery for endpoint Uds("/var/lib/akri/udev.sock") serving protocol udev
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::config_action] handle_config_delete - for config ("akri-discovered", "udev-keyboard") received message that do_periodic_discovery ended
[pod/akri-agent-daemonset-jb66t/akri-agent] [2023-05-04T12:40:30Z TRACE agent::util::config_action] handle_config_delete - found Instance udev-keyboard-4058be associated with deleted config ("akri-discovered", "udev-keyboard") ... sending message to end list_and_watch
...

Note the 2 lines of received message to stop discovery for endpoint