Vinzenz Feenstra has uploaded a new change for review.
Change subject: Convert vm status strings to constants ......................................................................
Convert vm status strings to constants
This patch replaces all vmstatuses to constants. Additionally added not documented 'Powering up' status to schema.
Change-Id: I95e6945c2ee9d443e22586f04dc0f9646cc5cbb3 Signed-off-by: Vinzenz Feenstra vfeenstr@redhat.com --- M tests/functional/storageTests.py M tests/functional/virtTests.py M vdsm/API.py M vdsm/clientIF.py M vdsm/guestIF.py M vdsm/vm.py A vdsm/vmstatus.py M vdsm_api/vdsmapi-schema.json 8 files changed, 103 insertions(+), 56 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/21790/1
diff --git a/tests/functional/storageTests.py b/tests/functional/storageTests.py index df3a043..983da36 100644 --- a/tests/functional/storageTests.py +++ b/tests/functional/storageTests.py @@ -48,6 +48,8 @@ from vdsm.utils import CommandPath from vdsm import vdscli
+import vmstatus + _VARTMP = '/var/tmp'
if not config.getboolean('vars', 'xmlrpc_enable'): @@ -62,7 +64,7 @@
@expandPermutations class StorageTest(TestCaseBase): - UPSTATES = frozenset(('Up', 'Powering up')) + UPSTATES = frozenset((vmstatus.UP, vmstatus.POWERING_UP))
def runTest(self): pass diff --git a/tests/functional/virtTests.py b/tests/functional/virtTests.py index d49c439..c58273e 100644 --- a/tests/functional/virtTests.py +++ b/tests/functional/virtTests.py @@ -36,6 +36,8 @@
from utils import VdsProxy, SUCCESS
+import vmstatus + _mkinitrd = CommandPath("mkinitrd", "/usr/bin/mkinitrd") _modprobe = CommandPath("modprobe", "/usr/sbin/modprobe", # Fedora, Ubuntu @@ -135,7 +137,7 @@
@expandPermutations class VirtTest(TestCaseBase): - UPSTATES = frozenset(('Up', 'Powering up')) + UPSTATES = frozenset((vmstatus.UP, vmstatus.POWERING_UP))
def setUp(self): self.vdsm = VdsProxy() @@ -147,12 +149,12 @@
def assertQemuSetupComplete(self, vmid): result = self._getVmStatus(vmid) - self.assertTrue(result['status'] != 'WaitForLaunch', + self.assertTrue(result['status'] != vmstatus.WAIT_FOR_LAUNCH, 'VM is not booting!')
def assertVmBooting(self, vmid): result = self._getVmStatus(vmid) - self.assertTrue(result['status'] != 'Down', + self.assertTrue(result['status'] != vmstatus.DOWN, 'VM is not booting!')
def assertVmUp(self, vmid): @@ -164,7 +166,7 @@ if targetUptime > 0: self.assertTrue(int(result['elapsedTime']) >= targetUptime) else: - self.assertEquals(result['status'], 'Up') + self.assertEquals(result['status'], vmstatus.UP)
def _waitForStartup(self, vmid, targetUptime=0): self.retryAssert(partial(self.assertQemuSetupComplete, vmid), diff --git a/vdsm/API.py b/vdsm/API.py index f91910c..9b722a2 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -41,6 +41,7 @@ import storage.sd import storage.image import vm +import vmstatus from vdsm.define import doneCode, errCode, Kbytes, Mbytes import caps from vdsm.config import config @@ -473,7 +474,7 @@ return errCode['noVM']
vmParams = v.status() - if vmParams['status'] in ('WaitForLaunch', 'Down'): + if vmParams['status'] in (vmstatus.WAIT_FOR_LAUNCHF, vmstatus.DOWN): return errCode['noVM'] if params.get('mode') == 'file': if 'dst' not in params: @@ -1500,7 +1501,7 @@ try: count += 1 status = v.lastStatus - if status == 'Up': + if status == vmstatus.UP: active += 1 elif 'Migration' in status: migrating += 1 diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py index 0b67e45..f65e556 100644 --- a/vdsm/clientIF.py +++ b/vdsm/clientIF.py @@ -45,6 +45,7 @@ import blkid import supervdsm import sampling +import vmstatus try: import gluster.api as gapi _glusterEnabled = True @@ -435,8 +436,8 @@ vmId, exc_info=True)
while (self._enabled and - 'WaitForLaunch' in [v.lastStatus for v in - self.vmContainer.values()]): + vmstatus.WAIT_FOR_LAUNCH in [v.lastStatus for v in + self.vmContainer.values()]): time.sleep(1) self._cleanOldFiles() self._recovery = False diff --git a/vdsm/guestIF.py b/vdsm/guestIF.py index 06ca71b..90b3e31 100644 --- a/vdsm/guestIF.py +++ b/vdsm/guestIF.py @@ -26,6 +26,8 @@ import supervdsm import unicodedata
+import vmstatus +
__REPLACEMENT_CHAR = u'\ufffd' __RESTRICTED_CHARS = set(range(8 + 1)). \ @@ -169,9 +171,9 @@ def _handleMessage(self, message, args): self.log.log(logging.TRACE, "Guest's message %s: %s", message, args) if self.guestStatus is None: - self.guestStatus = 'Up' + self.guestStatus = vmstatus.UP if message == 'heartbeat': - self.guestStatus = 'Up' + self.guestStatus = vmstatus.UP self.guestInfo['memUsage'] = int(args['free-ram']) # ovirt-guest-agent reports the following fields in 'memory-stat': # 'mem_total', 'mem_free', 'mem_unused', 'swap_in', 'swap_out', @@ -268,7 +270,7 @@ 'guestFQDN': self.guestInfo['guestFQDN']}
def onReboot(self): - self.guestStatus = 'RebootInProgress' + self.guestStatus = vmstatus.REBOOT_IN_PROGRESS self.guestInfo['lastUser'] = '' + self.guestInfo['username'] self.guestInfo['username'] = 'Unknown' self.guestInfo['lastLogout'] = time.time() diff --git a/vdsm/vm.py b/vdsm/vm.py index ccdf950..74717bd 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -57,6 +57,7 @@ import kaxmlrpclib import sampling import supervdsm +import vmstatus
_VMCHANNEL_DEVICE_NAME = 'com.redhat.rhevm.vdsm' # This device name is used as default both in the qemu-guest-agent @@ -210,10 +211,10 @@ ' unresponsive. Hiberanting without ' 'desktopLock.') break - self._vm.pause('Saving State') + self._vm.pause(vmstatus.SAVING_STATE) else: self.log.debug("Migration started") - self._vm.lastStatus = 'Migration Source' + self._vm.lastStatus = vmstatus.MIGRATION_SOURCE
def _recover(self, message): if not self.status['status']['code']: @@ -228,7 +229,7 @@ if self._mode == 'file' or self._method != 'online': self._vm.cont() # either way, migration has finished - self._vm.lastStatus = 'Up' + self._vm.lastStatus = vmstats.UP
def _finishSuccessfully(self): self.status['progress'] = 100 @@ -408,10 +409,11 @@ class DoubleDownError(RuntimeError): pass
-VALID_STATES = ('Down', 'Migration Destination', 'Migration Source', - 'Paused', 'Powering down', 'RebootInProgress', - 'Restoring state', 'Saving State', - 'Up', 'WaitForLaunch') +VALID_STATES = (vmstatus.DOWN, vmstatus.MIGRATION_DESTINATION, + vmstatus.MIGRATION_SOURCE, vmstatus.PAUSED, + vmstatus.POWERING_DOWN, vmstatus.REBOOT_IN_PROGRESS, + vmstatus.RESTORING_STATE, vmstatus.SAVING_STATE, + vmstatus.UP, vmstatus.WAIT_FOR_LAUNCH)
class MERGESTATUS: @@ -1762,11 +1764,11 @@ self._confLock = threading.Lock() self._creationThread = threading.Thread(target=self._startUnderlyingVm) if 'migrationDest' in self.conf: - self._lastStatus = 'Migration Destination' + self._lastStatus = vmstatus.MIGRATION_DESTINATION elif 'restoreState' in self.conf: - self._lastStatus = 'Restoring state' + self._lastStatus = vmstatus.RESTORING_STATE else: - self._lastStatus = 'WaitForLaunch' + self._lastStatus = vmstatus.WAIT_FOR_LAUNCH self._migrationSourceThread = self.MigrationSourceThreadClass(self) self._kvmEnable = self.conf.get('kvmEnable', 'true') self._guestSocketFile = constants.P_VDSM_RUN + self.conf['vmId'] + \ @@ -1776,7 +1778,7 @@ self._volPrepareLock = threading.Lock() self._initTimePauseCode = None self.guestAgent = None - self._guestEvent = 'Powering up' + self._guestEvent = vmstatus.POWERING_UP self._guestEventTime = 0 self._vmStats = None self._guestCpuRunning = False @@ -1804,16 +1806,17 @@ self.sdIds = []
def _get_lastStatus(self): - PAUSED_STATES = ('Powering down', 'RebootInProgress', 'Up') + PAUSED_STATES = (vmstatus.POWERING_DOWN, vmstatus.REBOOT_IN_PROGRESS, + vmstatus.UP) if not self._guestCpuRunning and self._lastStatus in PAUSED_STATES: - return 'Paused' + return vmstatus.PAUSED return self._lastStatus
def _set_lastStatus(self, value): - if self._lastStatus == 'Down': + if self._lastStatus == vmstatus.DOWN: self.log.warning('trying to set state to %s when already Down', value) - if value == 'Down': + if value == vmstatus.DOWN: raise DoubleDownError else: return @@ -2083,8 +2086,8 @@ self._vmCreationEvent.set() try: self._run() - if self.lastStatus != 'Down' and 'recover' not in self.conf \ - and not self.cif.mom: + if self.lastStatus != vmstatus.DOWN and \ + 'recover' not in self.conf and not self.cif.mom: # If MOM is available, we needn't tell it to adjust KSM # behaviors on VM start/destroy, because the tuning can be # done automatically according to its statistical data. @@ -2099,10 +2102,10 @@ self.log.debug("_ongoingCreations released")
if ('migrationDest' in self.conf or 'restoreState' in self.conf) \ - and self.lastStatus != 'Down': + and self.lastStatus != vmstatus.DOWN: self._waitForIncomingMigrationFinish()
- self.lastStatus = 'Up' + self.lastStatus = vmstatus.UP if self._initTimePauseCode: self.conf['pauseCode'] = self._initTimePauseCode if self._initTimePauseCode == 'ENOSPC': @@ -2196,7 +2199,8 @@ with self._confLock: toSave = deepcopy(self.status()) toSave['startTime'] = self._startTime - if self.lastStatus != 'Down' and self._vmStats and self.guestAgent: + if self.lastStatus != vmstatus.DOWN and \ + self._vmStats and self.guestAgent: toSave['username'] = self.guestAgent.guestInfo['username'] toSave['guestIPs'] = self.guestAgent.guestInfo['guestIPs'] toSave['guestFQDN'] = self.guestAgent.guestInfo['guestFQDN'] @@ -2225,7 +2229,7 @@ self.log.debug('reboot event') self._startTime = time.time() self._guestEventTime = self._startTime - self._guestEvent = 'RebootInProgress' + self._guestEvent = vmstatus.REBOOT_IN_PROGRESS self.saveState() self.guestAgent.onReboot() if self.conf.get('volatileFloppy'): @@ -2436,11 +2440,12 @@ raise RuntimeError('waiting more that %ss for _guestCpuLock' % timeout)
- def cont(self, afterState='Up', guestCpuLocked=False): + def cont(self, afterState=vmstatus.UP, guestCpuLocked=False): if not guestCpuLocked: self._acquireCpuLockWithTimeout() try: - if self.lastStatus in ('Migration Source', 'Saving State', 'Down'): + if self.lastStatus in (vmstatus.MIGRATION_SOURCE, + vmstatus.SAVING_STATE, vmstatus.DOWN): self.log.error('cannot cont while %s', self.lastStatus) return errCode['unexpected'] self._underlyingCont() @@ -2457,7 +2462,7 @@ if not guestCpuLocked: self._guestCpuLock.release()
- def pause(self, afterState='Paused', guestCpuLocked=False, + def pause(self, afterState=vmstatus.PAUSED, guestCpuLocked=False, pauseCode='NOERR'): if not guestCpuLocked: self._acquireCpuLockWithTimeout() @@ -2476,11 +2481,11 @@ def shutdown(self, timeout, message): try: now = time.time() - if self.lastStatus == 'Down': + if self.lastStatus == vmstatus.DOWN: return if self.guestAgent and self.guestAgent.isResponsive(): self._guestEventTime = now - self._guestEvent = 'Powering down' + self._guestEvent = vmstatus.POWERING_DOWN self.log.debug('guestAgent shutdown called') self.guestAgent.desktopShutdown(timeout, message) agent_timeout = (int(timeout) + @@ -2489,7 +2494,7 @@ timer.start() elif utils.tobool(self.conf.get('acpiEnable', 'true')): self._guestEventTime = now - self._guestEvent = 'Powering down' + self._guestEvent = vmstatus.POWERING_DOWN self._acpiShutdown() # No tools, no ACPI else: @@ -2508,7 +2513,7 @@ def _timedShutdown(self): self.log.debug('_timedShutdown Called') try: - if self.lastStatus == 'Down': + if self.lastStatus == vmstatus.DOWN: return if not utils.tobool(self.conf.get('acpiEnable', 'true')): self.destroy() @@ -2567,7 +2572,7 @@
def setDownStatus(self, code, reason): try: - self.lastStatus = 'Down' + self.lastStatus = vmstatus.DOWN with self._confLock: self.conf['exitCode'] = code if 'restoreState' in self.conf: @@ -2607,16 +2612,16 @@ GUEST_WAIT_TIMEOUT = 60 now = time.time() if now - self._guestEventTime < 5 * GUEST_WAIT_TIMEOUT and \ - self._guestEvent == 'Powering down': + self._guestEvent == vmstatus.POWERING_DOWN: return self._guestEvent if self.guestAgent and self.guestAgent.isResponsive() and \ self.guestAgent.getStatus(): return self.guestAgent.getStatus() if now - self._guestEventTime < GUEST_WAIT_TIMEOUT: return self._guestEvent - return 'Up' + return vmstatus.UP
- if self.lastStatus == 'Down': + if self.lastStatus == vmstatus.DOWN: stats = {} stats['exitCode'] = self.conf['exitCode'] stats['status'] = self.lastStatus @@ -2666,16 +2671,17 @@ self.log.error("Error setting vm disk stats", exc_info=True)
- statuses = ('Saving State', 'Restoring state', 'Migration Source', - 'Migration Destination', 'Paused') + statuses = (vmstatus.SAVING_STATE, vmstatus.RESTORING_STATE, + vmstatus.MIGRATION_SOURCE, vmstatus.MIGRATION_DESTINATION, + vmstatus.PAUSED) if self.lastStatus in statuses: stats['status'] = self.lastStatus elif self.isMigrating(): if self._migrationSourceThread._mode == 'file': - stats['status'] = 'Saving State' + stats['status'] = vmstatus.SAVING_STATE else: - stats['status'] = 'Migration Source' - elif self.lastStatus == 'Up': + stats['status'] = vmstatus.MIGRATION_SOURCE + elif self.lastStatus == vmstatus.UP: stats['status'] = _getGuestStatus() else: stats['status'] = self.lastStatus @@ -2716,7 +2722,7 @@ return errCode['transientErr'] # while we were blocking, another migrationSourceThread could have # taken self Down - if self._lastStatus == 'Down': + if self._lastStatus == vmstatus.DOWN: return errCode['noVM'] self._migrationSourceThread = \ self.MigrationSourceThreadClass(self, **params) @@ -2905,8 +2911,8 @@
self._guestCpuRunning = (self._dom.info()[0] == libvirt.VIR_DOMAIN_RUNNING) - if self.lastStatus not in ('Migration Destination', - 'Restoring state'): + if self.lastStatus not in (vmstatus.MIGRATION_DESTINATION, + vmstatus.RESTORING_STATE): self._initTimePauseCode = self._readPauseCode(0) if 'recover' not in self.conf and self._initTimePauseCode: self.conf['pauseCode'] = self._initTimePauseCode @@ -4349,7 +4355,7 @@ return {'status': doneCode}
self.log.info('Release VM resources') - self.lastStatus = 'Powering down' + self.lastStatus = vmstatus.POWERING_DOWN try: # Terminate the VM's creation thread. self._incomingMigrationFinished.set() @@ -4871,13 +4877,13 @@ eventToString(event), detail, opaque) if event == libvirt.VIR_DOMAIN_EVENT_STOPPED: if (detail == libvirt.VIR_DOMAIN_EVENT_STOPPED_MIGRATED and - self.lastStatus == 'Migration Source'): + self.lastStatus == vmstatus.MIGRATION_SOURCE): hooks.after_vm_migrate_source(self._lastXMLDesc, self.conf) for dev in self._customDevices(): hooks.after_device_migrate_source( dev._deviceXML, self.conf, dev.custom) elif (detail == libvirt.VIR_DOMAIN_EVENT_STOPPED_SAVED and - self.lastStatus == 'Saving State'): + self.lastStatus == vmstatus.SAVING_STATE): hooks.after_vm_hibernate(self._lastXMLDesc, self.conf) else: if detail == libvirt.VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN: @@ -4913,7 +4919,7 @@ else: hooks.after_vm_cont(domxml, self.conf) elif (detail == libvirt.VIR_DOMAIN_EVENT_RESUMED_MIGRATED and - self.lastStatus == 'Migration Destination'): + self.lastStatus == vmstatus.MIGRATION_DESTINATION): self._incomingMigrationFinished.set()
def _updateDevicesDomxmlCache(self, xml): diff --git a/vdsm/vmstatus.py b/vdsm/vmstatus.py new file mode 100644 index 0000000..ffab32c --- /dev/null +++ b/vdsm/vmstatus.py @@ -0,0 +1,31 @@ +# +# Copyright 2013 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of 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. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +UP = 'Up' +DOWN = 'Down' +MIGRATION_SOURCE = 'Migration Source' +MIGRATION_DESTINATION = 'Migration Destination' +PAUSED = 'Paused' +POWERING_DOWN = 'Powering down' +POWERING_UP = 'Powering up' +REBOOT_IN_PROGRESS = 'RebootInProgress' +RESTORING_STATE = 'Restoring state' +SAVING_STATE = 'Saving State' +WAIT_FOR_LAUNCH = 'WaitForLaunch' diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index c534c2d..32f67e8 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -1769,6 +1769,8 @@ # # @Powering down: A shutdown command has been sent to the VM # +# @Powering up: The VM is booting +# # @RebootInProgress: The VM is currently rebooting # # @Restoring state: The VM is waking from hibernation
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4931/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5731/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5820/ : FAILURE
Antoni Segura Puimedon has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 1:
(1 comment)
.................................................... File vdsm/vm.py Line 228: # if the guest was stopped before migration, we need to cont it Line 229: if self._mode == 'file' or self._method != 'online': Line 230: self._vm.cont() Line 231: # either way, migration has finished Line 232: self._vm.lastStatus = vmstats.UP s/vmstats/vmstatus/ Line 233: Line 234: def _finishSuccessfully(self): Line 235: self.status['progress'] = 100 Line 236: if self._mode != 'file':
Vinzenz Feenstra has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 1:
(1 comment)
.................................................... File vdsm/vm.py Line 228: # if the guest was stopped before migration, we need to cont it Line 229: if self._mode == 'file' or self._method != 'online': Line 230: self._vm.cont() Line 231: # either way, migration has finished Line 232: self._vm.lastStatus = vmstats.UP Done Line 233: Line 234: def _finishSuccessfully(self): Line 235: self.status['progress'] = 100 Line 236: if self._mode != 'file':
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4936/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5736/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5825/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 1:
(1 comment)
.................................................... File vdsm/API.py Line 473: except KeyError: Line 474: return errCode['noVM'] Line 475: Line 476: vmParams = v.status() Line 477: if vmParams['status'] in (vmstatus.WAIT_FOR_LAUNCHF, vmstatus.DOWN): s/LAUNCHF/LAUNCH/ Line 478: return errCode['noVM'] Line 479: if params.get('mode') == 'file': Line 480: if 'dst' not in params: Line 481: params['dst'], params['dstparams'] = \
Antoni Segura Puimedon has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 2:
(1 comment)
.................................................... File vdsm/API.py Line 473: except KeyError: Line 474: return errCode['noVM'] Line 475: Line 476: vmParams = v.status() Line 477: if vmParams['status'] in (vmstatus.WAIT_FOR_LAUNCHF, vmstatus.DOWN): s/LAUNCHF/LAUNCH/ Line 478: return errCode['noVM'] Line 479: if params.get('mode') == 'file': Line 480: if 'dst' not in params: Line 481: params['dst'], params['dstparams'] = \
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4937/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5737/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5826/ : SUCCESS
Vinzenz Feenstra has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 2:
(1 comment)
.................................................... File vdsm/API.py Line 473: except KeyError: Line 474: return errCode['noVM'] Line 475: Line 476: vmParams = v.status() Line 477: if vmParams['status'] in (vmstatus.WAIT_FOR_LAUNCHF, vmstatus.DOWN): Done Line 478: return errCode['noVM'] Line 479: if params.get('mode') == 'file': Line 480: if 'dst' not in params: Line 481: params['dst'], params['dstparams'] = \
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 4: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4940/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5740/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5829/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4940/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5740/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5832/ : FAILURE
Antoni Segura Puimedon has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 4: Code-Review+1
Thanks Vinzenz!
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 4: -Verified
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4943/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5743/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5833/ : SUCCESS
Saggi Mizrahi has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 4:
One of SaggiMizrahi's automated scripts discovered this patch might require his approval. Please wait until he had time to check it out.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 5:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/6574/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/5681/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/6487/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/214/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 6:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/6577/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/5684/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/6490/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/217/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 6:
(1 comment)
.................................................... File vdsm/vmstatus.py Line 1: # Line 2: # Copyright 2013 Red Hat, Inc. Bump year? Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by Line 6: # the Free Software Foundation; either version 2 of the License, or
Vinzenz Feenstra has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 6:
(1 comment)
.................................................... File vdsm/vmstatus.py Line 1: # Line 2: # Copyright 2013 Red Hat, Inc. Well I authored it 2013 even if I rebase it that's not a reason. The commit date still contains the date of 2013. Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by Line 6: # the Free Software Foundation; either version 2 of the License, or
Francesco Romani has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 6:
(2 comments)
.................................................... Commit Message Line 6: Line 7: Convert vm status strings to constants Line 8: Line 9: This patch replaces all vmstatuses to constants. Line 10: Additionally added not documented 'Powering up' status to schema. Just wondering if the documentation part deserves a separate patch Line 11: Line 12: Change-Id: I95e6945c2ee9d443e22586f04dc0f9646cc5cbb3
.................................................... File vdsm/vmstatus.py Line 1: # Line 2: # Copyright 2013 Red Hat, Inc. OK, fine then. Line 3: # Line 4: # This program is free software; you can redistribute it and/or modify Line 5: # it under the terms of the GNU General Public License as published by Line 6: # the Free Software Foundation; either version 2 of the License, or
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6206/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/329/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7096/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_storage_functional_tests_localfs/121/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_storage_functional_tests_nfs/60/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/6985/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7: Code-Review+1
Federico Simoncelli has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7: Code-Review+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7:
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6472/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/355/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7256/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7374/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7: -Verified
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7468/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/384/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6677/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7578/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7468/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6677/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7578/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/385/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7468/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6677/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7578/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/386/ : FAILURE
Dan Kenigsberg has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7: Code-Review+2
Much needed, for a long long time. Please have it verified and merged!
Antoni Segura Puimedon has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 7: Code-Review+1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 8:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/397/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6806/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7596/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7706/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 9:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/398/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6809/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7599/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7709/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 9:
I had the chance to run this code together with 21792 and some other minor unrelated patches.
I did: * (intense) test of VM startup/shutdown during benchmarking * recovering: started a VM, restarted VDSM while VM was running * migration source/destination * suspension (hibernation) and re-starting from suspension.
Let me know if this can be enough for verification or, if not, if I can help with some more tests.
Francesco Romani has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 9: Code-Review+1
considering also my previous comment, looks fine.
Francesco Romani has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 9: Verified+1
re-run same as for my previous comment tests on NFS storage, ticking verified.
Dan Kenigsberg has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 9: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Convert vm status strings to constants ......................................................................
Convert vm status strings to constants
This patch replaces all vmstatuses to constants. Additionally added not documented 'Powering up' status to schema.
Change-Id: I95e6945c2ee9d443e22586f04dc0f9646cc5cbb3 Signed-off-by: Vinzenz Feenstra vfeenstr@redhat.com Reviewed-on: http://gerrit.ovirt.org/21790 Reviewed-by: Francesco Romani fromani@redhat.com Tested-by: Francesco Romani fromani@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M tests/functional/storageTests.py M tests/functional/virtTests.py M vdsm.spec.in M vdsm/API.py M vdsm/Makefile.am M vdsm/clientIF.py M vdsm/guestIF.py M vdsm/vm.py A vdsm/vmstatus.py M vdsm_api/vdsmapi-schema.json 10 files changed, 106 insertions(+), 56 deletions(-)
Approvals: Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified; Looks good to me, but someone else must approve
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Convert vm status strings to constants ......................................................................
Patch Set 9:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_install_rpm_sanity_gerrit/419/ : SUCCESS
vdsm-patches@lists.fedorahosted.org