Skip to content
Snippets Groups Projects
Commit d2f311db authored by Iustin Pop's avatar Iustin Pop
Browse files

Modify ‘ganeti-watcher’ to run verify-disks

This patch modifies the watcher to run the ‘gnt-cluster verify-disks’
command and to log its output (if any).

Reviewed-by: imsnah
parent f4d4e184
No related branches found
No related tags found
Loading
......@@ -349,6 +349,7 @@ class Watcher(object):
notepad = WatcherState()
self.CheckInstances(notepad)
self.CheckDisks(notepad)
self.VerifyDisks()
notepad.Save()
def CheckDisks(self, notepad):
......@@ -417,6 +418,14 @@ class Watcher(object):
msg = Message(NOTICE, "Restart of %s succeeded." % instance.name)
self.messages.append(msg)
def VerifyDisks(self):
"""Run gnt-cluster verify-disks.
"""
result = DoCmd(['gnt-cluster', 'verify-disks', '--lock-retries=15'])
if result.output:
self.messages.append(Message(NOTICE, result.output))
def WriteReport(self, logfile):
"""Log all messages to file.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment