浏览代码

Merge pull request #14903 from Michael-Gardner/HPCC-25799

HPCC-25799 Add check for killall for thorslaves and fix dependency issue for centos8

Reviewed-By: Xiaoming Wang <xiaoming.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 年之前
父节点
当前提交
d370d88b3e
共有 2 个文件被更改,包括 14 次插入7 次删除
  1. 1 1
      cmake_modules/getpackagerevisionarch.sh
  2. 13 6
      initfiles/bin/init_thorslave.in

+ 1 - 1
cmake_modules/getpackagerevisionarch.sh

@@ -83,7 +83,7 @@ elif [ -e /etc/redhat-release ]; then
   if [ -x /bin/rpm ]; then
     OUTPUT="${OUTPUT}\npackage=rpm"
     OS_GROUP=`/bin/rpm -q --qf "%{NAME}" --whatprovides /etc/redhat-release | sed 's/-release.*//' |  tr '[A-Z]' '[a-z]'`
-    REDHAT_VERSION=`/bin/rpm -q --qf "%{VERSION}" --whatprovides /etc/redhat-release`
+    REDHAT_VERSION=`/bin/rpm -q --qf "%{VERSION}" --whatprovides /etc/redhat-release | cut -f1 -d"."`
     case "$OS_GROUP" in
       "centos" | "fedora")
         if [ ${NOARCH} -eq 0 ]; then

+ 13 - 6
initfiles/bin/init_thorslave.in

@@ -66,6 +66,19 @@ stop_slaves()
 
 start_slaves()
 {
+    
+    # insuring parent directory structure is setup properly
+    mkdir -p $instancedir
+    mkdir -p $(dirname $logfile)
+
+    cd $instancedir
+
+    log "checking killall dependency"
+    if ! killall -V > /dev/null 2>&1 ; then
+        log "killall dependency not met. Cannot start thorslaves"
+        exit 1
+    fi
+
     killall -0 dafilesrv > /dev/null 2>&1
     if [[ $? -ne 0 ]];then
         # insuring dafilesrv is running on the machine as it is a prerequisite
@@ -79,12 +92,6 @@ start_slaves()
         fi
     fi
 
-    # insuring parent directory structure is setup properly
-    mkdir -p $instancedir
-    mkdir -p $(dirname $logfile)
-
-    cd $instancedir
-
     log "dependency dafilesrv started"
 
     ulimit -Sc hard > /dev/null