utils.io.WritePidFile: Improve error reporting
authorMichael Hanselmann <hansmi@google.com>
Thu, 8 Dec 2011 14:33:31 +0000 (15:33 +0100)
committerMichael Hanselmann <hansmi@google.com>
Thu, 8 Dec 2011 16:21:29 +0000 (17:21 +0100)
commitb6522276819f6e63892d411d6ed9a74a09dbccdb
tree6002a69e3e230791a912c759306db7c490387d4d
parent2dbc685719001fbd44cde48a0eab5d07763b8179
utils.io.WritePidFile: Improve error reporting

If the PID file is already locked by another process, try to read
the content and report it as part of the error message.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/errors.py
lib/utils/io.py
test/ganeti.utils.io_unittest.py