Commit a3811745 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

jqueue: Always use rpc.RpcRunner

"from ganeti.rpc import RpcRunner" does not conform to the style guide.

Reviewed-by: iustinp
parent fda5f19f
......@@ -47,8 +47,6 @@ from ganeti import utils
from ganeti import jstore
from ganeti import rpc
from ganeti.rpc import RpcRunner
......@@ -548,7 +546,7 @@ class JobQueue(object):
assert node_name != self._my_hostname
# Clean queue directory on added node
# Upload the whole queue excluding archived jobs
files = [self._GetJobPath(job_id) for job_id in self._GetJobIDsUnlocked()]
......@@ -564,7 +562,8 @@ class JobQueue(object):
result = RpcRunner.call_jobqueue_update([node_name], [node.primary_ip],
result = rpc.RpcRunner.call_jobqueue_update([node_name],
file_name, content)
if not result[node_name]:
logging.error("Failed to upload %s to %s", file_name, node_name)
......@@ -644,7 +643,7 @@ class JobQueue(object):
utils.WriteFile(file_name, data=data)
names, addrs = self._GetNodeIp()
result = RpcRunner.call_jobqueue_update(names, addrs, file_name, data)
result = rpc.RpcRunner.call_jobqueue_update(names, addrs, file_name, data)
self._CheckRpcResult(result, self._nodes,
"Updating %s" % file_name)
......@@ -663,7 +662,7 @@ class JobQueue(object):
os.rename(old, new)
names, addrs = self._GetNodeIp()
result = RpcRunner.call_jobqueue_rename(names, addrs, old, new)
result = rpc.RpcRunner.call_jobqueue_rename(names, addrs, old, new)
self._CheckRpcResult(result, self._nodes,
"Moving %s to %s" % (old, new))
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