Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1635189

Summary: [downstream clone - 4.2.7] Engine marks the snapshot status as OK before the actual snapshot operation
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: ovirt-engineAssignee: Benny Zlotnik <bzlotnik>
Status: CLOSED ERRATA QA Contact: Yosi Ben Shimon <ybenshim>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.2.5CC: ahadas, apinnick, audgiri, bscalio, bzlotnik, ebenahar, gveitmic, gwatson, jcrumple, michael.moir, mkalinin, peli, peter, ratamir, Rhev-m-bugs, sbonazzo, shipatil, tnisan
Target Milestone: ovirt-4.2.7Keywords: ZStream
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.7.4 Doc Type: If docs needed, set a value
Doc Text:
In the current release, the snapshot's status is locked until snapshot creation is complete.
Story Points: ---
Clone Of: 1628909 Environment:
Last Closed: 2018-11-05 15:02:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1628909    
Bug Blocks:    

Description RHV bug bot 2018-10-02 09:58:13 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1628909 +++
======================================================================

Description of problem:

The ovirt-engine is marking the snapshot status as OK before it sends the "snapshot" command to the VM. So if there is a backup automation tool like Commvault is checking the status of the snapshot by looking into this "status", it would assume that the snapshot operation is complete since it would return "OK". So the tool will proceed to the next step of attaching the snapshot disk to the agent VM. Since the status is OK, it will also complete successfully. This ends up in attaching the snapshot disk to the backup agent VM before the actual snapshot operation is complete. Also, the SnapshotVDSCommand can get failed (example bug  1572801) and this will result in attaching an "invalid" snapshot disk to the backup agent VM.


Version-Release number of selected component (if applicable):

rhvm-4.2.6.4-0.1.el7ev.noarch

How reproducible:

100%

Steps to Reproduce:

1. I added a delay in the vdsm code where it freezes the guest filesystem so that I can replicate a snapshot failure.
2. The snapshot status will be changed to OK before it sends the snapshot command to the VM.

Actual results:

The snapshot status is changed to OK immediately after it creates the volume and before it sends the "snapshot" command to the VM.

Expected results:

The snapshot status should be changed to "OK" only after the complete snapshot operation.

Additional info:

(Originally by Nijin Ashok)

Comment 1 RHV bug bot 2018-10-02 09:58:21 UTC
Eyal please have a look.
Arik, do you have any insights from Virt side?

(Originally by Tal Nisan)

Comment 4 RHV bug bot 2018-10-02 09:58:31 UTC
(In reply to Tal Nisan from comment #1)
> Eyal please have a look.
> Arik, do you have any insights from Virt side?

That looks like a regression caused by the relatively recent changes in the create-snapshot command. The snapshot should indeed remain locked until all tasks are finished.

(Originally by Arik Hadas)

Comment 5 RHV bug bot 2018-10-02 09:58:36 UTC
Benny,
Can you please take a look?

(Originally by Eyal Shenitzky)

Comment 6 RHV bug bot 2018-10-02 09:58:42 UTC
(In reply to Arik from comment #3)
> (In reply to Tal Nisan from comment #1)
> > Eyal please have a look.
> > Arik, do you have any insights from Virt side?
> 
> That looks like a regression caused by the relatively recent changes in the
> create-snapshot command. The snapshot should indeed remain locked until all
> tasks are finished.

Actually, I was wrong, it seems that we unlocked the snapshot before calling the live-snapshot verb also in 4.1 [1], before those changes.

[1] https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/CreateAllSnapshotsFromVmCommand.java#L401-L404

(Originally by Arik Hadas)

Comment 7 RHV bug bot 2018-10-02 09:58:46 UTC
So, is it a Virt issue or Storage?

(Originally by Tal Nisan)

Comment 8 RHV bug bot 2018-10-02 09:58:51 UTC
(In reply to Tal Nisan from comment #6)
> So, is it a Virt issue or Storage?

It can go either way but I would keep it as Storage since the storage team is the last to introduce a major change to the way this command operates.

(Originally by Arik Hadas)

Comment 9 RHV bug bot 2018-10-02 09:58:57 UTC
*** Bug 1620087 has been marked as a duplicate of this bug. ***

(Originally by Tal Nisan)

Comment 18 Yosi Ben Shimon 2018-10-10 12:27:40 UTC
Tested using:
ovirt-engine-4.2.7.1-0.1.el7ev.noarch

The snapshot's status stays locked till the snapshot creation completed.

Moving to VERIFIED

Comment 23 errata-xmlrpc 2018-11-05 15:02:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3480

Comment 24 Daniel Gur 2019-08-28 13:13:31 UTC
sync2jira

Comment 25 Daniel Gur 2019-08-28 13:17:44 UTC
sync2jira