Commit 2928f08d authored by Guido Trotter's avatar Guido Trotter
Browse files

LUAddNode: copy the vnc password file also for KVM

Before we used to copy the file if xen-hvm was enabled on the cluster,
no we'll do that if any enabled hypervisor is in the new HTS_USE_VNC
group.

Reviewed-by: iustinp
parent fd4daa3a
......@@ -2178,8 +2178,10 @@ class LUAddNode(LogicalUnit):
logging.error("Copy of file %s to node %s failed", fname, to_node)
to_copy = []
if constants.HT_XEN_HVM in self.cfg.GetClusterInfo().enabled_hypervisors:
enabled_hypervisors = self.cfg.GetClusterInfo().enabled_hypervisors
if constants.HTS_USE_VNC.intersection(enabled_hypervisors):
to_copy.append(constants.VNC_PASSWORD_FILE)
for fname in to_copy:
result = self.rpc.call_upload_file([node], fname)
if result[node].failed or not result[node]:
......
......@@ -325,6 +325,7 @@ HT_XEN_HVM = "xen-hvm"
HT_KVM = "kvm"
HYPER_TYPES = frozenset([HT_XEN_PVM, HT_FAKE, HT_XEN_HVM, HT_KVM])
HTS_REQ_PORT = frozenset([HT_XEN_HVM, HT_KVM])
HTS_USE_VNC = frozenset([HT_XEN_HVM, HT_KVM])
HT_HVM_VNC_BASE_PORT = 5900
HT_HVM_DEFAULT_BOOT_ORDER = 'dc'
......
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