From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: virt: Handle VIR_ERR_OPERATION_INVALID on destroy
......................................................................
virt: Handle VIR_ERR_OPERATION_INVALID on destroy
It may happen that we get VIR_ERR_OPERATION_INVALID from libvirt when we try to
destroy a VM. That means that libvirt still holds some inactive remnant of the
domain object. According to libvirt developers this error is triggered when
trying to call destroy on an inactive VM that is shut off or going to be shut
off very soon. Indeed, we observed the problem on a VM successfully migrated
away. It has been present for very long time, which shouldn't happen. It's
probably some libvirt problem but we are not able to reproduce it, we have just
observed it.
If the VM can't be destroyed, Vdsm still keeps the VM instance and rejects
destroy requests from Engine. As a result Engine sends destroy requests over
and over and the VM can't be started on or migrated to the given host.
To deal with that we ignore the error if the VM is in DOWN status. We just log
a warning about it and proceed with cleanup. The basic problem is handled this
way, if that doesn't help then there is nothing better to do than to restart
libvirt.
Change-Id: I46b5da91cd7ed990c583d3cafc3003e878443d69
Bug-Url:
https://bugzilla.redhat.com/1432876
Backport-To: 4.1
Signed-off-by: Milan Zamazal <mzamazal(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Dan Kenigsberg: Passed CI tests
Francesco Romani: Looks good to me, approved
Milan Zamazal: Verified
--
To view, visit
https://gerrit.ovirt.org/74184
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I46b5da91cd7ed990c583d3cafc3003e878443d69
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>