Skip to content

Commit

Permalink
Switch to using Provider layer provided Python venv on the blade
Browse files Browse the repository at this point in the history
  • Loading branch information
erl-hpe committed Feb 6, 2025
1 parent f9967fa commit 6bf30cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vtds_cluster_kvm/private/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __init__(self, stack, config, build_dir):
"no cluster configuration found in top level configuration"
)
self.provider_api = None
self.platform_api = None
self.stack = stack
self.build_dir = build_dir
self.blade_config_path = path_join(
Expand Down Expand Up @@ -418,6 +419,7 @@ def __set_node_mac_addresses(self, blade_config):

def prepare(self):
self.provider_api = self.stack.get_provider_api()
self.platform_api = self.stack.get_platform_api()
self.__add_host_blade_net()
blade_config = self.config
self.__expand_node_classes(blade_config)
Expand Down Expand Up @@ -483,9 +485,10 @@ def deploy(self):
DEPLOY_SCRIPT_PATH, "/root/%s" % DEPLOY_SCRIPT_NAME,
False, "upload-cluster-deploy-script-to"
)
python3 = self.platform_api.get_blade_python_executable()
cmd = (
"chmod 755 ./%s;" % DEPLOY_SCRIPT_NAME +
"python3 " +
"%s " % python3 +
"./%s {{ blade_class }} {{ instance }} " % DEPLOY_SCRIPT_NAME +
"blade_cluster_config.yaml "
"/root/ssh_keys"
Expand Down

0 comments on commit 6bf30cc

Please sign in to comment.