diff --git a/CHANGELOG.md b/CHANGELOG.md index 459a150e91..d225ebb87d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ CHANGELOG **CHANGES** - Ubuntu 20.04 is no longer supported. +- Support DCV on AL2023 **BUG FIXES** - Fix an issue where Security Group validation failed when a rule contained both IPv4 ranges (IpRanges) and security group references (UserIdGroupPairs). diff --git a/cli/src/pcluster/constants.py b/cli/src/pcluster/constants.py index 8f3c62ad7a..5b7f51b408 100644 --- a/cli/src/pcluster/constants.py +++ b/cli/src/pcluster/constants.py @@ -35,7 +35,7 @@ ] SUPPORTED_OSES_FOR_SCHEDULER = {"slurm": SUPPORTED_OSES, "awsbatch": ["alinux2", "alinux2023"]} UNSUPPORTED_OSES_FOR_MICRO_NANO = ["ubuntu2204", "ubuntu2404", "rhel8", "rocky8", "rhel9", "rocky9"] -UNSUPPORTED_OSES_FOR_DCV = ["alinux2023"] +UNSUPPORTED_OSES_FOR_DCV = [] UNSUPPORTED_ARM_OSES_FOR_DCV = [] UNSUPPORTED_OSES_FOR_LUSTRE = [] DELETE_POLICY = "Delete" diff --git a/cli/tests/pcluster/validators/test_cluster_validators.py b/cli/tests/pcluster/validators/test_cluster_validators.py index f19c78b078..0b26ec0d06 100644 --- a/cli/tests/pcluster/validators/test_cluster_validators.py +++ b/cli/tests/pcluster/validators/test_cluster_validators.py @@ -1809,7 +1809,7 @@ def test_shared_filecache_not_home_validator(mount_dir, expected_message): (False, "alinux2", "t3.micro", None, None, None), # doesn't fail because DCV is disabled (True, "alinux2", "m6g.xlarge", None, None, None), (True, "rhel8", "m6g.xlarge", None, None, None), - (True, "alinux2023", "m6g.xlarge", None, None, "Please double check the os configuration"), + (True, "alinux2023", "m6g.xlarge", None, None, None), ], ) def test_dcv_validator(dcv_enabled, os, instance_type, allowed_ips, port, expected_message): diff --git a/tests/integration-tests/constants.py b/tests/integration-tests/constants.py index cb822950f0..aac5dc53d3 100644 --- a/tests/integration-tests/constants.py +++ b/tests/integration-tests/constants.py @@ -17,7 +17,7 @@ REPOSITORY_ROOT = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..") -UNSUPPORTED_OSES_FOR_DCV = ["alinux2023"] +UNSUPPORTED_OSES_FOR_DCV = [] class NodeType(Enum): diff --git a/tests/integration-tests/tests/dcv/test_dcv.py b/tests/integration-tests/tests/dcv/test_dcv.py index aa54a6f97a..598bcf03f6 100644 --- a/tests/integration-tests/tests/dcv/test_dcv.py +++ b/tests/integration-tests/tests/dcv/test_dcv.py @@ -12,6 +12,7 @@ import logging import os as operating_system import re +import subprocess import pytest import requests @@ -165,7 +166,14 @@ def _test_show_url(cluster, region, dcv_port, access_from, use_login_node=False) # add ssh key to jenkins user known hosts file to avoid ssh keychecking prompt host_keys_file = operating_system.path.expanduser("~/.ssh/known_hosts") + logging.info(f"Add ip address {node_ip} to known hosts file {host_keys_file}") + + result = subprocess.check_output("cat {0}".format(host_keys_file), shell=True) + logging.info(f"Original content of known hosts file {host_keys_file}: {result}") + add_keys_to_known_hosts(node_ip, host_keys_file) + result = subprocess.check_output("cat {0}".format(host_keys_file), shell=True) + logging.info(f"New content of known hosts file {host_keys_file}: {result}") dcv_connect_args = ["pcluster", "dcv-connect", "--cluster-name", cluster.name, "--show-url"] diff --git a/tests/integration-tests/utils.py b/tests/integration-tests/utils.py index 17d2d2273a..8bb78143b2 100644 --- a/tests/integration-tests/utils.py +++ b/tests/integration-tests/utils.py @@ -545,7 +545,7 @@ def get_username_for_os(os): def add_keys_to_known_hosts(hostname, host_keys_file): """Add ssh key for a host to a known_hosts file.""" - os.system("ssh-keyscan -t rsa {0} >> {1}".format(hostname, host_keys_file)) + os.system("ssh-keyscan -t ed25519 {0} >> {1}".format(hostname, host_keys_file)) def remove_keys_from_known_hosts(hostname, host_keys_file, env):