Pablo Iranzo Gómez has uploaded a new change for review.
Change subject: Initial commit of the tool for starting VM without the manager being available ......................................................................
Initial commit of the tool for starting VM without the manager being available
Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Signed-off-by: Pablo Pablo.Iranzo@gmail.com --- A contrib/forceVMstart/vdsEmergency-1.0.0.py 1 file changed, 490 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/9473/1
diff --git a/contrib/forceVMstart/vdsEmergency-1.0.0.py b/contrib/forceVMstart/vdsEmergency-1.0.0.py new file mode 100644 index 0000000..41fe068 --- /dev/null +++ b/contrib/forceVMstart/vdsEmergency-1.0.0.py @@ -0,0 +1,490 @@ +#!/usr/bin/env python +# +# Copyright 2010 Red Hat, Inc. +# +# Licensed to you under the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# Require Packages: python-iniparse + +import getopt +import sys +import commands +import os +import socket +from xml.dom.minidom import parse, parseString + +try: + from iniparse import ConfigParser +except: + print "Package python-iniparse is required, please install" + print "#yum install python-iniparse -y" + sys.exit(1) + + +# Adding vdsm .pyc libraries to python path +sys.path.append("/usr/share/vdsm") + +try: + import vdscli +except: + print "Cannot import vdscli, please contact Red Hat support" + sys.exit(1) + +try: + import vdsClient +except: + print "Cannot import vdsClient, please contact Red Hat support" + sys.exit(1) + +# General Macros +VERSION = "1.0.0" +VDSM_PORT = "54321" + +#DEBUG MODE +DEBUG = "False" # True or False + +######################################################################### + +class vdsmEmergency: + + ########################################################################## + # __init__() # + # Description: Initialize method # + ########################################################################## + def __init__(self): + sslRet = self.checkSSLvdsm() + self.useSSL = sslRet + self.truststore = None + + ########################################################################## + # do_connect() # + # Description: Do a connection with vdsm daemon # + ########################################################################## + def do_connect(self, server, port): + print "Trying to connect to vdsmd host (%s).." % server + + # Connection Validation + sk = socket.socket() + try: + sk.connect((server, int(VDSM_PORT))) + except Exception, e: + print "Unable to connect %s" % server + sk.close() + return -1 + + self.s = vdscli.connect(server + ':' + port, self.useSSL, self.truststore) + + print "OK, Connected to vdsmd!" + return 0 + + ########################################################################## + # checkRoot() # + # Description: check if the user running the script is root # + ########################################################################## + def checkRoot(self): + if os.geteuid() != 0: + print "You must be root to run this script." + sys.exit(2) + + ########################################################################## + # getIpRHEVM() # + # Description: get the IP from RHEVM Interface # + ########################################################################## + def getIpRHEVM(self): + + # TODO: avoid this kind of hack, find a better approach (vdsClient provide the IP of rhevm interface?) + strCmd = "ifconfig rhevm | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1" + retCmd = commands.getstatusoutput(strCmd) + if retCmd[0] != 0: + print "Error getting IP from rhevm interface" + sys.exit(1) + + return retCmd[1] + ########################################################################## + # checkSSLvdsm() # + # Description: check if vdsm is running as SSL or without it # + ########################################################################## + def checkSSLvdsm(self): + + cfg = ConfigParser() + cfg.read('/etc/vdsm/vdsm.conf') + cfg.get('vars', 'ssl') + + return cfg.data.vars.ssl + + + ########################################################################## + # checkVmRunning() # + # Description: check if the vms are running # + ########################################################################## + def checkVmRunning(self, otherHostsList, VmsToStart): + + hosts = None + vms = None + i = 0 + j = 0 + + if otherHostsList == None: + return -1 + + if VmsToStart == None: + return -1 + + vms = VmsToStart.split(",") + hosts = otherHostsList.split(",") + + # Let's check if all other Hosts are running the VirtualMachine + while (i <> len(hosts)): + ret = VE.do_connect(hosts[i], VDSM_PORT) + if ret < 0: + sys.exit(1) + response = self.s.list() + if response['status']['code'] != 0: + print "cannot execute list operation, err:" + response['status']['message'] + + # Checking VM status + for s in self.s.getAllVmStats()['statsList']: + j = 0 + + # print all vms in each host + while j < len(vms): + if DEBUG == "True": + print len(vms) + print s['vmId'] + print hosts[i] + print vms[j] + + vmIdCurr = self.getVmId(vms[j]) + + if DEBUG == "True": + print vmIdCurr + print s['vmId'] + + if s['vmId'] == vmIdCurr and s['status'] == "Up": + print "Cannot continue, the VM %s is running in host %s" % (vms[j], hosts[i]) + sys.exit(1) + j = j + 1 + + # counter for hosts + i = i + 1 + + print "OK, the vm(s) specified are not running on the host(s) informed, continuing.." + + ########################################################################## + # checkSPM() # + # Description: check if the host which is running this script is the SPM # + ########################################################################## + def checkSPM(self): + self.spUUID = None + self.spmStatus = None + + ip_rhevm_interface = self.getIpRHEVM() + self.do_connect(ip_rhevm_interface, VDSM_PORT) + + try: + list = self.s.getConnectedStoragePoolsList() + except: + print "Cannot execute getConnectedStoragePoolsList()" + sys.exit(1) + + for entry in list['poollist']: + self.spUUID = entry + + if not self.spUUID: + print "Cannot locate Storage Pools List.. aborting!" + sys.exit(1) + + try: + status = self.s.getSpmStatus(self.spUUID) + except: + print "Cannot execute getSpmStatus()" + sys.exit(1) + + self.spmStatus = status['spm_st']['spmStatus'] + + if self.spmStatus <> "SPM": + print "This host is not the current SPM, status [%s]" % self.spmStatus + sys.exit(1) + + + ###################################################################### + # getVmId() # + # Description: get the vmId from the vmName used as argument # + ###################################################################### + def getVmId(self, vmName): + path = "/rhev/data-center/%s/vms" % (self.spUUID) + + # First verify which domainID contain de XML files + try: + dirList = os.listdir(path) + except: + print "Cannot locate the dir with ovf files.. aborting!" + sys.exit(1) + + #Read all content of xml(s) file(s) + for fname in dirList: + + pathOVF = path + "/" + fname + "/" + fname + ".ovf" + + dom = parse(pathOVF) + + # Getting vmId field + i = 0 + attr = 0 + for node in dom.getElementsByTagName('Section'): + while ( i < len(node.attributes)): + attr = node.attributes.items() + if attr[i][0] == "ovf:id": + vmId = attr[i][1] + i = i + 1 + + # Getting vmName field + for node in dom.getElementsByTagName('Content'): + if node.childNodes[0].firstChild <> None: + if node.childNodes[0].firstChild.nodeValue == vmName: + return vmId + + + + def _parseDriveSpec(self, spec): + if ',' in spec: + d = {} + for s in spec.split(','): + k, v = s.split(':', 1) + if k == 'domain': d['domainID'] = v + if k == 'pool': d['poolID'] = v + if k == 'image': d['imageID'] = v + if k == 'volume': d['volumeID'] = v + if k == 'boot': d['boot'] = v + if k == 'format': d['format'] = v + return d + return spec + + ###################################################################### + # readXML() # + # Description: read all xml available pointed to Direcory path and # + # parse for specific fields # + ###################################################################### + def readXML(self, VmsStotart, destHostStart): + + # number of Vms found + nrmVms = 0 + cmd = {} + # Path to XML files + # example default path: + # /rhev/data-center/1a516f64-f091-4785-9278-362037513408/vms + path = "/rhev/data-center/%s/vms" % (self.spUUID) + + # First verify which domainID contain de XML files + try: + dirList = os.listdir(path) + except: + print "Cannot locate the dir with ovf files.. aborting!" + sys.exit(1) + + #Read all content of xml(s) file(s) + for fname in dirList: + + pathOVF = path + "/" + fname + "/" + fname + ".ovf" + cmd['display']="vnc" + cmd['kvmEnable']="True" + cmd['tabletEnable']="True" + cmd['vmEnable']="True" + cmd['irqChip']="True" + cmd['nice']=0 + cmd['keyboardLayout']="en-us" + cmd['acpiEnable']="True" + cmd['tdf']="True" + + dom = parse(pathOVF) + + # Getting vmId field + i = 0 + attr = 0 + for node in dom.getElementsByTagName('Section'): + while ( i < len(node.attributes)): + attr = node.attributes.items() + if attr[i][0] == "ovf:id": + cmd["vmId"] = attr[i][1] + i = i + 1 + + # Getting vmName field + for node in dom.getElementsByTagName('Content'): + if node.childNodes[0].firstChild <> None: + self.vmName = node.childNodes[0].firstChild.nodeValue + cmd['vmName'] = self.vmName + + # Getting image and volume + i = 0 + attr = 0 + for node in dom.getElementsByTagName('Disk'): + while (i <> len(node.attributes)): + attr = node.attributes.items() + if attr[i][0] == "ovf:fileRef": + storage = attr[i][1] + data = storage.split("/") + image = data[0] + volume = data[1] + i += 1 + + # Getting VM format, boot + i = 0 + attr =0 + for node in dom.getElementsByTagName('Disk'): + while (i <> len(node.attributes)): + attr = node.attributes.items() + if attr[i][0] == "ovf:volume-format": + format = attr[i][1] + + if attr[i][0] == "ovf:boot": + vmBoot = attr[i][1] + + if attr[i][0] == "ovf:disk-interface": + ifFormat = attr[i][1] + + i += 1 + + if format == "COW": + vmFormat = ":cow" + elif format == "RAW": + vmFormat = ":raw" + + + if ifFormat == "VirtIO": + ifDisk = "virtio" + elif ifFormat == "IDE": + ifDisk = "ide" + drives = [] + # Getting Drive, bridge, memSize, macAddr, smp, smpCoresPerSocket + for node in dom.getElementsByTagName('Item'): + # Getting Drive + if node.childNodes[0].firstChild <> None: + str = node.childNodes[0].firstChild.nodeValue + if str.find("Drive") > -1: + + tmp = "pool:" + self.spUUID + ",domain:" + node.childNodes[7].firstChild.nodeValue + ",image:" + image + ",volume:" + volume + ",boot:" + vmBoot + ",format" + vmFormat + ",if:" + ifDisk + #param,value = tmp.split("=",1) + drives += [self._parseDriveSpec(tmp)] + cmd['drives'] = drives + + # Getting bridge + nicMod = None + if node.childNodes[0].firstChild.nodeValue == "Ethernet adapter on rhevm": + if node.childNodes[3].firstChild.nodeValue == "3": + nicMod = "pv" #VirtIO + elif node.childNodes[3].firstChild.nodeValue == "2": + nicMod = "e1000" #e1000 + elif node.childNodes[3].firstChild.nodeValue == "1": + nicMod = "rtl8139" #rtl8139 + + cmd['nicModel'] = nicMod + cmd['bridge'] = node.childNodes[4].firstChild.nodeValue + + # Getting memSize field + str = node.childNodes[0].firstChild.nodeValue + if str.find("MB of memory") > -1: + cmd['memSize'] = node.childNodes[5].firstChild.nodeValue + + # Getting smp and smpCoresPerSocket fields + str = node.childNodes[0].firstChild.nodeValue + if str.find("virtual cpu") > -1: + cmd["smp="] = node.childNodes[4].firstChild.nodeValue + cmd["smpCoresPerSocket"] = node.childNodes[5].firstChild.nodeValue + + # Getting macAddr field + if node.childNodes[0].firstChild.nodeValue == "Ethernet adapter on rhevm": + if len(node.childNodes) > 6: + cmd['macAddr'] = node.childNodes[6].firstChild.nodeValue + + # if node.childNodes < 6 it`s a template entry, so ignore + if len(node.childNodes) > 6: + # print only vms to start + try: + checkvms = VmsToStart.split(",") + except: + print "Please use , between vms name, avoid space" + self.usage() + + i = 0 + while (i <> len(checkvms)): + if self.vmName == checkvms[i]: + nrmVms = nrmVms + 1 + self.startVM(cmd, destHostStart) + i += 1 + + print "Total VMs found: %s" % nrmVms + + ###################################################################### + # startVM() # + # Description: start the VM # + ###################################################################### + def startVM(self, cmd, destHostStart): + + self.do_connect(destHostStart, VDSM_PORT) + #print cmd + #cmd1 = dict(cmd) + #print cmd1 + ret = self.s.create(cmd) + #print ret + print "Triggered VM [%s]" % self.vmName + + ###################################################################### + # usage() # + # Description: shows the program params # + ###################################################################### + def usage(self): + print "Usage: " + sys.argv[0] + " [OPTIONS]" + print "\t--destHost \t RHEV-H host which will start the VM" + print "\t--otherHostsList\t All RHEV-H hosts" + print "\t--vms \t Specify the Names of which VMs to start" + print "\t--version \t List version release" + print "\t--help \t This help menu\n" + + print "Example:" + print "\t" + sys.argv[0] + " --destHost LinuxSrv1 --otherHostsList Megatron,Jerry --vms vm1,vm2,vm3,vm4" + sys.exit(1) + + +if __name__ == "__main__": + + otherHostsList = '' + VmsToStart = None + destHostStart = None + + VE = vdsmEmergency() + try: + opts, args = getopt.getopt(sys.argv[1:], "Vd:ho:v:", ["destHost=", "otherHostsList=", "vms=", "help", "version"]) + except getopt.GetoptError, err: + # print help information and exit: + print(err) # will print something like "option -a not recognized" + VE.usage() + sys.exit(2) + for o, a in opts: + if o in ("-d", "--destHost"): + destHostStart = a + print "" + elif o in ("-h", "--help"): + VE.usage() + sys.exit() + elif o in ("-o", "--otherHostsList"): + otherHostsList = a + elif o in ("-v", "--vms"): + VmsToStart = a + elif o in ("-V", "--version"): + print VERSION + else: + assert False, "unhandled option" + + argc = len(sys.argv) + if argc < 2: + VE.usage() + + VE.checkSPM() + + # Include the destHost to verify + otherHostsList += ",%s" % destHostStart + VE.checkVmRunning(otherHostsList, VmsToStart) + + VE.readXML(VmsToStart, destHostStart)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Initial commit of the tool for starting VM without the manager being available ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/145/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Initial commit of the tool for starting VM without the manager being available ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/179/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Initial commit of the tool for starting VM without the manager being available ......................................................................
Patch Set 1: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/145/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/179/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Pablo Iranzo Gómez has abandoned this change.
Change subject: Initial commit of the tool for starting VM without the manager being available ......................................................................
Patch Set 1: Abandoned
Unified into another patch
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Pablo Iranzo Gómez has restored this change.
Change subject: Initial commit of the tool for starting VM without the manager being available ......................................................................
Patch Set 1: Restored
Shouldn't have been abandoned...
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: restore Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/187/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/153/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 2: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/153/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/187/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/194/ (1/2)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/160/ (2/2)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/160/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/194/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Douglas Schilling Landgraf has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3:
Hi Pablo, thanks for bringing it to upstream, adding Dan for review as well.
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Yaniv Bronhaim has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3: (2 inline comments)
.................................................... Commit Message Line 7: forceVMstart: Initial commit Line 8: Line 9: forceVMstart is a tool for gathering information for a VM using locally Line 10: available xml files on SPM in order to manually start it in the event of Line 11: RHEV-M not being available why don't you add cli command for that instead of external tool? Line 12: Line 13: Signed-off-by: Pablo Pablo.Iranzo@redhat.com
.................................................... File contrib/forceVMstart.py Line 89: return 0 Line 90: Line 91: def checkRoot(self): Line 92: """check if the user running the script is root""" Line 93: if os.geteuid() != 0: instead of kind of function I would write assert(os.geteuid() == 0, 'sudo it') Line 94: print "You must be root to run this script." Line 95: sys.exit(2) Line 96: Line 97: def getIpManagementIP(self):
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Pablo Iranzo Gómez has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3: (1 inline comment)
.................................................... Commit Message Line 7: forceVMstart: Initial commit Line 8: Line 9: forceVMstart is a tool for gathering information for a VM using locally Line 10: available xml files on SPM in order to manually start it in the event of Line 11: RHEV-M not being available Yaniv, it was done as an external instead of a cli command because this script is the one that Douglas created some time ago and had some modifications on it to make it work since the initial release for 2.1. The idea is to make this working upstream as a last-resouce to use in the event of a disaster with the management console. Line 12: Line 13: Signed-off-by: Pablo Pablo.Iranzo@redhat.com
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Pablo Iranzo Gómez has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3: (1 inline comment)
.................................................... File contrib/forceVMstart.py Line 89: return 0 Line 90: Line 91: def checkRoot(self): Line 92: """check if the user running the script is root""" Line 93: if os.geteuid() != 0: Regaring the assert, I'm trying the code on my computer and:
import os assert(os.geteuid() == 0,'sudo it')
gives:
[iranzo@x201 ~]$ python prueba.py prueba.py:2: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert(os.geteuid() == 0,'sudo it')
¿Is something I'm doing wrong? Thanks! Line 94: print "You must be root to run this script." Line 95: sys.exit(2) Line 96: Line 97: def getIpManagementIP(self):
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Shu Ming has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3: I would prefer that you didn't submit this
(5 inline comments)
.................................................... File contrib/forceVMstart.py Line 54: sys.exit(1) Line 55: Line 56: # General Macros Line 57: VERSION = "1.0.0" Line 58: VDSM_PORT = "54321" It is better to let the user to give this port in the command option list. Another way is to get the port from local vdsm.conf file. Only If the port not given in the command option list, a default number "54321" should be used. Line 59: Line 60: #DEBUG MODE Line 61: DEBUG = "False" # True or False Line 62:
Line 82: print "Unable to connect %s" % server Line 83: sk.close() Line 84: return -1 Line 85: Line 86: self.s = vdscli.connect(server + ':' + port, self.useSSL, self.truststore) Can we have a more meaningful name for 's', like "conn_info"? Line 87: Line 88: print "OK, Connected to vdsmd!" Line 89: return 0 Line 90:
Line 97: def getIpManagementIP(self): Line 98: """get the IP from management interface""" Line 99: Line 100: # TODO: avoid this kind of hack, find a better approach (vdsClient provide the IP of ovirtmgmt/rhevm interface?) Line 101: # strCmd = "ifconfig ovirtmgmt | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1" It seems that this file is not PEP8 clean. Please fix it. Line 102: Line 103: # Code to make it work for the rhevm or the ovirtmgmt interface Line 104: Line 105: strCmd = "ifconfig ovirtmgmt 2>/dev/null|grep inet|grep -v inet6|awk '{print $2}'|cut -d ':' -f2"
Line 192: print "Cannot execute getConnectedStoragePoolsList()" Line 193: sys.exit(1) Line 194: Line 195: for entry in list['poollist']: Line 196: self.spUUID = entry I am not sure why we need a "for" loop here. It seems self.spUUID always equal to the last entry in list['poollist']. Line 197: Line 198: if not self.spUUID: Line 199: print "Cannot locate Storage Pools List.. aborting!" Line 200: sys.exit(1)
Line 405: while (i <> len(checkvms)): Line 406: if self.vmName == checkvms[i]: Line 407: nrmVms = nrmVms + 1 Line 408: self.startVM(cmd, destHostStart) Line 409: i += 1 I really don't like this big loop from line 283. Line 410: Line 411: print "Total VMs found: %s" % nrmVms Line 412: Line 413: def startVM(self, cmd, destHostStart):
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Douglas Schilling Landgraf has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 3: (2 inline comments)
.................................................... File contrib/forceVMstart.py Line 38: sys.exit(1) Line 39: Line 40: Line 41: # Adding vdsm .pyc libraries to python path Line 42: sys.path.append("/usr/share/vdsm") we have moved vdscli to python sitepackage, no need this anymore. Line 43: Line 44: try: Line 45: import vdscli Line 46: except:
Line 41: # Adding vdsm .pyc libraries to python path Line 42: sys.path.append("/usr/share/vdsm") Line 43: Line 44: try: Line 45: import vdscli should be replaced with: from vdsm import vdscli Line 46: except: Line 47: print "Cannot import vdscli, please fix it" Line 48: sys.exit(1) Line 49:
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/910/ (2/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/875/ (1/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 4:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/18/ (3/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 4: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/875/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/910/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/18/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1043/ (1/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/154/ (3/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 5:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1008/ (2/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 5: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1008/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1043/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/154/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1009/ (2/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1044/ (1/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 6:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/155/ (3/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 6: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1009/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1044/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/155/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/156/ (2/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1045/ (1/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 7:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1010/ (3/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 7: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1010/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1045/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/156/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1046/ (2/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1011/ (3/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/157/ (1/3)
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1011/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1046/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/157/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/9473 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I9a70b31ce0730194880406701316f219c9f92ceb Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Amador Pahim apahim@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Douglas Schilling Landgraf dougsland@redhat.com Gerrit-Reviewer: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: Pablo Iranzo Gómez Pablo.Iranzo@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yaniv Bronhaim ybronhei@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Itamar Heim has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
ping - still relevant?
Douglas Schilling Landgraf has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
I do believe still relevant, if Pablo agree I can continue the work to integrate with vdsm-tool and make the improvements required for 3.5. Dan, what's your opinion?
Douglas Schilling Landgraf has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
Or with vdsClient...
Pablo Iranzo Gómez has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
Douglas, please go ahead.
I think that it makes more sense in the vdsClient, and some of the functionality is already in the hosted-engine which uses the vm.conf to do the work.
Thanks
Yaniv Bronhaim has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
(4 comments)
guess this tool is relevant when vdsm is not functional to gather information about the running vms iiuc.
not sure how required is it, but if so, and it should be used by admin user, vdsm-tool is good location for that.
please move it there and I'll review it more deeply.
adding alonbl to say what he thinks about the need of those commands.
http://gerrit.ovirt.org/#/c/9473/8//COMMIT_MSG Commit Message:
Line 3: AuthorDate: 2013-01-31 00:33:45 +0100 Line 4: Commit: Pablo Pablo.Iranzo@gmail.com Line 5: CommitDate: 2013-01-31 00:33:45 +0100 Line 6: Line 7: forceVMstart: Initial commit please change "Initial commit" to what is the meaning of this tool Line 8: Line 9: forceVMstart is a tool for gathering information for a VM using locally Line 10: available xml files on SPM in order to manually start it in the event of Line 11: RHEV-M not being available
Line 6: Line 7: forceVMstart: Initial commit Line 8: Line 9: forceVMstart is a tool for gathering information for a VM using locally Line 10: available xml files on SPM in order to manually start it in the event of "manually start it in the event of RHEV-M.." what does it mean? please elaborate .. Line 11: RHEV-M not being available Line 12: Line 13: Signed-off-by: Pablo Pablo.Iranzo@gmail.com
http://gerrit.ovirt.org/#/c/9473/8/contrib/forceVMstart.py File contrib/forceVMstart.py:
Line 1: #!/usr/bin/env python Line 2: # Line 3: # Copyright 2010-2012 Red Hat, Inc. go for 2014 Line 4: # Line 5: # Licensed to you under the GNU General Public License as published by Line 6: # the Free Software Foundation; either version 2 of the License, or Line 7: # (at your option) any later version.
Line 17: Line 18: Line 19: ############################################################################### Line 20: ############## WARNING ############## Line 21: ############## The use of this script is inherently raceful ############## explain the race Line 22: ############## use it only on emergency cases when it's no ############## Line 23: ############## possible to wait until manager is up again ############## Line 24: ############################################################################### Line 25:
Alon Bar-Lev has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
I think that utilities such as this should go into separate repo, something like vdsm-contrib or even ovirt-contrib and not at mainline.
Itamar Heim has posted comments on this change.
Change subject: forceVMstart: Initial commit ......................................................................
Patch Set 8:
ping
Itamar Heim has abandoned this change.
Change subject: forceVMstart: Initial commit ......................................................................
Abandoned
no reply - abandoning - please restore if still relevant
vdsm-patches@lists.fedorahosted.org