Change in vdsm[master]: vm: narrow down try/except block in releaseVm

danken at redhat.com danken at redhat.com
Mon Jun 16 10:28:20 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: vm: narrow down try/except block in releaseVm
......................................................................


Patch Set 4: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/28024/4/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4570:                     if (e.get_error_code() ==
Line 4571:                        libvirt.VIR_ERR_OPERATION_FAILED):
Line 4572:                         try:
Line 4573:                             self._dom.destroy()
Line 4574:                         except libvirt.libvirtError as e:
this makes it clear that we have a serious bug! if we swallow this error here, we report that destroy succeeded, but the VM may be lurking below, munching its disk.

I think we'd better drop this try block, as well as re-raise the error in case it was not VIR_ERR_OPERATION_FAILED.
Line 4575:                             self.log.warning("Failed to destroy VM '%s'",
Line 4576:                                              self.conf['vmId'], exc_info=True)
Line 4577: 
Line 4578:             if not self.cif.mom:


-- 
To view, visit http://gerrit.ovirt.org/28024
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9c2b60d8f490f9559edad429baf3989e98d05cf6
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list