commit | 51ce6e39d3f2769cbec9f56b6256c5df750a3011 | [log] [tgz] |
---|---|---|
author | Andrew Geissler <geissonator@yahoo.com> | Mon Apr 28 15:53:30 2025 -0500 |
committer | Andrew Geissler <geissonator@yahoo.com> | Tue Aug 26 16:20:59 2025 -0500 |
tree | b54b3c854fffe9fd1db67f26528b43844ca7890f | |
parent | cb0f134070e356143a3f8c43a779cb52753acbe4 [diff] |
use settings from persistent files if available If persistent files are available for a service then utilize it for that service. If the setting in the file does not match what system has reported, then make the change to systemd to match the setting. This commit officially moves service-config-manager over to utilizing persistent files for the users service settings if the appropriate compile feature is enabled (persist-settings-to-file). One reason for doing this is to facilitate the redundant BMC design point [1]. Backing the service settings in a persistent file allows an easy mechanism to synchronize the service-config-manager settings from an Active BMC to a Passive. Backup and Restore could also make use of this. This feature seems to come up every once in a while as a wanted function. Having persistent files with clear true/false settings will be much easier to manage then trying to synchronize the complex systemd service/socket details from the filesystem. [1]: https://gerrit.openbmc.org/c/openbmc/docs/+/70233 Tested: - Verified the basics of enabling and disabling IPMI and SSH via dbus and Redfish (curl) - Verified if the settings in the persistent files do not match what systemd reports on startup, the srvcfg-manager will apply the settings from the files - Verified that if there is an error loading the file then it is deleted and a fresh one is created - Verified that if the version in the file is not 1 then it is deleted and a fresh one is created - Verified that when the new feature is not enabled that no files are created or loaded Change-Id: Iccc29d99d88c1b0700106e70c9eacb40b93b2817 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: