Skip to content

Commit

Permalink
Merge pull request #219 from rynge/SOFTWARE-4803-2
Browse files Browse the repository at this point in the history
SOFTWARE-4803: Move from static config of OSPool attribute, to runtime
  • Loading branch information
matyasselmeci authored Feb 22, 2023
2 parents d2896ed + 0738c4e commit f621659
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 7 deletions.
24 changes: 23 additions & 1 deletion ospool-pilot/itb-canary/pilot/advertise-base
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# OSG_GLIDEIN_VERSION is an ever-increasing version of the glideins.
# This can be used by negotiators or users, for example to match
# against a glidein newer than some base with new features.
OSG_GLIDEIN_VERSION=686
OSG_GLIDEIN_VERSION=687
#######################################################################


Expand Down Expand Up @@ -251,6 +251,28 @@ fi

advertise OSG_GLIDEIN_VERSION $OSG_GLIDEIN_VERSION "I"

# OSPool - this attribute should _only_ be set to True if
# the EP is registering to the production OSPool CMs, and
# it is a generally availalbe EP for fairshare (that is,
# no project or other START restrictions)
GLIDEIN_Collector=$(get_glidein_config_value GLIDEIN_Collector)
GLIDECLIENT_Group=$(get_glidein_config_value GLIDECLIENT_Group)
GLIDEIN_Start_Extra=$(get_glidein_config_value GLIDEIN_Start_Extra)
OSG_PROJECT_NAME=$(get_glidein_config_value OSG_PROJECT_NAME)
OSPool="False"
if (echo "$GLIDEIN_Collector" | grep cm-1.ospool.osg-htc.org) >/dev/null 2>&1; then
if (echo "$GLIDECLIENT_Group" | grep -E '^(gpu|main|main-canary)$') >/dev/null 2>&1; then
# gwms - use the group as determining factor
OSPool="True"
elif [ "x$GLIDECLIENT_Group" = "xmain-container" ]; then
# container - need to check if there are extra start expressions
if [ "x$GLIDEIN_Start_Extra" = "xTrue" -a "x$OSG_PROJECT_NAME" = "x" ]; then
OSPool="True"
fi
fi
fi
advertise OSPool "$OSPool" "C"

# we need the "outside" kernel version to be able to steer
# singularity jobs to kernel/glibcs which are not too old
VER=`uname -r | sed 's/-.*//'`
Expand Down
24 changes: 23 additions & 1 deletion ospool-pilot/itb/pilot/advertise-base
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# OSG_GLIDEIN_VERSION is an ever-increasing version of the glideins.
# This can be used by negotiators or users, for example to match
# against a glidein newer than some base with new features.
OSG_GLIDEIN_VERSION=686
OSG_GLIDEIN_VERSION=687
#######################################################################


Expand Down Expand Up @@ -251,6 +251,28 @@ fi

advertise OSG_GLIDEIN_VERSION $OSG_GLIDEIN_VERSION "I"

# OSPool - this attribute should _only_ be set to True if
# the EP is registering to the production OSPool CMs, and
# it is a generally availalbe EP for fairshare (that is,
# no project or other START restrictions)
GLIDEIN_Collector=$(get_glidein_config_value GLIDEIN_Collector)
GLIDECLIENT_Group=$(get_glidein_config_value GLIDECLIENT_Group)
GLIDEIN_Start_Extra=$(get_glidein_config_value GLIDEIN_Start_Extra)
OSG_PROJECT_NAME=$(get_glidein_config_value OSG_PROJECT_NAME)
OSPool="False"
if (echo "$GLIDEIN_Collector" | grep cm-1.ospool.osg-htc.org) >/dev/null 2>&1; then
if (echo "$GLIDECLIENT_Group" | grep -E '^(gpu|main|main-canary)$') >/dev/null 2>&1; then
# gwms - use the group as determining factor
OSPool="True"
elif [ "x$GLIDECLIENT_Group" = "xmain-container" ]; then
# container - need to check if there are extra start expressions
if [ "x$GLIDEIN_Start_Extra" = "xTrue" -a "x$OSG_PROJECT_NAME" = "x" ]; then
OSPool="True"
fi
fi
fi
advertise OSPool "$OSPool" "C"

# we need the "outside" kernel version to be able to steer
# singularity jobs to kernel/glibcs which are not too old
VER=`uname -r | sed 's/-.*//'`
Expand Down
24 changes: 23 additions & 1 deletion ospool-pilot/main-canary/pilot/advertise-base
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# OSG_GLIDEIN_VERSION is an ever-increasing version of the glideins.
# This can be used by negotiators or users, for example to match
# against a glidein newer than some base with new features.
OSG_GLIDEIN_VERSION=686
OSG_GLIDEIN_VERSION=687
#######################################################################


Expand Down Expand Up @@ -251,6 +251,28 @@ fi

advertise OSG_GLIDEIN_VERSION $OSG_GLIDEIN_VERSION "I"

