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

Bug 1547894

Summary: [downstream clone - 3.6.12] After cold merge in version earlier than 4.1, cold merge will fail in versions greater or equal 4.1.
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: vdsmAssignee: Ala Hino <ahino>
Status: CLOSED ERRATA QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: amarchuk, amureini, bcholler, bugs, dfodor, eedri, gwatson, kgoldbla, lsurette, mkalinin, nsoffer, ratamir, srevivo, tnisan, ycui, ykaul, ylavi
Target Milestone: ovirt-3.6.12Keywords: ZStream
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1544553
: 1553118 (view as bug list) Environment:
Last Closed: 2018-03-27 07:57:03 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: 1544553    
Bug Blocks: 1553118    

Description RHV bug bot 2018-02-22 08:45:31 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1544553 +++
======================================================================

+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1538472 +++
======================================================================

Description of problem:
After renaming a volume we must reinitialize the volume lease, since
sanlock does not allow querying or acquiring a lease without the correct
lease name.

Steps to Reproduce:
1. create a 4.0 dc
2. create a vm with a single disk
3. create two snapshots: s1 and s2
4. cold merge s1
5. upgrade the dc to 4.1
6. cold merge s2

Actual results:
Following error is raised and the merge fails:

2018-01-21 15:23:48,241+0200 ERROR (tasks/3) [storage.TaskManager.Task] (Task='d1823d98-2e55-4a70-82f6-26532a76ee57') Unexpected error (task:875)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 882, in _run
    return fn(*args, **kargs)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 336, in run
    return self.cmd(*self.argslist, **self.argsdict)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/securable.py", line 79, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/sp.py", line 1862, in prepareMerge
    merge.prepare(subchainInfo)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/merge.py", line 178, in prepare
    with guarded.context(subchain.locks):
  File "/usr/lib/python2.7/site-packages/vdsm/storage/guarded.py", line 102, in __enter__
    six.reraise(*exc)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/guarded.py", line 93, in __enter__
    lock.acquire()
  File "/usr/lib/python2.7/site-packages/vdsm/storage/volume.py", line 1516, in acquire
    dom.acquireVolumeLease(self._host_id, self._img_id, self._vol_id)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/sd.py", line 475, in acquireVolumeLease
    self._domainLock.acquire(hostId, lease)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/clusterlock.py", line 409, in acquire
    "Cannot acquire %s" % (lease,), str(e))
AcquireLockFailure: Cannot obtain lock: u"id=aafed42c-8cc1-4710-ac79-0e9c55420675, rc=-227, out=Cannot acquire Lease(name='fe81c224-210e-4735-b4b6-ffe890581b01', path=u'/rhev/data-center/mnt/rich-nfs-server2.usersys.redhat.com:_home_storage_sd1/aafed42c-8cc1-4710-ac79-0e9c55420675/images/ae9ed879-ae1b-47e4-bcd1-8551972761c4/fe81c224-210e-4735-b4b6-ffe890581b01.lease', offset=0), err=(-227, 'Sanlock resource not acquired', 'Lease resource name is incorrect')"


Expected results:
Cold merge to pass.

(Originally by Ala Hino)

(Originally by rhev-integ)

Comment 1 RHV bug bot 2018-02-22 08:45:39 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

(Originally by rule-engine)

(Originally by rhev-integ)

Comment 7 Kevin Alon Goldblatt 2018-03-14 22:08:21 UTC
Verified with the following code:
--------------------------------------
ovirt-engine-4.1.10.1-0.1.el7.noarch
vdsm-4.19.48-1.el7ev.x86_64

Verified with the following scenario:
--------------------------------------
Steps to verify:

1. create a 3.6 DC
2. create a VM with a disk on block domain
3. create two snapshots: s1 and s2
4. cold merge s1 (the first snapshot created)
5. upgrade the DC to 4.1
6. cold merge s2 successfully complete

Comment 8 Ala Hino 2018-03-18 10:13:23 UTC
(In reply to Kevin Alon Goldblatt from comment #7)
> Verified with the following code:
> --------------------------------------
> ovirt-engine-4.1.10.1-0.1.el7.noarch
> vdsm-4.19.48-1.el7ev.x86_64
> 
> Verified with the following scenario:
> --------------------------------------
> Steps to verify:
> 
> 1. create a 3.6 DC
> 2. create a VM with a disk on block domain
> 3. create two snapshots: s1 and s2
> 4. cold merge s1 (the first snapshot created)
> 5. upgrade the DC to 4.1
> 6. cold merge s2 successfully complete

There was a some confusion with this bug that mistakenly was targeted to 4.1.
This is the 3.6 async bug and it was verified here: https://bugzilla.redhat.com/show_bug.cgi?id=1553118#c8

Comment 11 errata-xmlrpc 2018-03-27 07:57:03 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/RHEA-2018:0593

Comment 12 Franta Kust 2019-05-16 13:07:44 UTC
BZ<2>Jira Resync

Comment 13 Daniel Gur 2019-08-28 13:14:13 UTC
sync2jira

Comment 14 Daniel Gur 2019-08-28 13:18:30 UTC
sync2jira