Skip to content
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

RFE: provide a bluechi-online.target for synchronization on boot #858

Open
6 tasks
engelmi opened this issue Mar 27, 2024 · 0 comments
Open
6 tasks

RFE: provide a bluechi-online.target for synchronization on boot #858

engelmi opened this issue Mar 27, 2024 · 0 comments
Labels
enhancement New feature or request jira Issues that are synced to Jira

Comments

@engelmi
Copy link
Member

engelmi commented Mar 27, 2024

Please describe what you would like to see

BlueChi emits signals on the system D-Bus when nodes are dis-/connecting:
https://github.com/eclipse-bluechi/bluechi/blob/main/data/org.eclipse.bluechi.Node.xml#L224-L232

These can be used by state managers to determine when a node is ready to receive commands via BlueChi. However, currently it is not possible to write systemd services that run as soon as one or all bluechi-agents are connected on the controller machine (the same applies for the agent on its machine).

By defining a custom systemd target which only activates

  • on the controller machine as soon as all agents are connected
  • or on the agent machine as soon as it is connected to the controller

it is possible to use these targets as a synchronization point for other systemd units.

Please describe the solution you'd like

A POC for the controller machine can be seen in this gist:
https://gist.github.com/engelmi/ccd3bf8c0756adebcb73d431940d6c62

For this to work, we'd need to

  • Implement small C program for listening on the node status (on controller machine)
  • Implement small C program for listening on the agent status (on agent machine)
  • Define .target and .service systemd units
  • Add the new binary and systemd units to existing bluechi-controller and bluechi-agent packages in RPM
  • Update documentation
  • Implement integration tests
@engelmi engelmi added enhancement New feature or request backlog This is next up in priority jira Issues that are synced to Jira and removed backlog This is next up in priority labels Mar 27, 2024
@engelmi engelmi modified the milestone: v0.9 Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jira Issues that are synced to Jira
Projects
None yet
Development

No branches or pull requests

1 participant