Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace out-of-support CentOS distro with RHEL9 for Manager tests on Azure #9631

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -3157,6 +3157,12 @@ def wait_node_fully_start(self, verbose=True, timeout=3600):
self.log.info('Waiting for native_transport to be ready')
self.wait_native_transport()

def disable_firewall(self) -> None:
self.remoter.sudo('systemctl stop iptables', ignore_status=True)
self.remoter.sudo('systemctl disable iptables', ignore_status=True)
self.remoter.sudo('systemctl stop firewalld', ignore_status=True)
self.remoter.sudo('systemctl disable firewalld', ignore_status=True)


class FlakyRetryPolicy(RetryPolicy):

Expand Down Expand Up @@ -4645,11 +4651,9 @@ def scylla_configure_non_root_installation(self, node, devname):

def node_setup(self, node: BaseNode, verbose: bool = False, timeout: int = 3600): # pylint: disable=too-many-branches,too-many-statements,too-many-locals # noqa: PLR0912, PLR0914
node.wait_ssh_up(verbose=verbose, timeout=timeout)

if node.distro.is_rhel_like:
node.remoter.sudo('systemctl stop iptables', ignore_status=True)
node.remoter.sudo('systemctl disable iptables', ignore_status=True)
node.remoter.sudo('systemctl stop firewalld', ignore_status=True)
node.remoter.sudo('systemctl disable firewalld', ignore_status=True)
node.disable_firewall()

if self.params.get('logs_transport') == 'ssh':
node.install_package('python3')
Expand Down Expand Up @@ -5486,6 +5490,10 @@ def sct_dashboard_json_file_content_update(update_params: dict, json_file: str):
def node_setup(self, node, **kwargs): # pylint: disable=unused-argument
self.log.info('TestConfig in BaseMonitorSet')
node.wait_ssh_up()

if node.distro.is_rhel_like:
node.disable_firewall()

node.disable_daily_triggered_services()
# update repo cache and system after system is up
node.update_repo_cache()
Expand Down Expand Up @@ -5591,6 +5599,15 @@ def install_scylla_monitoring_prereqs(self, node): # pylint: disable=invalid-na
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io
""")
elif node.distro.is_rhel9:
# TODO: Temporary workaround for RHEL9 installation issue https://github.com/moby/moby/issues/49169
# Install packages manually hardcoding the OS version ($releasever) in /etc/yum.repos.d/docker-ce.repo
# After issue resolution, we can return the previous approach with installation script
install_docker_cmd = dedent("""
dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sed -i \"s/\\$releasever/9/g\" /etc/yum.repos.d/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io
""")
else:
install_docker_cmd = dedent("""
curl -fsSL get.docker.com --retry 5 --retry-max-time 300 -o get-docker.sh
Expand Down
6 changes: 3 additions & 3 deletions sdcm/provision/user_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def yum_repos(self) -> Dict:
"yum_repos":
{
"epel-release": {
"baseurl": "http://download.fedoraproject.org/pub/epel/7/$basearch",
"baseurl": "https://dl.fedoraproject.org/pub/epel/9/Everything/$basearch",
"enabled": True,
"failovermethod": "priority",
"gpgcheck": True,
"gpgkey": "http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7",
"name": "Extra Packages for Enterprise Linux 7 - Release"
"gpgkey": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9",
"name": "Extra Packages for Enterprise Linux 9 - Everything"
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion test-cases/manager/manager-regression-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ n_db_nodes: 3
n_loaders: 1
n_monitor_nodes: 1

azure_image_monitor: 'OpenLogic:CentOS:7_9:latest'
azure_image_monitor: 'RedHat:RHEL:9_5:latest'
# Default 50 GB value is changed here as the size of the corresponding disk in the VM image: 64 GB
root_disk_size_monitor: 64

post_behavior_db_nodes: "destroy"
post_behavior_loader_nodes: "destroy"
Expand Down
Loading