Skip to content

Commit a6e665d

Browse files
committed
feature(rolling-upgrade): replace centos9 with rocky10
regular update of a distro version used since centos is about to be deprecated within GCP switching to testing on rocky, and while are it switching to lastest version replace centos-9 (stream) with rocky linux 10
1 parent 99b5677 commit a6e665d

File tree

7 files changed

+23
-11
lines changed

7 files changed

+23
-11
lines changed

jenkins-pipelines/master-triggers/sct_triggers/weekly-master-images-rolling-upgrades-trigger.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ requested_by_user=fruch</properties>
5757
<textParamValueOnNewLine>false</textParamValueOnNewLine>
5858
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
5959
</configs>
60-
<projects>../rolling-upgrade/rolling-upgrade-centos9-test</projects>
60+
<projects>../rolling-upgrade/rolling-upgrade-rocky10-test</projects>
6161
<condition>SUCCESS</condition>
6262
<triggerWithNoParameters>false</triggerWithNoParameters>
6363
<triggerFromChildProjects>false</triggerFromChildProjects>

jenkins-pipelines/oss/rolling-upgrade/rolling-upgrade-centos9.jenkinsfile renamed to jenkins-pipelines/oss/rolling-upgrade/rolling-upgrade-rocky10.jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm)
66
rollingUpgradePipeline(
77
backend: 'gce',
88
base_versions: '', // auto mode
9-
linux_distro: 'centos-9',
10-
gce_image_db: 'https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/family/centos-stream-9',
9+
linux_distro: 'rocky-10',
10+
gce_image_db: 'https://www.googleapis.com/compute/v1/projects/rocky-linux-cloud/global/images/family/rocky-linux-10-optimized-gcp',
1111
base_version_all_sts_versions: true,
1212
test_name: 'upgrade_test.UpgradeTest.test_generic_cluster_upgrade',
1313
test_config: '''["test-cases/upgrades/generic-rolling-upgrade.yaml", "configurations/rolling-upgrade-artifacts.yaml", "configurations/gce/n2-highmem-16.yaml"]''',

sdcm/cluster.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,8 @@ def install_scylla(self, scylla_repo, scylla_version=None):
21192119
version = f"-{scylla_version}" if scylla_version else ""
21202120
self.remoter.sudo('zypper install -y {}{}'.format(self.scylla_pkg(), version))
21212121
else:
2122-
self.install_package(package_name="software-properties-common")
2122+
if self.distro.is_debian11 or self.distro.is_debian12:
2123+
self.install_package(package_name="software-properties-common")
21232124
if self.distro.is_debian11:
21242125
self.install_package(package_name="apt-transport-https gnupg1-curl dirmngr openjdk-11-jre")
21252126
elif self.distro.is_debian12:

sdcm/utils/distro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class DistroBase(enum.Enum):
3636
("RHEL", "rhel", ["7", "8", "9", "10"], DistroBase.RHEL),
3737
("OEL", "ol", ["7", "8", "9"], DistroBase.RHEL),
3838
("AMAZON", "amzn", ["2023"], DistroBase.RHEL),
39-
("ROCKY", "rocky", ["8", "9"], DistroBase.RHEL),
39+
("ROCKY", "rocky", ["8", "9", "10"], DistroBase.RHEL),
4040
("DEBIAN", "debian", ["11", "12"], DistroBase.DEBIAN),
4141
("UBUNTU", "ubuntu", ["20.04", "21.04", "21.10", "22.04", "24.04"], DistroBase.DEBIAN),
4242
("SLES", "sles", ["15"], DistroBase.UNKNOWN),

sdcm/utils/version_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ def get_s3_scylla_repos_mapping(dist_type='centos', dist_version=None):
759759
s3_client: S3Client = boto3.client('s3', region_name=DEFAULT_AWS_REGION)
760760
bucket = 'downloads.scylladb.com'
761761

762-
if dist_type == 'centos':
762+
if dist_type in ('centos', 'rocky', 'rhel'):
763763
response = s3_client.list_objects(Bucket=bucket, Prefix='rpm/centos/', Delimiter='/')
764764

765765
for repo_file in response['Contents']:
@@ -799,7 +799,7 @@ def find_scylla_repo(scylla_version, dist_type='centos', dist_version=None):
799799
Get a repo/list of scylla, based on scylla version match
800800
801801
:param scylla_version: branch version to look for, ex. 'branch-2019.1:latest', 'branch-3.1:l'
802-
:param dist_type: one of ['centos', 'ubuntu', 'debian']
802+
:param dist_type: one of ['centos', 'ubuntu', 'debian', 'rocky', 'rhel']
803803
:param dist_version: family name of the distro version
804804
:raises: ValueError if not found
805805
@@ -820,13 +820,13 @@ def find_scylla_repo(scylla_version, dist_type='centos', dist_version=None):
820820

821821

822822
def get_branched_repo(scylla_version: str,
823-
dist_type: Literal["centos", "ubuntu", "debian"] = "centos",
823+
dist_type: Literal["centos", "ubuntu", "debian", "rocky"] = "centos",
824824
bucket: str = "downloads.scylladb.com") -> Optional[str]:
825825
"""
826826
Get a repo/list of scylla, based on scylla version match
827827
828828
:param scylla_version: branch version to look for, ex. 'branch-2019.1:latest', 'branch-3.1:l'
829-
:param dist_type: one of ['centos', 'ubuntu', 'debian']
829+
:param dist_type: one of ['centos', 'ubuntu', 'debian', 'rocky', 'rhel']
830830
:param bucket: which bucket to download from
831831
:return: str url repo/list, or None if not found
832832
"""
@@ -845,7 +845,7 @@ def get_branched_repo(scylla_version: str,
845845
else:
846846
product = "scylla"
847847

848-
if dist_type == "centos":
848+
if dist_type in ("centos", "rocky", "rhel"):
849849
prefix = f"unstable/{product}/{branch}/rpm/centos/{branch_version}/"
850850
filename = "scylla.repo"
851851
elif dist_type in ("ubuntu", "debian",):

unit_tests/test_base_version.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ def test_2025_1_release_ubuntu():
112112
assert {'6.2', '2024.1', '2024.2'}.issubset(set(version_list))
113113

114114

115+
def test_2025_1_release_rocky():
116+
""" Test that 2025.1 release on centos is returned correct versions """
117+
scylla_repo = url_base + '/branch-2025.4/rpm/centos/2025-02-23T16:19:08Z/scylla.repo'
118+
linux_distro = 'rocky-10'
119+
version_list = general_test(scylla_repo, linux_distro)
120+
assert {'2025.3'} == set(version_list)
121+
122+
115123
def test_2025_1_release_centos():
116124
""" Test that 2025.1 release on centos is returned correct versions """
117125
scylla_repo = url_base + '/branch-2025.1/rpm/centos/2025-02-23T16:19:08Z/scylla.repo'

utils/get_supported_scylla_base_versions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
}
3030
# If new support distro shared repo with others, we need to assign the start support versions. eg: centos8
3131
start_support_versions = {'centos-8': {'scylla': '4.1', 'enterprise': '2021.1'},
32-
'centos-9': {'scylla': '5.4', 'enterprise': '2024.1'}}
32+
'centos-9': {'scylla': '5.4', 'enterprise': '2024.1'},
33+
# oss isn't really supported on rocky10, but we add it here sinc code can't get None value
34+
'rocky-10': {'scylla': None, 'enterprise': '2025.3'},
35+
}
3336
start_support_backend = {'azure': {'scylla': '5.2', 'enterprise': '2023.1'}}
3437

3538
# list of version that are available, but aren't supported, and we should test upgrades from

0 commit comments

Comments
 (0)