Omer Frenkel has submitted this change and it was merged.
Change subject: core: remove memory volumes without tasks on snapshot creation failure
core: remove memory volumes without tasks on snapshot creation failure
On the end-action phase of snapshot creation command, we check if the VM
is runningto see whether we should take live snapshot or not. If the VM
is not running and we created images that will be used to store the
memory, we try to remove those images. There was a problem that the
remove image operations created tasks that were not polled (they are not
polled automatically since we're in the end-action phase, and we didn't
explicitly asked to poll them).
Since we have nothing to do in case of failure (if the file deletion
didn't work, it most probably won't work on retry), we now don't create
tasks on those delete image operations.
New command RemoveMemoryVolumesCommand is added to do so, to achieve
better separation of concerns, which will also make it possible to reuse
it on other cases.
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
4 files changed, 160 insertions(+), 1 deletion(-)
Omer Frenkel: Verified; Looks good to me, approved
To view, visit http://gerrit.ovirt.org/19568
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server