pfr-manager: stop pfr-manager service if PFR not supported
Add support to stop the PFR manager service if PFR CPLD not available
and pfr not provisioned.
Tested:
1. When PFR CPLD is available and pfr provisioned.
Command: busctl introspect xyz.openbmc_project.PFR.Manager /xyz/
openbmc_project/pfr
Response:
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
xyz.openbmc_project.PFR.Attributes interface - -
.UfmLocked property b false
.UfmProvisioned property b true
.UfmSupport property b true
2. When PFR CPLD not available.
PFR service has been stopped.
Command: busctl tree xyz.openbmc_project.PFR.Manager.service
Response: No objects discovered.
CPLD version is displayed.
Command: GET: https://<BMC_IP/redfish/v1/UpdateService/FirmwareInventory
/cpld_active
Response:
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/
cpld_active",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Other image",
"Id": "cpld_active",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "0.7"
}
3. When PFR CPLD available and PFR not provisioned.
PFR service has been stopped.
Command: busctl tree xyz.openbmc_project.PFR.Manager.service
Response: No objects discovered.
CPLD version is displayed.
Command: GET: https://<BMC_IP/redfish/v1/UpdateService/FirmwareInventory
/cpld_active
Response:
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/
cpld_active",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "Other image",
"Id": "cpld_active",
"Name": "Software Inventory",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": false,
"Version": "44.0-2.0-
508eaac356f28be18791eb6027a663b01dcfbe3101bc2777ccfb9101289b97c5"
}
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: I93945033df6f4381923000973e57f346dad87e30
diff --git a/xyz.openbmc_project.PFR.Manager.service b/xyz.openbmc_project.PFR.Manager.service
index d6a1003..2c80d90 100644
--- a/xyz.openbmc_project.PFR.Manager.service
+++ b/xyz.openbmc_project.PFR.Manager.service
@@ -2,9 +2,11 @@
Description=Daemon manages PFR dbus properties and Event logs
Wants=rsyslog.service
After=rsyslog.service
+Requires=xyz.openbmc_project.EntityManager.service
+After=xyz.openbmc_project.EntityManager.service
[Service]
-Restart=always
+Restart=on-failure
ExecStart=/usr/bin/pfr-manager
RestartSec=5
StartLimitInterval=0