Commit b5602d15 authored by Guido Trotter's avatar Guido Trotter
Browse files

LUAddNode: upload files via rpc, not scp

We used to scp all the ssconf files, and the vnc password file to the
new node. With this patch we use the upload_file rpc, specifying just
the new node as a destination. All the files previously copied by scp
are already allowed by the backend.

Reviewed-by: iustinp
parent 90fae627
......@@ -1643,7 +1643,8 @@ class LUAddNode(LogicalUnit):
if self.sstore.GetHypervisorType() == constants.HT_XEN_HVM31:
to_copy.append(constants.VNC_PASSWORD_FILE)
for fname in to_copy:
if not self.ssh.CopyFileToNode(node, fname):
result = rpc.call_upload_file([node], fname)
if not result[node]:
logger.Error("could not copy file %s to node %s" % (fname, node))
if not self.op.readd:
......
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