commit | cb0f134070e356143a3f8c43a779cb52753acbe4 | [log] [tgz] |
---|---|---|
author | Andrew Geissler <geissonator@yahoo.com> | Tue Apr 22 16:08:27 2025 -0500 |
committer | Andrew Geissler <geissonator@yahoo.com> | Tue Aug 26 16:20:56 2025 -0500 |
tree | 86a3c838533e7b8316040f7ab062de0f92da8dd6 | |
parent | 67e4186a296775d592884584863050323e118a9b [diff] |
write service and socket values to file This commit persists the user settings associated with the services that the srvcfg-mgr monitors and controls. The current design is that srvcfg-mgr queries systemd on startup for this information and relies on that for its persistence needs. There are cases though where the information from systemd may not match the users expectations. For example if someone in debug where to use systemctl to enable or disable a service, the srvcfg-mgr would end up using that as its persistent setting after a bmc reboot. This commit ensures all settings that come across the official d-bus interface into the srvcfg-mgr are written to a persistent file. Future commits in this series will utilize these persistent files on startup to ensure the systemd services and sockets match the expectations from these files. Due to the change in behavior of the current design, this new persistent feature will be enable via a compile feature. By default it will be enabled in this repository for CI purposes but in the bitbake recipe it will be disabled by default to keep with the existing design. Tested: - Booted up fresh QEMU and confirmed /var/lib/service-config-manager/ had all of the expected files ``` root@romulus:~# ls -1 /var/lib/service-config-manager/ bmcweb dropbear obmc-console-ssh obmc-console@ttyS0 obmc-console@ttyVUART0 phosphor-ipmi-net@eth0 phosphor_usb_code_update srvcfg-mgr.json ``` - Changed a service setting over d-bus and confirmed change showed up in the associated file - Disabled the compile feature and verified no new files were written to /var/lib/service-config-manager/ Change-Id: Iedd3b9434b742699d9223deb0a16645eb7e55d72 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
The service config manager provides a D-Bus interface to manage BMC services as described by the service management D-Bus interfaces.
The configuration settings are intended to persist across BMC reboots.
An example use case for this service is BMCWeb's implementation of the Redfish NetworkProtocol schema.
Implementation details are described in the D-Bus interface README.
The service config manager generally makes configuration changes to systemd
units via D-Bus interfaces.
The design pattern to add new services or controls is:
Running
and Enabled
properties of a service: