11 Replies Latest reply on Apr 30, 2014 2:59 PM by Rajeev Gupta

    Decommissioned server issue

    Rajeev Gupta

      Hello,

       

      I create a Deploy job using NSH Script. When the target servers are being added to the job, if there is any decommissioned server in the list, none of the servers get added to the Deploy job.

       

              if [ -n $TARGET_SERVERS ] && [[ $TARGET_SERVERS != "nul" ]]; then

              [[ $DEBUG = "true" ]] && echo "Submit Debug: Executing for TARGET_SERVERS: $TARGET_SERVERS"

       

       

              TARGET_SERVERS_CSV=`echo $TARGET_SERVERS|sed 's/^ *//'|sed 's/ /,/g'`

              [[ $DEBUG = "true" ]] && echo "Submit Debug: TARGET_SERVERS_CSV:" $TARGET_SERVERS_CSV

       

              # DEPLOY_JOB_KEY=`blcli_execute Job clearTargetServer $DEPLOY_JOB_KEY $TARGET_SERVER`

              blcli_execute Job clearTargetServer $DEPLOY_JOB_KEY $TARGET_SERVER > /dev/null && blcli_storeenv DEPLOY_JOB_KEY

              [[ $DEBUG = "true" ]] && echo "Submit Debug: DEPLOY_JOB_KEY:" $DEPLOY_JOB_KEY

       

              # DEPLOY_JOB_KEY=`blcli_execute Job addTargetServers $DEPLOY_JOB_KEY $TARGET_SERVERS_CSV`

              blcli_execute Job addTargetServers $DEPLOY_JOB_KEY $TARGET_SERVERS_CSV > /dev/null && blcli_storeenv DEPLOY_JOB_KEY

              [[ $DEBUG = "true" ]] && echo "Submit Debug: DEPLOY_JOB_KEY:" $DEPLOY_JOB_KEY

       

       

      1. Is there a possibility to add all the servers (even if the server does not exsists) in the job?

      2. Any mechanism by which I can check the serves before creating the input targets for the job? (Server list can range from 1 to 9999)

       

      I have a BMC ticket opened already (ISS04293808) but the solution from them might be too tricky and long. Find below response from BMC:

       

      blcli_execute Utility updateServersStatus $target1,$target2 2 30000 true

      blcli_execute Server printPropertyValue $target1 AGENT_STATUS

      blcli_storeenv target1status

      blcli_execute Server printPropertyValue $target2 AGENT_STATUS

      blcli_storeenv target2status