Commit a5d994b6 authored by Petr Pudlak's avatar Petr Pudlak
Browse files

Add the thread identifier parameter to gnt-debug listlocks



.. to comply with the updated WConfd interface.

This makes the call less useful as the thread ID is often unknown to
users. This needs to be improved in the future.
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 6ea039ef
......@@ -639,12 +639,12 @@ def Wconfd(opts, args): # pylint: disable=W0613
result = wconfd.Client().Echo(args[1])
print "Answer: %s" % (result,)
elif args[0] == "listlocks":
if len(args) != 2:
ToStderr("Command 'listlocks' takes only precisely argument.")
if len(args) != 3:
ToStderr("Command 'listlocks' takes precisely two arguments.")
return 1
result = \
wconfd.Client().ListLocks(int(args[1]),
utils.livelock.GuessLockfileFor("masterd"))
wconfdcontext = (int(args[1]), int(args[2]),
utils.livelock.GuessLockfileFor("masterd"))
result = wconfd.Client().ListLocks(wconfdcontext)
print "Answer: %s" % (result,)
else:
ToStderr("Command '%s' not supported", args[0])
......
......@@ -138,10 +138,10 @@ Tests the WConf daemon by invoking its ``echo`` function.
A given text is sent to WConfd through RPC, echoed back by WConfd and
printed to the console.
| **wconfd** listlocks *jid*
| **wconfd** listlocks *jid* *threadid*
A request to list the locks owned by the given job id is sent to WConfd
and the answer is displayed.
A request to list the locks owned by the given job id and thread id is
sent to WConfd and the answer is displayed.
.. vim: set textwidth=72 :
.. Local Variables:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment