diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded index 56acc33c8a836bec385029732c1c4446ea3fe862..281b06183bfa52ba883b1bb3c074d74560a5a432 100755 --- a/daemons/ganeti-noded +++ b/daemons/ganeti-noded @@ -803,15 +803,6 @@ class NodeHttpServer(http.server.HttpServer): # TODO: What if a file fails to rename? return [backend.JobQueueRename(old, new) for old, new in params] - @staticmethod - def perspective_jobqueue_set_drain(params): - """Set/unset the queue drain flag. - - """ - drain_flag = params[0] - return backend.JobQueueSetDrainFlag(drain_flag) - - # hypervisor --------------- @staticmethod diff --git a/lib/backend.py b/lib/backend.py index a60d2f14839f602ac18a57bffbbf4bad25088773..edf65188d6e6dce300c630415f74e6856b2920ab 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -2357,24 +2357,6 @@ def JobQueueRename(old, new): utils.RenameFile(old, new, mkdir=True) -def JobQueueSetDrainFlag(drain_flag): - """Set the drain flag for the queue. - - This will set or unset the queue drain flag. - - @type drain_flag: boolean - @param drain_flag: if True, will set the drain flag, otherwise reset it. - @rtype: truple - @return: always True, None - @warning: the function always returns True - - """ - if drain_flag: - utils.WriteFile(constants.JOB_QUEUE_DRAIN_FILE, data="", close=True) - else: - utils.RemoveFile(constants.JOB_QUEUE_DRAIN_FILE) - - def BlockdevClose(instance_name, disks): """Closes the given block devices. diff --git a/lib/jqueue.py b/lib/jqueue.py index 9e5d83663e04e35ef8432a9620e7f791c4f33417..a830fdae6e04c95145c1de076794e8728fa1c361 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -1026,9 +1026,6 @@ class JobQueue(object): def SetDrainFlag(drain_flag): """Sets the drain flag for the queue. - This is similar to the function L{backend.JobQueueSetDrainFlag}, - and in the future we might merge them. - @type drain_flag: boolean @param drain_flag: Whether to set or unset the drain flag diff --git a/lib/rpc.py b/lib/rpc.py index 813121154dda9d329deed3144865b372c2cbaa2d..e099ddeb5287caa8799f3c0d8679e258a84e1cbb 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -1265,22 +1265,6 @@ class RpcRunner(object): return cls._StaticMultiNodeCall(node_list, "jobqueue_rename", rename, address_list=address_list) - @classmethod - @_RpcTimeout(_TMO_FAST) - def call_jobqueue_set_drain(cls, node_list, drain_flag): - """Set the drain flag on the queue. - - This is a multi-node call. - - @type node_list: list - @param node_list: the list of nodes to query - @type drain_flag: bool - @param drain_flag: if True, will set the drain flag, otherwise reset it. - - """ - return cls._StaticMultiNodeCall(node_list, "jobqueue_set_drain", - [drain_flag]) - @_RpcTimeout(_TMO_NORMAL) def call_hypervisor_validate_params(self, node_list, hvname, hvparams): """Validate the hypervisor params.