Comment 14 for bug 2023243

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2023-08-30 15:56 EDT-------
We need to add commit "powerpc-utils/devtree: Parse 'ibm,drc-info' property" (b0586b5) in order for drmgr to add a slot and remove a slot.

I believe this is because Canonical has backported kernel patch "powerpc/pseries: Enable support for ibm,drc-info property" to the latest kernel level in Focal. I believe the slots were not being added correctly and removed correctly due to parsing failures.

---

In addition, I want to recommend we add commit "drmgr: don't bother with hp children for non PCI slots" (60d9f54). When removing a slot there are some harmless error messages:

root@novap9zz:/home/neo# /home/neo/powerpc-utils-1.3.4-patched/src/drmgr/drmgr -c slot -s 'U9009.42A.13C647W-V1-C5' -r
Validating I/O DLPAR capability...yes.
failed to open /sys/bus/pci/slots/U9009.42A.13C647W-V1-C5/power: No such file or directory
failed to disable hotplug children

Non-pci devices do not have hotpluggable children. These error messages could lead a user to open another bug.

---

After applying both powerpc-utils commits I listed above and building, drmgr appears to work correctly:

root@novap9zz:/home/neo# /home/neo/powerpc-utils-1.3.4-patched/src/drmgr/drmgr -c slot -s 'U9009.42A.13C647W-V1-C5' -a
Validating I/O DLPAR capability...yes.
root@novap9zz:/home/neo# tail -n 31 /var/log/drmgr
########## Aug 30 19:15:04 2023 ##########
drmgr: -c slot -s U9009.42A.13C647W-V1-C5 -a
Validating I/O DLPAR capability...yes.
Getting node types 0x00000003
Could not find DRC property group in path: /proc/device-tree/pci@800000020000017.
Could not find DRC property group in path: /proc/device-tree/ibm,platform-keystore.
Could not find DRC property group in path: /proc/device-tree/memory@0.
Could not find DRC property group in path: /proc/device-tree/pci@800000020000017.
Could not find DRC property group in path: /proc/device-tree/ibm,platform-facilities.
Could not find DRC property group in path: /proc/device-tree/interrupt-controller@0.
Could not find DRC property group in path: /proc/device-tree/rtas.
Could not find DRC property group in path: /proc/device-tree/ibm,serial.
Could not find DRC property group in path: /proc/device-tree/options.
Could not find DRC property group in path: /proc/device-tree/openprom.
Could not find DRC property group in path: /proc/device-tree/ibm,dynamic-reconfiguration-memory.
Could not find DRC property group in path: /proc/device-tree/interrupt-controller@800000025000017.
Could not find DRC property group in path: /proc/device-tree/event-sources.
Could not find DRC property group in path: /proc/device-tree/aliases.
Could not find DRC property group in path: /proc/device-tree/packages.
Could not find DRC property group in path: /proc/device-tree/chosen.
Acquiring drc index 0x30000005
get-sensor for 30000005: 0, 2
Setting allocation state to 'alloc usable'
Setting indicator state to 'unisolate'
Configuring connector for drc index 30000005
Adding device-tree node /proc/device-tree/vdevice/vty-server@30000005
ofdt update: add_node /vdevice/vty-server@30000005 name 11 vty-server
Getting node types 0x00000003
Could not find DRC property group in path: /proc/device-tree/pci@800000020000017.
performing kernel op for U9009.42A.13C647W-V1-C5, file is /sys/bus/pci/slots/control/add_slot
########## Aug 30 19:15:04 2023 ##########

root@novap9zz:/home/neo# /home/neo/powerpc-utils-1.3.4-patched/src/drmgr/drmgr -c slot -s 'U9009.42A.13C647W-V1-C5' -r
Validating I/O DLPAR capability...yes.
root@novap9zz:/home/neo# tail -n 17 /var/log/drmgr
########## Aug 30 19:15:19 2023 ##########
drmgr: -c slot -s U9009.42A.13C647W-V1-C5 -r
Validating I/O DLPAR capability...yes.
Getting node types 0x00000003
Could not find DRC property group in path: /proc/device-tree/pci@800000020000017.
get-sensor for 30000005: 0, 1
The sensor-state of drc_index 0x30000005 is 1
performing kernel op for U9009.42A.13C647W-V1-C5, file is /sys/bus/pci/slots/control/remove_slot
Releasing drc index 0x30000005
get-sensor for 30000005: 0, 1
Setting isolation state to 'isolate'
Setting allocation state to 'alloc unusable'
get-sensor for 30000005: 0, 2
drc_index 30000005 sensor-state: 2
Resource is not available to the partition.
Removing device-tree node /proc/device-tree/vdevice/vty-server@30000005
########## Aug 30 19:15:20 2023 ##########

---

You can see drmgr that is installed on the system does not add a slot correctly:

root@novap9zz:/home/neo# drmgr -c slot -s 'U9009.42A.13C647W-V1-C5' -a
Validating I/O DLPAR capability...yes.
There are no DR capable slots on this system
Could not find drc index for U9009.42A.13C647W-V1-C5, unable to add theslot.
root@novap9zz:/home/neo# tail -n 31 /var/log/drmgr

########## Aug 30 19:35:01 2023 ##########
drmgr: -c slot -s U9009.42A.13C647W-V1-C5 -a
Validating I/O DLPAR capability...yes.
Getting node types 0x00000003
Could not find DRC property group in path: /proc/device-tree/pci@800000020000017.
Could not find DRC property group in path: /proc/device-tree/vdevice.
There are no DR capable slots on this system
Could not find DRC property group in path: /proc/device-tree.
Could not find drc index for U9009.42A.13C647W-V1-C5, unable to add theslot.
########## Aug 30 19:35:01 2023 ##########

It also does not remove a slot correctly:

root@novap9zz:/home/neo# /home/neo/powerpc-utils-1.3.4-patched/src/drmgr/drmgr -c slot -s 'U9009.42A.13C647W-V1-C5' -a
Validating I/O DLPAR capability...yes.
root@novap9zz:/home/neo# drmgr -c slot -s 'U9009.42A.13C647W-V1-C5' -r
Validating I/O DLPAR capability...yes.
There are no DR capable slots on this system
U9009.42A.13C647W-V1-C5 does not exist
root@novap9zz:/home/neo# tail -n 10 /var/log/drmgr

########## Aug 30 19:37:09 2023 ##########
drmgr: -c slot -s U9009.42A.13C647W-V1-C5 -r
Validating I/O DLPAR capability...yes.
Getting node types 0x00000003
Could not find DRC property group in path: /proc/device-tree/pci@800000020000017.
Could not find DRC property group in path: /proc/device-tree/vdevice.
There are no DR capable slots on this system
U9009.42A.13C647W-V1-C5 does not exist
########## Aug 30 19:37:09 2023 ##########

---

In summary, I believe we need to add the following commits to powerpc-utils 1.3.4 in Focal:

b0586b5 powerpc-utils/devtree: Parse 'ibm,drc-info' property
60d9f54 drmgr: don't bother with hp children for non PCI slots

Both of these commits apply cleanly to the current powerpc-utils version in Focal, and there are no conflicts with the other patches that Canonical applies.