# OSPool - this attribute should _only_ be set to True if
# the EP is registering to the production OSPool CMs, and
# it is a generally availalbe EP for fairshare (that is,
# no project or other START restrictions)
GLIDEIN_Collector=$(get_glidein_config_value GLIDEIN_Collector)
GLIDECLIENT_Group=$(get_glidein_config_value GLIDECLIENT_Group)
GLIDEIN_Start_Extra=$(get_glidein_config_value GLIDEIN_Start_Extra)
OSG_PROJECT_NAME=$(get_glidein_config_value OSG_PROJECT_NAME)
OSPool="False"
if (echo "$GLIDEIN_Collector" | grep cm-1.ospool.osg-htc.org) >/dev/null 2>&1; then
if (echo "$GLIDECLIENT_Group" | grep -E '^(gpu|main|main-canary)$') >/dev/null 2>&1; then
# gwms - use the group as determining factor
OSPool="True"
elif [ "x$GLIDECLIENT_Group" = "xmain-container" ]; then
# container - need to check if there are extra start expressions
if [ "x$GLIDEIN_Start_Extra" = "xTrue" -a "x$OSG_PROJECT_NAME" = "x" ]; then
OSPool="True"
fi
fi
fi
advertise OSPool "$OSPool" "C"

# we need the "outside" kernel version to be able to steer
# singularity jobs to kernel/glibcs which are not too old
VER=`uname -r | sed 's/-.*//'`
Expand Down
24 changes: 23 additions & 1 deletion ospool-pilot/main/pilot/advertise-base
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# OSG_GLIDEIN_VERSION is an ever-increasing version of the glideins.
# This can be used by negotiators or users, for example to match
# against a glidein newer than some base with new features.
OSG_GLIDEIN_VERSION=658
OSG_GLIDEIN_VERSION=659
#######################################################################


Expand Down Expand Up @@ -251,6 +251,28 @@ fi

advertise OSG_GLIDEIN_VERSION $OSG_GLIDEIN_VERSION "I"

# OSPool - this attribute should _only_ be set to True if
# the EP is registering to the production OSPool CMs, and
# it is a generally availalbe EP for fairshare (that is,
# no project or other START restrictions)
GLIDEIN_Collector=$(get_glidein_config_value GLIDEIN_Collector)
GLIDECLIENT_Group=$(get_glidein_config_value GLIDECLIENT_Group)
GLIDEIN_Start_Extra=$(get_glidein_config_value GLIDEIN_Start_Extra)
OSG_PROJECT_NAME=$(get_glidein_config_value OSG_PROJECT_NAME)
OSPool="False"
if (echo "$GLIDEIN_Collector" | grep cm-1.ospool.osg-htc.org) >/dev/null 2>&1; then
if (echo "$GLIDECLIENT_Group" | grep -E '^(gpu|main|main-canary)$') >/dev/null 2>&1; then
# gwms - use the group as determining factor
OSPool="True"
elif [ "x$GLIDECLIENT_Group" = "xmain-container" ]; then
# container - need to check if there are extra start expressions
if [ "x$GLIDEIN_Start_Extra" = "xTrue" -a "x$OSG_PROJECT_NAME" = "x" ]; then
OSPool="True"
fi
fi
fi
advertise OSPool "$OSPool" "C"

# we need the "outside" kernel version to be able to steer
# singularity jobs to kernel/glibcs which are not too old
VER=`uname -r | sed 's/-.*//'`
Expand Down
3 changes: 0 additions & 3 deletions ospool.osg-htc.org/production/frontend-template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@
</credentials>
</security>
<attrs>
<attr name="OSPool" glidein_publish="True" job_publish="False" parameter="True" type="expr" value="True"/>
<attr name="GLIDECLIENT_OSG_VO" glidein_publish="True" job_publish="True" parameter="False" type="string" value="OSG"/>
<attr name="GLIDEIN_GPUS" glidein_publish="True" job_publish="True" parameter="True" type="int" value="1"/>
<attr name="GLIDEIN_Glexec_Use" glidein_publish="True" job_publish="True" parameter="True" type="string" value="NEVER"/>
Expand Down Expand Up @@ -279,7 +278,6 @@
</credentials>
</security>
<attrs>
<attr name="OSPool" glidein_publish="True" job_publish="False" parameter="True" type="expr" value="True"/>
<attr name="GLIDECLIENT_OSG_VO" glidein_publish="True" job_publish="True" parameter="False" type="string" value="OSG"/>
<attr name="GLIDEIN_Glexec_Use" glidein_publish="True" job_publish="True" parameter="True" type="string" value="NEVER"/>
<attr name="SLOTS_LAYOUT" glidein_publish="True" job_publish="True" parameter="False" type="string" value="partitionable"/>
Expand Down Expand Up @@ -349,7 +347,6 @@
</credentials>
</security>
<attrs>
<attr name="OSPool" glidein_publish="True" job_publish="False" parameter="True" type="expr" value="True"/>
<attr name="GLIDECLIENT_OSG_VO" glidein_publish="True" job_publish="True" parameter="False" type="string" value="OSG"/>
<attr name="GLIDEIN_Glexec_Use" glidein_publish="True" job_publish="True" parameter="True" type="string" value="NEVER"/>
<attr name="SLOTS_LAYOUT" glidein_publish="True" job_publish="True" parameter="False" type="string" value="partitionable"/>
Expand Down

0 comments on commit f621659

Please sign in to comment.