Skip to content

Commit

Permalink
changes before release (#24)
Browse files Browse the repository at this point in the history
* custom menu handling

- manual configuration of cmu_custom_menu for HA and non HA
- removed support for start/stop for both primary and secondary at same time
- qmgr to print useful info and not just emptiness

* adding sched HA fix

- check for PBS server before restarting scheduler
- some more info in documentation
- added missing path to PBS command
- removing "

* some more minor fixes

some more minor fixes

* moving everything to hpcm_pbspro_connector folder

* Updated README (final draft), remove user dependency for provisioning

* README link on main page

* Reverting OS provisioning support for now.

* Renaming HA to Failover

* Renaming HA to Failover

* Minor changes to setup steps.

* Fixing log message

* manage service with systemctl
  • Loading branch information
vaib authored Sep 28, 2019
1 parent 4694ba3 commit f2ca745
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions hpcm_pbspro_connector/bin/hpcm_pbs_job
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function Task()
if [[ -n "$jobs" ]] ; then
job_list_sample=`${PBS_EXEC}/bin/qstat -n1 $jobs | tail -n +6 | awk '{print $1","$12}' | sed -e 's/\/\w*//g' | sed -e 's/\*\w//g'`
else
echo "No jobs to $task on $node_list"
echo "No suspended jobs to show on $node_list"
exit
fi
elif [[ "$task" == "show_checkpoint" ]] ; then
Expand All @@ -187,11 +187,11 @@ function Task()
if [[ -n "$jobs" ]] ; then
job_list_sample=`${PBS_EXEC}/bin/qstat -n1 $jobs | tail -n +6 | awk '{print $1","$12}' | sed -e 's/\/\w*//g' | sed -e 's/\*\w//g'`
else
echo "No jobs to $task on $node_list"
echo "No checkpointed jobs to show on $node_list"
exit
fi
else
echo "Error: error condition in show_suspend and show_checkpoint"
echo "Error: error condition in show suspend and show checkpoint"
fi

# if job list sample is NOT empty, this section will create an associative array with job, node
Expand Down Expand Up @@ -223,7 +223,7 @@ function Task()
done
done
else
echo "No jobs to $task on $node_list"
echo "No jobs to show on $node_list"
exit
fi
fi
Expand All @@ -241,11 +241,11 @@ function Task()
fi
done
if [[ ! -n "${output%}" ]] ; then
echo "No jobs to $task on $node_list"
echo "No running jobs to show on $node_list"
exit
fi
else
echo "No jobs to $task on $node_list"
echo "No jobs to show on $node_list"
exit
fi
else
Expand Down
6 changes: 3 additions & 3 deletions hpcm_pbspro_connector/bin/hpcm_pbs_mom
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ for node in $cmd ; do
if [ -n "$node_ans" ]; then
case $arg1 in
*stop) $PBS_EXEC/bin/qmgr -c "set node ${node} comment += \"HPCM Administrator stop PBS (`date +%m/%d/%y`)\""
ssh ${node} /etc/init.d/pbs stop ;;
ssh ${node} systemctl stop pbs;;
*restart) $PBS_EXEC/bin/qmgr -c "unset node ${node} comment"
ssh ${node} /etc/init.d/pbs restart ;;
ssh ${node} systemctl restart pbs;;
*start) $PBS_EXEC/bin/qmgr -c "unset node ${node} comment"
ssh ${node} /etc/init.d/pbs start ;;
ssh ${node} systemctl start pbs;;
esac
else
echo "Node: $node, Error: Unknown node"
Expand Down
30 changes: 15 additions & 15 deletions hpcm_pbspro_connector/bin/hpcm_pbs_server_scheduler
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,18 @@ if [ -n "$2" ]; then
if [ "$2" == "primary" ]; then
if [ "${node}" == "${PBS_SERVER}" ]; then
case $1 in
*stop) /etc/init.d/pbs stop ;;
*restart) /etc/init.d/pbs restart ;;
*start) /etc/init.d/pbs start ;;
*stop) systemctl stop pbs;;
*restart) systemctl restart pbs;;
*start) systemctl start pbs;;
esac
else
case $1 in
*stop) echo "Stopping Primary PBS Server/Scheduler on ${PBS_PRIMARY}"
ssh ${PBS_PRIMARY} /etc/init.d/pbs stop ;;
ssh ${PBS_PRIMARY} systemctl stop pbs;;
*restart) echo "Restart Primary PBS Server/Scheduler on ${PBS_PRIMARY}"
ssh ${PBS_PRIMARY} /etc/init.d/pbs restart ;;
ssh ${PBS_PRIMARY} systemctl restart pbs;;
*start) echo "Starting Primary PBS Server/Scheduler on ${PBS_PRIMARY}"
ssh ${PBS_PRIMARY} /etc/init.d/pbs start ;;
ssh ${PBS_PRIMARY} systemctl start pbs;;
esac
fi
fi
Expand All @@ -106,28 +106,28 @@ if [ -n "$2" ]; then
# Assuming that secondary will NOT be installed on admin node but can be handled if done so
case $1 in
*stop) echo "Stopping Secondary PBS Server/Scheduler on ${PBS_SECONDARY}"
ssh ${PBS_SECONDARY} /etc/init.d/pbs stop ;;
ssh ${PBS_SECONDARY} systemctl stop pbs;;
*restart) echo "Restart Secondary PBS Server/Scheduler on ${PBS_SECONDARY}"
ssh ${PBS_SECONDARY} /etc/init.d/pbs restart ;;
ssh ${PBS_SECONDARY} systemctl restart pbs;;
*start) echo "Starting Secondary PBS Server/Scheduler on ${PBS_SECONDARY}"
ssh ${PBS_SECONDARY} /etc/init.d/pbs start ;;
ssh ${PBS_SECONDARY} systemctl start pbs;;
esac
fi
else
if [ "${node}" == "${PBS_SERVER}" ]; then
case $1 in
*stop) /etc/init.d/pbs stop ;;
*restart) /etc/init.d/pbs restart ;;
*start) /etc/init.d/pbs start ;;
*stop) systemctl stop pbs;;
*restart) systemctl restart pbs;;
*start) systemctl start pbs;;
esac
else
case $1 in
*stop) echo "Stopping PBS Server/Scheduler on ${PBS_SERVER}"
ssh ${PBS_SERVER} /etc/init.d/pbs stop ;;
ssh ${PBS_SERVER} systemctl stop pbs;;
*restart) echo "Restart PBS Server/Scheduler on ${PBS_SERVER}"
ssh ${PBS_SERVER} /etc/init.d/pbs restart ;;
ssh ${PBS_SERVER} systemctl restart pbs;;
*start) echo "Starting PBS Server/Scheduler on ${PBS_SERVER}"
ssh ${PBS_SERVER} /etc/init.d/pbs start ;;
ssh ${PBS_SERVER} systemctl start pbs;;
esac
fi
fi

0 comments on commit f2ca745

Please sign in to comment.