Hello Dan Kenigsberg, I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/32653 to review the following change. Change subject: ppc: Over ppc arch vdsm reports UNKNOWN as operationSystem in getVdsCaps ...................................................................... ppc: Over ppc arch vdsm reports UNKNOWN as operationSystem in getVdsCaps Vdsm currently checks only /etc/redhat-release path which exists over fedora installation for ppc arch but not on PowerKVM platforms. Over PowerKVM platforms we should read /etc/ibm_powerkvm-release to retrieve the release version. Change-Id: I5e6ef83353b4b47a22d91d222ef1a0122b9470d3 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131965 Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com> Reviewed-on: http://gerrit.ovirt.org/32444 Reviewed-by: Dan Kenigsberg <dan...@redhat.com> --- M vdsm/caps.py 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/32653/1 diff --git a/vdsm/caps.py b/vdsm/caps.py index 276d8a7..4be83a8 100644 --- a/vdsm/caps.py +++ b/vdsm/caps.py @@ -64,6 +64,7 @@ FEDORA = 'Fedora' RHEVH = 'RHEV Hypervisor' DEBIAN = 'Debian' + POWERKVM = 'PowerKVM' RNG_SOURCES = {'random': '/dev/random', 'hwrng': '/dev/hwrng'} @@ -287,6 +288,8 @@ return OSName.RHEL elif os.path.exists('/etc/debian_version'): return OSName.DEBIAN + elif os.path.exists('/etc/ibm-powerkvm-release'): + return OSName.POWERKVM else: return OSName.UNKNOWN @@ -305,8 +308,13 @@ version = linecache.getline('/etc/debian_version', 1).strip("\n") release = "" # Debian just has a version entry else: + if osname == OSName.POWERKVM: + release_path = '/etc/ibm_powerkvm-release' + else: + release_path = '/etc/redhat-release' + ts = rpm.TransactionSet() - for er in ts.dbMatch('basenames', '/etc/redhat-release'): + for er in ts.dbMatch('basenames', release_path): version = er['version'] release = er['release'] except: -- To view, visit http://gerrit.ovirt.org/32653 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5e6ef83353b4b47a22d91d222ef1a0122b9470d3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.4 Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches