diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py index 98f8d70aaedbb65868a82bf383244bda41d281aa..b7e42bf368e791bca8417fb017eeb6199f89252b 100644 --- a/lib/watcher/__init__.py +++ b/lib/watcher/__init__.py @@ -51,14 +51,19 @@ from ganeti.watcher import state MAXTRIES = 5 -BAD_STATES = [constants.INSTST_ERRORDOWN] -HELPLESS_STATES = [constants.INSTST_NODEDOWN, constants.INSTST_NODEOFFLINE] -NOTICE = 'NOTICE' -ERROR = 'ERROR' # Global LUXI client object client = None +BAD_STATES = frozenset([ + constants.INSTST_ERRORDOWN, + ]) +HELPLESS_STATES = frozenset([ + constants.INSTST_NODEDOWN, + constants.INSTST_NODEOFFLINE, + ]) +NOTICE = "NOTICE" +ERROR = "ERROR" class NotMasterError(errors.GenericError):