Dan Kenigsberg has submitted this change and it was merged.
Change subject: sampling: statscache: more robust remove()
......................................................................
sampling: statscache: more robust remove()
It is possible that StatsCache.remove() is called for a VM
not yet added to the cache. This would move VDSM into
an inconsistent state, possibly preventing to re-run the same
VM. This is obviously very bad and must be avoided.
A prominent example of this is if a vmMigrationCreate succeeds,
but the asynchronous libvirt domain startup fails.
The source VDSM would correctly issue destroy(),
but the stats cache removal on the destination would fail.
It must be noted that in some still-unclear circumstances,
VDSM receives multiple destroy requests. VDSM reacts correctly
to those requests, except for the fact that this causes
multiple removals from stats_cache, and everyone but
the first would fail (as expected).
This patch
- makes StatsCache.remove() capable of supportting removal
of net-yet-added VMs
- adds log warnings to make sure these events will not
hide more bugs, like the multiple removal due to the failure
to create underlying libvirt domain.
Change-Id: I1748cba3646341d2be799aaf30b81432b009359c
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/40439
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Dan Kenigsberg: Looks good to me, approved
Francesco Romani: Verified
--
To view, visit
https://gerrit.ovirt.org/40439
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1748cba3646341d2be799aaf30b81432b009359c
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(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: automation(a)ovirt.org