Skip to content

Commit

Permalink
CA-315152: gc_force needs to take gc_active lock not running
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Syms <mark.syms@citrix.com>
  • Loading branch information
MarkSymsCtx committed May 7, 2019
1 parent d84c81a commit bbe82a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,7 @@ def gc_force(session, srUuid, force = False, dryRun = False, lockSR = False):
Util.log("=== SR %s: gc_force ===" % srUuid)
init(srUuid)
sr = SR.getInstance(srUuid, session, lockSR, True)
if not lockRunning.acquireNoblock():
if not lockActive.acquireNoblock():
abort(srUuid)
else:
Util.log("Nothing was running, clear to proceed")
Expand Down

2 comments on commit bbe82a8

@BenSimsCitrix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I've missed something, but don't we need to make a change in the "finally" to release the "Active" rather than "Running" lock? Currently, we are still releasing the lockRunning?

@MarkSymsCtx
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I'd checked that but yes we do.

Please sign in to comment.