On Mon, Aug 23, 2010 at 07:38:41PM +0200, Michael Hanselmann wrote: > This patch adds an initial implementation of a lock monitor, > accessible for the user through “gnt-debug locks”. It currently > shows all resource locks: BGL, nodes and instances. Config and > job queue locks could be shown too, but wouldn't be of much help. > The current owner(s) and mode are also shown. > > Showing pending acquires will require further changes on the > SharedLock internals and is not yet implemented. > > Example output: > $ gnt-debug locks -o name,mode,owner > Name Mode Owner > BGL/BGL shared JobQueue19/Job147 > instances/inst1 exclusive JobQueue19/Job147 > instances/inst2 - - > instances/inst3 - - > instances/inst4 - - > nodes/node1 exclusive JobQueue19/Job147 > nodes/node2 exclusive JobQueue19/Job147 > > Signed-off-by: Michael Hanselmann <[email protected]> > --- > daemons/ganeti-masterd | 5 ++ > lib/cli.py | 6 ++ > lib/locking.py | 142 > +++++++++++++++++++++++++++++++++++++++++++++--- > lib/luxi.py | 4 ++ > man/gnt-debug.sgml | 70 ++++++++++++++++++++++++ > scripts/gnt-debug | 71 ++++++++++++++++++++++++- > 6 files changed, 289 insertions(+), 9 deletions(-)
LGTM, thanks.
