From 99be00071a77f1d5692b78ad908c9ed34bda2a91 Mon Sep 17 00:00:00 2001 From: Yaron Kaikov Date: Sun, 10 Nov 2024 21:01:39 +0200 Subject: [PATCH] fix(artifacts): retire amazon2 Based on scylladb/scylladb#18631 (comment) Fixes: scylladb/scylla-cluster-tests#8946 (cherry picked from commit 1568a5a51886199affe308c2b90f3c9ae159a63b) --- configurations/arm/amazon2.yaml | 7 --- docs/artifacts_test.md | 5 -- .../artifacts-amazon2-arm.jenkinsfile | 14 ------ .../artifacts-amazon2.jenkinsfile | 14 ------ .../artifacts-amazon2-arm.jenkinsfile | 14 ------ .../artifacts/artifacts-amazon2.jenkinsfile | 14 ------ sdcm/cluster.py | 7 --- sdcm/cluster_aws.py | 7 +-- sdcm/utils/distro.py | 2 +- test-cases/artifacts/amazon2.yaml | 19 -------- .../artifact_amazon2.result.json | 24 ---------- .../artifact_amazon2.yaml | 48 ------------------- unit_tests/test_utils_distro.py | 6 --- utils/scylla_doctor.py | 2 +- 14 files changed, 3 insertions(+), 180 deletions(-) delete mode 100644 configurations/arm/amazon2.yaml delete mode 100644 jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2-arm.jenkinsfile delete mode 100644 jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2.jenkinsfile delete mode 100644 jenkins-pipelines/oss/artifacts/artifacts-amazon2-arm.jenkinsfile delete mode 100644 jenkins-pipelines/oss/artifacts/artifacts-amazon2.jenkinsfile delete mode 100644 test-cases/artifacts/amazon2.yaml delete mode 100644 unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.result.json delete mode 100644 unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.yaml diff --git a/configurations/arm/amazon2.yaml b/configurations/arm/amazon2.yaml deleted file mode 100644 index 67dc2cfd2c..0000000000 --- a/configurations/arm/amazon2.yaml +++ /dev/null @@ -1,7 +0,0 @@ -ami_id_db_scylla: 'resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2' # Amazon Linux 2 LTS Arm64 latest AMI -region_name: 'eu-west-1' -instance_type_db: 'im4gn.xlarge' -use_preinstalled_scylla: false -# enhanced network isn't supported -append_scylla_setup_args: ' --no-ec2-check ' -use_mgmt: false diff --git a/docs/artifacts_test.md b/docs/artifacts_test.md index 1afd089fd2..af2b10378d 100644 --- a/docs/artifacts_test.md +++ b/docs/artifacts_test.md @@ -14,7 +14,6 @@ There are pipeline files for Jenkins in the repository: vars `-- artifactsPipeline.groovy jenkins-pipelines -|-- artifacts-amazon2.jenkinsfile |-- artifacts-ami.jenkinsfile |-- artifacts-centos7.jenkinsfile |-- artifacts-debian10.jenkinsfile @@ -87,10 +86,6 @@ hydra run-test artifacts_test --backend gce --config test-cases/artifacts/rhel8. hydra run-test artifacts_test --backend aws --config test-cases/artifacts/oel76.yaml ``` -## Amazon Linux 2 -```sh -hydra run-test artifacts_test --backend aws --config test-cases/artifacts/amazon2.yaml -``` ## Ubuntu 22.04 LTS (jammy) ```sh diff --git a/jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2-arm.jenkinsfile b/jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2-arm.jenkinsfile deleted file mode 100644 index d8ded79e22..0000000000 --- a/jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2-arm.jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -#! groovy - -// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43 -def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm) - -artifactsPipeline( - test_config: '''["test-cases/artifacts/amazon2.yaml", "configurations/arm/amazon2.yaml"]''', - backend: 'aws', - region: 'eu-west-1', - provision_type: 'spot_low_price', - - timeout: [time: 30, unit: 'MINUTES'], - post_behavior_db_nodes: 'destroy' -) diff --git a/jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2.jenkinsfile b/jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2.jenkinsfile deleted file mode 100644 index 29b497b13d..0000000000 --- a/jenkins-pipelines/oss/artifacts-offline-install/artifacts-amazon2.jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -#! groovy - -// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43 -def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm) - -artifactsPipeline( - test_config: 'test-cases/artifacts/amazon2.yaml', - backend: 'aws', - region: 'eu-west-1', - provision_type: 'spot_low_price', - - timeout: [time: 60, unit: 'MINUTES'], - post_behavior_db_nodes: 'destroy' -) diff --git a/jenkins-pipelines/oss/artifacts/artifacts-amazon2-arm.jenkinsfile b/jenkins-pipelines/oss/artifacts/artifacts-amazon2-arm.jenkinsfile deleted file mode 100644 index d8ded79e22..0000000000 --- a/jenkins-pipelines/oss/artifacts/artifacts-amazon2-arm.jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -#! groovy - -// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43 -def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm) - -artifactsPipeline( - test_config: '''["test-cases/artifacts/amazon2.yaml", "configurations/arm/amazon2.yaml"]''', - backend: 'aws', - region: 'eu-west-1', - provision_type: 'spot_low_price', - - timeout: [time: 30, unit: 'MINUTES'], - post_behavior_db_nodes: 'destroy' -) diff --git a/jenkins-pipelines/oss/artifacts/artifacts-amazon2.jenkinsfile b/jenkins-pipelines/oss/artifacts/artifacts-amazon2.jenkinsfile deleted file mode 100644 index 29b497b13d..0000000000 --- a/jenkins-pipelines/oss/artifacts/artifacts-amazon2.jenkinsfile +++ /dev/null @@ -1,14 +0,0 @@ -#! groovy - -// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43 -def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm) - -artifactsPipeline( - test_config: 'test-cases/artifacts/amazon2.yaml', - backend: 'aws', - region: 'eu-west-1', - provision_type: 'spot_low_price', - - timeout: [time: 60, unit: 'MINUTES'], - post_behavior_db_nodes: 'destroy' -) diff --git a/sdcm/cluster.py b/sdcm/cluster.py index 8250c47a22..cc0659f744 100644 --- a/sdcm/cluster.py +++ b/sdcm/cluster.py @@ -2023,8 +2023,6 @@ def offline_install_scylla(self, unified_package, nonroot): self.install_package(package_name='python2') # Offline install does't provide openjdk-11, it has to be installed in advance # https://github.com/scylladb/scylla-jmx/issues/127 - if self.distro.is_amazon2: - self.remoter.sudo('amazon-linux-extras install java-openjdk11') elif self.distro.is_amazon2023: self.install_package(package_name="java-11-amazon-corretto-headless") elif self.distro.is_rhel_like: @@ -2950,11 +2948,6 @@ def install_epel(self): if not self.distro.is_rhel_like: raise Exception('EPEL can only be installed for RHEL like distros') - if self.distro.is_amazon2: - # Enable amazon2-extras repo for installing epel - # Reference: https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras - self.remoter.run('sudo amazon-linux-extras install epel') - if self.distro.is_rhel8: self.remoter.run( "sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm") diff --git a/sdcm/cluster_aws.py b/sdcm/cluster_aws.py index 6ca08289a6..aaa0a724e9 100644 --- a/sdcm/cluster_aws.py +++ b/sdcm/cluster_aws.py @@ -410,8 +410,7 @@ def add_nodes(self, count, ec2_user_data='', dc_idx=0, rack=0, enable_auto_boots node = self._create_node(instance, self._ec2_ami_username, self.node_prefix, self._node_index, self.logdir, dc_idx=dc_idx, rack=node_rack) node.enable_auto_bootstrap = enable_auto_bootstrap - if ssh_connection_ip_type(self.params) == 'ipv6' and not node.distro.is_amazon2 and \ - not node.distro.is_ubuntu: + if ssh_connection_ip_type(self.params) == 'ipv6' and not node.distro.is_ubuntu: node.config_ipv6_as_persistent() self.nodes.append(node) self.write_node_public_ip_file() @@ -864,10 +863,6 @@ def traffic_control(self, tcconfig_params=None): self.remoter.run('sudo bash -cxe "%s"' % tc_command) def install_traffic_control(self): - if self.distro.is_amazon2: - self.log.debug("Installing iproute-tc package for AMAZON2") - self.remoter.run("sudo yum install -y iproute-tc", ignore_status=True) - return self.remoter.run("/sbin/tc -h", ignore_status=True).ok @property diff --git a/sdcm/utils/distro.py b/sdcm/utils/distro.py index 2bf5e9594c..4b1033cf7a 100644 --- a/sdcm/utils/distro.py +++ b/sdcm/utils/distro.py @@ -35,7 +35,7 @@ class DistroBase(enum.Enum): ("CENTOS", "centos", ["7", "8", "9"], DistroBase.RHEL), ("RHEL", "rhel", ["7", "8", "9"], DistroBase.RHEL), ("OEL", "ol", ["7", "8", "9"], DistroBase.RHEL), - ("AMAZON", "amzn", ["2", "2023"], DistroBase.RHEL), + ("AMAZON", "amzn", ["2023"], DistroBase.RHEL), ("ROCKY", "rocky", ["8", "9"], DistroBase.RHEL), ("DEBIAN", "debian", ["10", "11"], DistroBase.DEBIAN), ("UBUNTU", "ubuntu", ["20.04", "21.04", "21.10", "22.04", "24.04"], DistroBase.DEBIAN), diff --git a/test-cases/artifacts/amazon2.yaml b/test-cases/artifacts/amazon2.yaml deleted file mode 100644 index afd21330cb..0000000000 --- a/test-cases/artifacts/amazon2.yaml +++ /dev/null @@ -1,19 +0,0 @@ -ami_db_scylla_user: 'ec2-user' -ami_id_db_scylla: 'resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2' -root_disk_size_db: 50 -backtrace_decoding: false -cluster_backend: 'aws' -instance_type_db: 'i4i.large' -instance_provision: "spot" -instance_provision_fallback_on_demand: true -logs_transport: 'ssh' -n_db_nodes: 1 -n_loaders: 0 -n_monitor_nodes: 0 -nemesis_class_name: 'NoOpMonkey' -region_name: 'eu-west-1' -scylla_linux_distro: 'centos' -test_duration: 60 -use_preinstalled_scylla: false -user_prefix: 'artifacts-amazon2' -aws_fallback_to_next_availability_zone: true diff --git a/unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.result.json b/unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.result.json deleted file mode 100644 index fd2921824f..0000000000 --- a/unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.result.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "broadcast_address": "__NODE_PUBLIC_ADDRESS__", - "broadcast_rpc_address": "__NODE_PUBLIC_ADDRESS__", - "listen_address": "__NODE_PRIVATE_ADDRESS__", - "endpoint_snitch": "org.apache.cassandra.locator.Ec2Snitch", - "rpc_address": "__NODE_PRIVATE_ADDRESS__", - "cluster_name": "dummy_cluster", - "seed_provider": [ - { - "class_name": "org.apache.cassandra.locator.SimpleSeedProvider", - "parameters": [ - { - "seeds": "__SEED_NODE_IPS__" - } - ] - } - ], - "experimental_features": [], - "prometheus_address": "0.0.0.0", - "alternator_enforce_authorization": false, - "auto_bootstrap": true, - "enable_ipv6_dns_lookup": false, - "hinted_handoff_enabled": false -} diff --git a/unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.yaml b/unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.yaml deleted file mode 100644 index c13e708c9d..0000000000 --- a/unit_tests/test_data/test_scylla_yaml_builders/artifact_amazon2.yaml +++ /dev/null @@ -1,48 +0,0 @@ -ami_db_scylla_user: 'ec2-user' -ami_id_db_scylla: 'ami-099a8245f5daa82bf' -root_disk_size_db: 50 -backtrace_decoding: false -cluster_backend: 'aws' -instance_type_db: 'i4i.large' -instance_provision: "spot" -instance_provision_fallback_on_demand: true -logs_transport: 'ssh' -n_db_nodes: 1 -n_loaders: 0 -n_monitor_nodes: 0 -nemesis_class_name: 'NoOpMonkey' -region_name: 'eu-west-1' -scylla_linux_distro: 'centos' -scylla_repo: 'https://s3.amazonaws.com/downloads.scylladb.com/rpm/centos/scylla-3.3.repo' -test_duration: 60 -use_preinstalled_scylla: false -user_prefix: 'artifacts-amazon2' - -scylla_network_config: -- address: listen_address # Address Scylla listens for connections from other nodes. See storage_port and ssl_storage_ports. - ip_type: ipv4 - public: false - listen_all: false # Should be True when multiple interfaces - Scylla should be listening on all interfaces - use_dns: false - nic: 0 -- address: rpc_address # Address on which Scylla is going to expect Thrift and CQL client connections. - ip_type: ipv4 - public: false - listen_all: false # Should be True when multiple interfaces - Scylla should be listening on all interfaces - use_dns: false - nic: 0 -- address: broadcast_rpc_address # Address that is broadcasted to tell the clients to connect to. Related to rpc_address. - ip_type: ipv4 - public: true # Should be False when multiple interfaces - use_dns: false - nic: 0 -- address: broadcast_address # Address that is broadcasted to tell other Scylla nodes to connect to. Related to listen_address above. - ip_type: ipv4 - public: true # Should be False when multiple interfaces - use_dns: false - nic: 0 # If ipv4 and public is True it has to be primary network interface (device index is 0) -- address: test_communication # Type of IP used to connect to machine instances - ip_type: ipv4 - public: false - use_dns: false - nic: 0 # If ipv4 and public is True it has to be primary network interface (device index is 0) diff --git a/unit_tests/test_utils_distro.py b/unit_tests/test_utils_distro.py index 5bef8b03af..5d5a99898a 100644 --- a/unit_tests/test_utils_distro.py +++ b/unit_tests/test_utils_distro.py @@ -348,12 +348,6 @@ def test_ubuntu22(self): self.assertTrue(distro.is_ubuntu22) self.assertTrue(distro.is_ubuntu) - def test_amazon2(self): - self.assertTrue(Distro.AMAZON2.is_amazon2) - distro = Distro.from_os_release(DISTROS_OS_RELEASE["Amazon Linux 2"]) - self.assertTrue(distro.is_amazon2) - self.assertTrue(distro.is_rhel_like) - def test_amazon2023(self): self.assertTrue(Distro.AMAZON2023.is_amazon2023) distro = Distro.from_os_release(DISTROS_OS_RELEASE["Amazon Linux 2023"]) diff --git a/utils/scylla_doctor.py b/utils/scylla_doctor.py index b0eafaad4d..0991f5c60f 100644 --- a/utils/scylla_doctor.py +++ b/utils/scylla_doctor.py @@ -114,7 +114,7 @@ def filter_out_failed_collectors(self, collector): return True # https://github.com/scylladb/scylladb/issues/18631 - if self.node.distro.is_amazon2 and collector in ["CPUSetCollector", "PerftuneSystemConfigurationCollector"]: + if collector in ["CPUSetCollector", "PerftuneSystemConfigurationCollector"]: return True return False