Browse Source

Merge pull request #9141 from Michael-Gardner/HPCC-15943

HPCC-15943 Dafilesrv status check to alleviate port in use issue

Reviewed-By: Xiaoming Wang <xiaoming.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 years ago
parent
commit
84a27307eb
1 changed files with 10 additions and 13 deletions
  1. 10 13
      initfiles/bash/etc/init.d/hpcc_common.in

+ 10 - 13
initfiles/bash/etc/init.d/hpcc_common.in

@@ -395,9 +395,8 @@ start_dafilesrv() {
    if [ $? -ne 0 ];then
       #Dafilesrv is not running so start it , before starting cleanup the lock and pid file.
       cleanupRuntimeEnvironment
-      noStatusCheck=1
       ${INIT_PATH}/dafilesrv setup 1>/dev/null 2>/dev/null
-      startCmd ${compName} ${noStatusCheck}
+      startCmd ${compName} 0
       return $?
    else
       log "Component $compName already started ..."
@@ -412,11 +411,19 @@ startCmd() {
     printf "Starting %-21s" "$compName ..."
     log "compType = $compType"
 
+    local WAITTIME=120
+    local RCSTART=0
+    local SENTINEL_CHECK=1
+
+    if [ ${compType} = "dafilesrv" ]; then
+      SENTINEL_CHECK=0
+    fi
+
     # Creating logfiles for component
     logDir=$log/${compName}
 
     if [[ ${noStatusCheck} -ne 1 ]]; then
-        check_status ${PIDPATH} ${LOCKPATH} ${COMPPIDPATH} 1
+        check_status ${PIDPATH} ${LOCKPATH} ${COMPPIDPATH} ${SENTINEL_CHECK}
         RCSTART=$?
         if [[ ${RCSTART} -eq 4 ]];then
             checkPidExist $PIDPATH
@@ -511,16 +518,6 @@ startCmd() {
 
     eval $startcmd
 
-
-    local WAITTIME=120
-    local RCSTART=0
-    local COMPONENT_HAS_STARTED=0
-    local SENTINEL_CHECK=1
-
-    if [ ${compType} = "dafilesrv" ]; then
-      SENTINEL_CHECK=0
-    fi
-
     while [[ ${WAITTIME} -gt 0 ]]; do
         WAITTIME=`expr ${WAITTIME} - 1`
         check_status ${PIDPATH} ${LOCKPATH} ${COMPPIDPATH} ${SENTINEL_CHECK}