Commit 013ce4ae authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

watcher: Raise error on unknown hook status

Also, remove punctuation from one error message.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 0cc9e018
...@@ -114,6 +114,9 @@ def RunWatcherHooks(): ...@@ -114,6 +114,9 @@ def RunWatcherHooks():
else: else:
logging.debug("Watcher hook %s: success (output: %s)", relname, logging.debug("Watcher hook %s: success (output: %s)", relname,
runresult.output) runresult.output)
raise errors.ProgrammerError("Unknown status %s returned by RunParts",
class Instance(object): class Instance(object):
...@@ -517,7 +520,7 @@ def Main(): ...@@ -517,7 +520,7 @@ def Main():
logging.debug("Not master, exiting") logging.debug("Not master, exiting")
return constants.EXIT_NOTMASTER return constants.EXIT_NOTMASTER
except errors.ResolverError, err: except errors.ResolverError, err:
logging.error("Cannot resolve hostname '%s', exiting.", err.args[0]) logging.error("Cannot resolve hostname '%s', exiting", err.args[0])
return constants.EXIT_NODESETUP_ERROR return constants.EXIT_NODESETUP_ERROR
except errors.JobQueueFull: except errors.JobQueueFull:
logging.error("Job queue is full, can't query cluster state") logging.error("Job queue is full, can't query cluster state")
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