Summary
Error
While discovering HP IVM virtualization with a non-root user which has sudo rights to run hpvminfo command, the discovery incorrectly fails.
It caused by isIvmSystem() function returns False.
Fix
to modify isIvmSystem() method in the file ivm_discoverer.py:
def isIvmSystem(self):
logger.debug("Checking if hpvminfo is installed")
output = self._shell.execCmd(IvmHypervisorDiscoverer.HPVMINFO_PATH)
if output:
if __isCommandUnrecognized(output):
raise ValueError("Failed to determine if discovering IVM system")
### modification Start
### - Look for Permission denied error
if re.search(r"Permission denied", output, re.I):
# raise InsufficientPermissionsException, command
logger.debug("DEBUG: class IvmHypervisorDiscoverer: isIvmSystem(): Must have root permissions to run %s " % IvmHypervisorDiscoverer.HPVMINFO_PATH)
return True
### modification End
if self._shell.getLastCmdReturnCode() == 0:
return True