From 7c3269568543a38157d22edf18933b44cb780c7b Mon Sep 17 00:00:00 2001 From: rafsalas19 <70273488+rafsalas19@users.noreply.github.com> Date: Thu, 18 May 2023 10:20:59 -0400 Subject: [PATCH] Alma bugfix (#58) * changes to common.sh install file to fix python3-dev ALma compatability bug * adding the shutdown of publisher and exporters for HB * adding the shutdown of publisher and exporters for HB part 2 --------- Co-authored-by: Ubuntu --- src/worker/install/common.sh | 2 +- src/worker/shutdown.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/worker/install/common.sh b/src/worker/install/common.sh index bf5db4a..6a18abc 100644 --- a/src/worker/install/common.sh +++ b/src/worker/install/common.sh @@ -8,7 +8,7 @@ distro=`awk -F= '/^NAME/{print $2}' /etc/os-release` if [[ $distro =~ "Ubuntu" ]]; then apt-get install -y python3-dev elif [[ $distro =~ "AlmaLinux" ]]; then - yum install -y python3-dev + yum install -y python3-devel else echo "OS version is not supported" fi diff --git a/src/worker/shutdown.sh b/src/worker/shutdown.sh index cee6129..7b6c3a5 100755 --- a/src/worker/shutdown.sh +++ b/src/worker/shutdown.sh @@ -16,6 +16,7 @@ kill_exporters() { pkill -f "${1}_exporter.py*" pkill -f "net_exporter.py*" pkill -f "node_exporter.py*" + pkill -f "metrics_publisher.py*" } kill_docker() { @@ -38,7 +39,6 @@ kill_docker() { if [ $arch == "nvidia" ]; then kill_exporters $arch - pkill -f "metrics_publisher.py*" pkill -f "^nv-hostengine" if [ $remove_docker == "true" ]; then @@ -50,12 +50,14 @@ if [ $arch == "nvidia" ]; then sleep 3 exit 0 elif [ $arch == "amd" ]; then - kill_exporters $arch - pkill -f "metrics_publisher.py*" + kill_exporters $arch pkill -f "^/opt/rocm/rdc/bin/rdcd" sleep 3 exit 0 else + kill_exporters + kill_docker + sleep 3 echo "No GPU architecture detected" fi exit 0