Also verify that node is a SGE submit host

This commit is contained in:
Jeremy Gardais 2021-11-16 10:18:59 +01:00
parent 4b491ed2d4
commit 123f5afaa2
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
4 changed files with 52 additions and 12 deletions

View File

@ -70,11 +70,21 @@ debug_message() { # {{{
# }}}
is_sge_host() { # {{{
## Check if SGE commands (qhost) are available
if [ "$(command -v qhost)" ]; then
return_is_sge_host="0"
## Check if SGE commands (qconf) are available
if [ "$(command -v qconf)" ]; then
debug_message "is_sge_host \
SGE seems present on this host."
### And verify if the host is fully configured as a submit host
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
debug_message "is_sge_host \
The host seems configured as a SGE submit host."
return_is_sge_host="0"
else
return_is_sge_host="1"
debug_message "is_sge_host \
This host is not yet configured as a SGE submit host."
fi
else
return_is_sge_host="1"
debug_message "is_sge_host \

View File

@ -93,11 +93,21 @@ define_vars() { # {{{
# }}}
is_sge_host() { # {{{
## Check if SGE commands (qhost) are available
if [ "$(command -v qhost)" ]; then
return_is_sge_host="0"
## Check if SGE commands (qconf) are available
if [ "$(command -v qconf)" ]; then
debug_message "is_sge_host \
SGE seems present on this host."
### And verify if the host is fully configured as a submit host
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
debug_message "is_sge_host \
The host seems configured as a SGE submit host."
return_is_sge_host="0"
else
return_is_sge_host="1"
debug_message "is_sge_host \
This host is not yet configured as a SGE submit host."
fi
else
return_is_sge_host="1"
debug_message "is_sge_host \

View File

@ -75,11 +75,21 @@ debug_message() { # {{{
# }}}
is_sge_host() { # {{{
## Check if SGE commands (qhost) are available
if [ "$(command -v qhost)" ]; then
return_is_sge_host="0"
## Check if SGE commands (qconf) are available
if [ "$(command -v qconf)" ]; then
debug_message "is_sge_host \
SGE seems present on this host."
### And verify if the host is fully configured as a submit host
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
debug_message "is_sge_host \
The host seems configured as a SGE submit host."
return_is_sge_host="0"
else
return_is_sge_host="1"
debug_message "is_sge_host \
This host is not yet configured as a SGE submit host."
fi
else
return_is_sge_host="1"
debug_message "is_sge_host \

View File

@ -149,11 +149,21 @@ ${sge_hostname} is not the current host."
# }}}
is_sge_host() { # {{{
## Check if SGE commands (qhost) are available
if [ "$(command -v qhost)" ]; then
return_is_sge_host="0"
## Check if SGE commands (qconf) are available
if [ "$(command -v qconf)" ]; then
debug_message "is_sge_host \
SGE seems present on this host."
### And verify if the host is fully configured as a submit host
if qconf -ss | grep --word-regexp --quiet $(hostname -f); then
debug_message "is_sge_host \
The host seems configured as a SGE submit host."
return_is_sge_host="0"
else
return_is_sge_host="1"
debug_message "is_sge_host \
This host is not yet configured as a SGE submit host."
fi
else
return_is_sge_host="1"
debug_message "is_sge_host \