checkPfrPlatform: Fix for reading the Baseboard name
Issue: pfr-manager service is broken due to the presence of multiple
boards in closed chassis wilsoncity.
Fix: checkPfrPlatform.sh is modified to read the Baseboard from the
interface xyz.openbmc_project.Inventory.Item.Board.Motherboard where we
have only one board.
Tested:
1. Test results on cooper city 2s.
a. Start the pfr manager service when pfr-not provisioned.
Command: systemctl restart xyz.openbmc_project.PFR.Manager.service
Response: Journalctl logs.
Jun 28 15:54:40 intel-obmc systemd[1]: Started Daemon manages PFR dbus
properties and Event logs.
Jun 28 15:54:41 intel-obmc checkPfrPlatform.sh[6878]: Baseboard is=
/xyz/openbmc_project/inventory/system/board/CPC_Baseboard
Jun 28 15:54:41 intel-obmc checkPfrPlatform.sh[6878]: PFR not supported
on this platforms and so not starting PFR manager service.
Jun 28 15:54:41 intel-obmc systemd[1]: xyz.openbmc_project.PFR.Manager.
service: Succeeded.
Command: busctl tree xyz.openbmc_project.PFR.Manager
Response:
Failed to introspect object / of service xyz.openbmc_project.PFR.Manager
: The name is not activatable
No objects discovered.
b. start the pfr-manager when pfr-provisioned.
Command: systemctl restart xyz.openbmc_project.PFR.Manager.service
Response: Journalctl logs.
Jul 06 08:03:43 intel-obmc systemd[1]: Started Daemon manages PFR dbus
properties and Event logs.
Jul 06 08:03:44 intel-obmc checkPfrPlatform.sh[7032]: Baseboard is=
/xyz/openbmc_project/inventory/system/board/CPC_Baseboard
Jul 06 08:03:45 intel-obmc checkPfrPlatform.sh[7032]: Starting PFR
manager service
Jul 06 08:03:45 intel-obmc pfr-manager[7048]: Platform firmware panic
occurred.
Jul 06 08:03:45 intel-obmc pfr-manager[7048]: Platform firmware
recovery occurred.
Jul 06 08:03:45 intel-obmc pfr-manager[7048]: Platform firmware
resiliency error occurred.
Jul 06 08:03:46 intel-obmc pfr-manager[7048]: Intel PFR service started
successfully
Jul 06 08:03:46 intel-obmc pfr-manager[7048]: PFR: BMC boot completed.
Setting checkpoint 9.
Jul 06 08:03:46 intel-obmc pfr-manager[7048]: Successfully set the PFR
CPLD checkpoint 9.
Command: busctl tree xyz.openbmc_project.PFR.Manager
Response:
└─/xyz
└─/xyz/openbmc_project
├─/xyz/openbmc_project/pfr
└─/xyz/openbmc_project/software
├─/xyz/openbmc_project/software/bios_recovery
├─/xyz/openbmc_project/software/bmc_recovery
├─/xyz/openbmc_project/software/cpld_active
└─/xyz/openbmc_project/software/cpld_recovery
2. Test results on closed chassis wilson city
a. Start the pfr manager service when pfr-not provisioned.
Command: systemctl restart xyz.openbmc_project.PFR.Manager.service
Response: Journalctl logs.
Jan 01 01:18:50 intel-obmc systemd[1]: Started Daemon manages PFR dbus
properties and Event logs.
Jan 01 01:18:51 intel-obmc checkPfrPlatform.sh[2961]: Baseboard is=
/xyz/openbmc_project/inventory/system/board/WC_Baseboard
Jan 01 01:18:52 intel-obmc checkPfrPlatform.sh[2961]: PFR not supported
on this platforms and so not starting PFR manager service.
Jan 01 01:18:52 intel-obmc systemd[1]: xyz.openbmc_project.PFR.Manager.
service: Succeeded.
Command: busctl tree xyz.openbmc_project.PFR.Manager
Response:
Failed to introspect object / of service xyz.openbmc_project.PFR.Manager
: The name is not activatable
No objects discovered.
b. start the pfr-manager when pfr-provisioned.
yet to test: will update the results soon.
3. Test results on open chassis wilson city.
a. Start the pfr manager service when pfr-not provisioned.
Command: systemctl restart xyz.openbmc_project.PFR.Manager.service
Response: Journalctl logs.
Jul 13 12:06:56 intel-obmc systemd[1]: Started Daemon manages PFR dbus
properties and Event logs.
Jul 13 12:06:56 intel-obmc checkPfrPlatform.sh[4559]: Baseboard is=
/xyz/openbmc_project/inventory/system/board/WC_Baseboard
Jul 13 12:06:57 intel-obmc checkPfrPlatform.sh[4559]: PFR not supported
on this platforms and so not starting PFR manager service.
Jul 13 12:06:57 intel-obmc systemd[1]: xyz.openbmc_project.PFR.Manager.
service: Succeeded.
Command: busctl tree xyz.openbmc_project.PFR.Manager
Response:
Failed to introspect object / of service xyz.openbmc_project.PFR.Manager
: The name is not activatable
No objects discovered.
b. start the pfr-manager when pfr-provisioned.
yet to test: will update the results soon.
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: If5df091424c9fda926732bea37af1ccffe0038f6
diff --git a/checkPfrPlatform.sh b/checkPfrPlatform.sh
index fe5ae40..7d514c9 100644
--- a/checkPfrPlatform.sh
+++ b/checkPfrPlatform.sh
@@ -16,13 +16,14 @@
return 1
}
+
#Read board name
counter=0
-board=$(busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias "/xyz/openbmc_project/inventory" 0 2 "xyz.openbmc_project.Inventory.Item.Board" "xyz.openbmc_project.Inventory.Item.Chassis" | cut -b 7- | sed 's/.$//')
+board=$(busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias "/xyz/openbmc_project/inventory" 0 1 "xyz.openbmc_project.Inventory.Item.Board.Motherboard" | cut -b 7- | sed 's/.$//')
-while [ -z $board ]
+while [ -z "$board" ]
do
- board=$(busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias "/xyz/openbmc_project/inventory" 0 2 "xyz.openbmc_project.Inventory.Item.Board" "xyz.openbmc_project.Inventory.Item.Chassis" | cut -b 7- | sed 's/.$//')
+ board=$(busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTreePaths sias "/xyz/openbmc_project/inventory" 0 1 "xyz.openbmc_project.Inventory.Item.Board.Motherboard" | cut -b 7- | sed 's/.$//')
if [ $counter -eq 5 ]
then
echo "Unable to get board name"
@@ -32,6 +33,8 @@
sleep 10
done
+echo "Baseboard is=$board"
+
if pfr_active_mode
then
echo "Starting PFR manager service"