Commit 6abf7f2c authored by Guido Trotter's avatar Guido Trotter
Browse files

Remove the job queue drain rpc call

This call was introduced but never used. In two years.
Since it's just creating/removing a file it can also be in simpler ways,
without a special rpc call, if/when we need it again. In the meantime,
let's give it to history.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent 7f890059
......@@ -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]
def perspective_jobqueue_set_drain(params):
"""Set/unset the queue drain flag.
drain_flag = params[0]
return backend.JobQueueSetDrainFlag(drain_flag)
# hypervisor ---------------
......@@ -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)
def BlockdevClose(instance_name, disks):
"""Closes the given block devices.
......@@ -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
......@@ -1265,22 +1265,6 @@ class RpcRunner(object):
return cls._StaticMultiNodeCall(node_list, "jobqueue_rename", rename,
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",
def call_hypervisor_validate_params(self, node_list, hvname, hvparams):
"""Validate the hypervisor params.
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