Bug 1538472 - After cold merge in version earlier than 4.1, cold merge will fail in versions greater or equal 4.1
Summary: After cold merge in version earlier than 4.1, cold merge will fail in version...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.20.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.2
: ---
Assignee: Ala Hino
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard:
Depends On:
Blocks: 1544376 1544553
TreeView+ depends on / blocked
 
Reported: 2018-01-25 07:28 UTC by Ala Hino
Modified: 2018-11-28 13:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1544553 (view as bug list)
Environment:
Last Closed: 2018-03-22 15:50:22 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1544853 0 high CLOSED Detect and fix broken volume leases 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3351331 0 None None None 2018-03-22 02:50:41 UTC
oVirt gerrit 68769 0 master MERGED volume: Reinitialize volume lease after rename 2018-02-21 09:29:56 UTC
oVirt gerrit 88020 0 ovirt-4.1 MERGED volume: Reinitialize volume lease after rename 2018-02-21 11:27:16 UTC
oVirt gerrit 88025 0 ovirt-4.2 MERGED volume: Reinitialize volume lease after rename 2018-02-21 12:09:54 UTC

Internal Links: 1544853

Description Ala Hino 2018-01-25 07:28:25 UTC
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.

Comment 1 Red Hat Bugzilla Rules Engine 2018-01-25 07:29:08 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.

Comment 3 Kevin Alon Goldblatt 2018-03-11 11:16:02 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 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 - works fine

Moving to VERIFIED!


Note You need to log in before you can comment on or make changes to this bug.