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

mzamazal at redhat.com mzamazal at redhat.com
Mon Feb 1 12:00:24 UTC 2016


Milan Zamazal has posted comments on this change.

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


Patch Set 4: Code-Review-1

(5 comments)

The intention seems to be fine to me, just some clarification and/or polishing is needed.

https://gerrit.ovirt.org/#/c/52884/4//COMMIT_MSG
Commit Message:

Line 9: r
Perio_d_ic ...


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

Line 236:                     vm_id, vm_id)
Line 237: 
Line 238: 
Line 239: @expandPermutations
Line 240: class NumaInfoMonitorTests(TestCaseBase):
Shouldn't we also test for non-swallowing the exceptions?
Line 241: 
Line 242:     def setUp(self):
Line 243:         self.vm_id = _fake_vm_id(0)
Line 244:         self.vm = _FakeVM(self.vm_id, self.vm_id)


Line 258:         self.assertNotRaises(self.op)
Line 259: 
Line 260:     @permutations([[libvirt.VIR_ERR_NO_DOMAIN],
Line 261:                    [libvirt.VIR_ERR_OPERATION_UNSUPPORTED]])
Line 262:     def test_swallow_exceptions_migrated(self, errcode):
Maybe the tests could be merged?
Line 263: 
Line 264:         def fail(*args):
Line 265:             raise fake.Error(errcode)
Line 266: 


Line 325: literally only `id' and `name'
It no longer applies, should the comment be adjusted?


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

Line 294:             self._vm.log.warning('could not run on %s: domain not connected',
Line 295:                                  self._vm.id)
Line 296:         except libvirt.libvirtError as e:
Line 297:             if e.get_error_code() in (libvirt.VIR_ERR_NO_DOMAIN,
Line 298:                                       libvirt.VIR_ERR_OPERATION_UNSUPPORTED,):
It's not clear to me why libvirt.VIR_ERR_OPERATION_UNSUPPORTED is included here. Maybe worth of explanation in the commit message or a comment?
Line 299:                 # known benign cases: migration in progress or completed
Line 300:                 if migrating or self._vm.lastStatus == vmstatus.DOWN:
Line 301:                     return
Line 302:             raise


-- 
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: 4
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