Change in vdsm[master]: ppc64: unable to list online logical CPUs

kmp at linux.vnet.ibm.com kmp at linux.vnet.ibm.com
Fri Mar 20 15:07:43 UTC 2015


Madhu Pavan has uploaded a new change for review.

Change subject: ppc64: unable to list online logical CPUs
......................................................................

ppc64: unable to list online logical CPUs

This feature is enabled in VDSM 4.16.7. It is not supported in
ppc64 architecture. It leads to unsuccessful installation of host.

Change-Id: Ia5c4bdbc00217516ba3b7e361ab28e409c507baa
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1204196
Signed-off-by: Madhu Pavan Kothapally <kmp at linux.vnet.ibm.com>
---
M vdsm/ppc64HardwareInfo.py
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/38983/1

diff --git a/vdsm/ppc64HardwareInfo.py b/vdsm/ppc64HardwareInfo.py
index 23f7388..8097e90 100644
--- a/vdsm/ppc64HardwareInfo.py
+++ b/vdsm/ppc64HardwareInfo.py
@@ -70,6 +70,7 @@
     corePS = None
     threadsPC = None
     sockets = None
+    onlineCpus = []
 
     for line in capabilities.splitlines():
         if line.strip() == '':
@@ -82,11 +83,27 @@
             threadsPC = int(value)
         elif key == 'Core(s) per socket':
             corePS = int(value)
+        elif key == 'On-line CPU(s) list':
+            if value.find(',') == -1 and value.find('-') == -1:
+                onlineCpus.append(unicode(value))
+            elif value.find(',') == -1:
+                cpuindex = cpusets.split('-')
+                for cpu in range(int(cpuindex[0]), int(cpuindex[1])+1):
+                    onlineCpus.append(unicode(cpu))
+            else:
+                for cpusets in value.split(','):
+                    if cpusets.find('-') == -1:
+                        onlineCpus.append(unicode(cpusets))
+                    else:
+                        cpuindex = cpusets.split('-')
+                        for cpu in range(int(cpuindex[0]), int(cpuindex[1])+1):
+                            onlineCpus.append(unicode(cpu))
 
     if corePS and threadsPC and sockets:
         topology['sockets'] = sockets
         topology['cores'] = corePS * sockets
         topology['threads'] = threadsPC * corePS * sockets
+        topology['onlineCpus'] = onlineCpus
     else:
         raise RuntimeError('Undefined topology')
 


-- 
To view, visit https://gerrit.ovirt.org/38983
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5c4bdbc00217516ba3b7e361ab28e409c507baa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Madhu Pavan <kmp at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list