#
#
-# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
from ganeti import ht
import ganeti.rapi.client # pylint: disable=W0611
+from ganeti.rapi.client import UsesRapiClient
from ganeti.watcher import nodemaint
from ganeti.watcher import state
continue
if inst.status in HELPLESS_STATES or _CheckForOfflineNodes(nodes, inst):
- logging.info("Skipping instance '%s' because it is in a helpless state or"
- " has offline secondaries", name)
+ logging.info("Skipping instance '%s' because it is in a helpless state"
+ " or has offline secondaries", name)
continue
job.append(opcodes.OpInstanceActivateDisks(instance_name=name))
parser.add_option("--wait-children", dest="wait_children",
action="store_true", help="Wait for child processes")
parser.add_option("--no-wait-children", dest="wait_children",
- action="store_false", help="Don't wait for child processes")
+ action="store_false",
+ help="Don't wait for child processes")
# See optparse documentation for why default values are not set by options
parser.set_defaults(wait_children=True)
options, args = parser.parse_args()
raise NotMasterError("This is not the master node")
-@rapi.client.UsesRapiClient
+@UsesRapiClient
def _GlobalWatcher(opts):
"""Main function for global watcher.
raise errors.GenericError("Node group '%s' is not known by ssconf" %
group_uuid)
- # Group UUID has been verified and should not contain any dangerous characters
+ # Group UUID has been verified and should not contain any dangerous
+ # characters
state_path = constants.WATCHER_GROUP_STATE_FILE % group_uuid
inst_status_path = constants.WATCHER_GROUP_INSTANCE_STATUS_FILE % group_uuid