Bug 830736 - sanlock: race beween add_lockspace and rem_lockspace
sanlock: race beween add_lockspace and rem_lockspace
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sanlock (Show other bugs)
6.3
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: David Teigland
Leonid Natapov
: Reopened, ZStream
: 840065 (view as bug list)
Depends On:
Blocks: 841994 906027
  Show dependency treegraph
 
Reported: 2012-06-11 06:18 EDT by Federico Simoncelli
Modified: 2016-04-26 10:06 EDT (History)
4 users (show)

See Also:
Fixed In Version: sanlock-2.5-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:52:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Federico Simoncelli 2012-06-11 06:18:34 EDT
Description of problem:
Sanlock cannot add lockspaces after restarting wdmd.

Version-Release number of selected component (if applicable):
sanlock-2.3-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
# touch /tmp/test.slk && sanlock direct init -s test:0:/tmp/test.slk:0

# sanlock client add_lockspace -s test:1:/tmp/test.slk:0
add_lockspace
add_lockspace done 0

# sanlock client rem_lockspace -s test:1:/tmp/test.slk:0
rem_lockspace
rem_lockspace done 0

# service wdmd restart
Stopping wdmd:                                             [  OK  ]
Starting wdmd:                                             [  OK  ]

# sanlock client add_lockspace -s test:1:/tmp/test.slk:0
add_lockspace
add_lockspace done -201

2012-06-11 10:13:44+0000 9822 [2023]: s2 lockspace test:1:/tmp/test.slk:0
2012-06-11 10:13:44+0000 9822 [3329]: s2 delta_acquire 1 begin
2012-06-11 10:13:44+0000 9822 [3329]: s2 delta_acquire 1 write 1 2 9822 8f65da42-fc87-423a-ba52-379ddcd995fa.vm-rhev2.i
2012-06-11 10:13:44+0000 9822 [3329]: s2 delta_acquire 1 delta_short_delay 2
2012-06-11 10:13:46+0000 9824 [3329]: s2 wdmd connect failed -111
2012-06-11 10:13:46+0000 9824 [3329]: s2 create_watchdog failed -1
2012-06-11 10:13:46+0000 9824 [3329]: s2 delta_release 1 begin
2012-06-11 10:13:47+0000 9825 [2023]: cmd_add_lockspace 1,9 done -201
  
Actual results:
You cannot add lockspaces.

Expected results:
You should be able to add lockspaces.
Comment 2 David Teigland 2012-06-11 12:16:04 EDT
I tried the same steps and it worked for me.  I also took a quick look at the code and there's no obvious reason why it should fail.
Comment 3 David Teigland 2012-07-09 17:53:51 EDT

*** This bug has been marked as a duplicate of bug 838654 ***
Comment 4 David Teigland 2012-07-13 11:26:29 EDT
deconsolidating
Comment 5 David Teigland 2012-07-13 11:46:15 EDT
*** Bug 840065 has been marked as a duplicate of this bug. ***
Comment 7 David Teigland 2012-07-16 10:54:08 EDT
Sorry about the confusion here; the original example of the problem wasn't accurate, but it came from some real problems in vdsm when adding lockspaces from multiple threads.  Dealing with that required some sanlock enhancements for adding/querying/waiting for lockspaces:

f179f84 daemon: don't put struct space on stack
85de31c daemon: fix add_lockspace that has been removed
fee5d9c sanlock: WAIT flag for sanlock_inq_lockspace
Comment 9 David Teigland 2012-07-17 10:50:30 EDT
Federico, what tests were causing the problems that led to these add/inq lockspace changes?
Comment 13 Leonid Natapov 2012-12-18 11:39:40 EST
sanlock-2.6-2.el6.x86_64. SPM start works well.
Comment 15 errata-xmlrpc 2013-02-21 03:52:40 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0530.html

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