commit | 1fe485cd1154a646fc58b1e9d7c36b173f2c4630 | [log] [tgz] |
---|---|---|
author | ANJALI RAY <anjali.ray@intel.com> | Fri Dec 17 16:41:30 2021 +0000 |
committer | Anjaliintel-21 <anjali.ray@intel.com> | Thu Jan 06 15:58:33 2022 +0000 |
tree | 5078a4a9aa4f6452f8358d7961b38b700b91cc99 | |
parent | 713928b9c25c4639cae02bdc5a82044dfe9af03f [diff] |
Make enableUnit and disableUnit files as optional Disable Unit Files has no effect if the service is already masked. Here are the logs: root:~# systemctl mask xyz.openbmc_project.PCIe Created symlink /etc/systemd/system/xyz.openbmc_project.PCIe.service -> /dev/null. root:~# systemctl disable xyz.openbmc_project.PCIe Unit /etc/systemd/system/xyz.openbmc_project.PCIe.service is masked, ignoring. Thus disabling after masking is not really required. As masking creates a symlink of the unit file in /etc/systemd/system to /dev/null and unmasking removes it. Due to symlink being directed to /dev/null, it would not be possible to start a masked service at all. Disabling removes an existing (proper) symlink in /etc/systemd/system/ <multi-user.target.wants>or<insert-other-relevant-directory>/* to the unit file, and enabling it inserts back the symlink in /etc/systemd/ system/<multi-user.target.wants>or<insert-other-relevant-directory>/*. In case of mctpd, the "enable unit" created an unnecessary symlink in /etc/systemd/system, thus it caused systemd to start mctp service but they are designed to be started by a different service than systemd. Thus, enabling after unmasking is not required for mctp. However, there is an issue here with the service which has its unit file's symlink defined in /etc/systemd/system directory, then, unmasking will remove the symlink altogether. Although no service today has its symlink in /etc/systemd/system, but to work with such possibility we made an optional parameter disableOrEnableUnitFiles i.e. pass it as an argument for the startOrStopService. Also, the correct order needs to be disable the service first and mask it. In the other way around - it needs to be unmasked first and enable it. Tested: Regression testing has been done and all the functionalities are working as intended for all the below tests: 1) Stop,start,enable and disable functionalities for all the MCTP services and PCIe service. 2) For disable test, we disable the service, restart the BMC and check is it still disabled or not. Same with AC cycle. 3) For enable test, we re-enable the service, restart BMC and check whether it is enabled or not and same with AC cycle. Signed-off-by: ANJALI RAY <anjali.ray@intel.com> Change-Id: I9ebd20a4f0ba8c11d6f08a54078550172cb382ea
This component is intended to provide Intel-specific IPMI[3]
command handlers for OpenBMC. These handlers are intended to integrate BMC with servers based on Intel architecture.
intel-ipmi-oem
serves as an extension[1]
to OpenBMC IPMI daemon[2]
. It is compiled as a shared library and intended to both:
Related features provided by the library are grouped in separate source files. Main extensions to vanilla OpenBMC IPMI stack are the following:
[4]