Change in vdsm[master]: periodic: ignore known-benign libvirt errors

fromani at redhat.com fromani at redhat.com
Wed Feb 3 14:09:35 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: periodic: ignore known-benign libvirt errors
......................................................................


Patch Set 5:

(2 comments)

https://gerrit.ovirt.org/#/c/52884/5/tests/periodicTests.py
File tests/periodicTests.py:

Line 331:     def __init__(self, vmId, vmName):
Line 332:         self.id = vmId
Line 333:         self.name = vmName
Line 334:         self.migrating = False
Line 335:         self.lastStatus = vmstatus.UP
> minor: Although not required currently, I'd consider moving the defaults to
As the code is right now, _FakeVM here is really minimal. Yes, we have duplication, and this is bad, but I think it is (slightly) better than using the huge clumsy fake.VM.

As per ctor arguments, they help little right now, because I'm creating the fake vm inside setUp, while I tune the values in the testing methods later in the code.
Line 336: 
Line 337:     def isMigrating(self):
Line 338:         return self.migrating
Line 339: 


https://gerrit.ovirt.org/#/c/52884/5/vdsm/virt/periodic.py
File vdsm/virt/periodic.py:

Line 297:             if e.get_error_code() in (libvirt.VIR_ERR_NO_DOMAIN,
Line 298:                                       libvirt.VIR_ERR_OPERATION_UNSUPPORTED,):
Line 299:                 # known benign cases: migration in progress or completed
Line 300:                 if migrating or self._vm.lastStatus == vmstatus.DOWN:
Line 301:                     return
> It may be nicer to use only a single condition keyword and with correct new
OPERATION_UNSUPPORTED is too controversial. Let's split it to another patch.
Line 302:             raise
Line 303: 
Line 304:     def _execute(self):
Line 305:         raise NotImplementedError


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb5618f44870bdca97fa479734514a3c8d81c7d7
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list