Eclipse BlueChi is a systemd service controller intended for multi-node environments with a predefined number of nodes and with a focus on highly regulated ecosystems such as those requiring functional safety.
Based on how systemctl list-units works, it is not possible to query services that aren't reference in any way (e.g. via RequiredBy = multi-user.target) or are active/failed.
systemd's ListUnitFiles API can be used to address this issue and return a list of files. So in order to enable a more complete view of available services, a new API for listing unit files should be added to BlueChi.
Please describe the solution you'd like
[x] bluechi-controller: Add new API method on public DBus and delegate to bluechi-agent
[x] bluechi-agent: Add new API on internal DBus and delegate to systemd bus
[x] bluechictl: Add new command list-unit-files [file-name-pattern] where pattern can be used to filter by file name glob (similar to bluechictls list-units)
For example, systemd services generated from quadlet files are not visible via ListUnits method (based on how systemctl list-units works). Using list-unit-files such service files can be queried as well.
Please describe what you would like to see
This RFE resulted from https://github.com/eclipse-bluechi/bluechi/issues/887.
Based on how systemctl list-units works, it is not possible to query services that aren't reference in any way (e.g. via
RequiredBy = multi-user.target
) or are active/failed. systemd's ListUnitFiles API can be used to address this issue and return a list of files. So in order to enable a more complete view of available services, a new API for listing unit files should be added to BlueChi.Please describe the solution you'd like
bluechi-controller
: Add new API method on public DBus and delegate tobluechi-agent
bluechi-agent
: Add new API on internal DBus and delegate to systemd busbluechictl
: Add new commandlist-unit-files [file-name-pattern]
where pattern can be used to filter by file name glob (similar to bluechictls list-units)ListUnitsRequest
andListUnitFilesRequest
by unifying these structs and the respective functions (see this comment) (https://github.com/eclipse-bluechi/bluechi/pull/923)Please describe your use case
For example, systemd services generated from quadlet files are not visible via
ListUnits
method (based on how systemctl list-units works). Using list-unit-files such service files can be queried as well.