update local folder to match files acctually used

This commit is contained in:
2024-08-26 17:52:43 +02:00
parent cac9c91222
commit d26631afd2
18 changed files with 118 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/ksh
# $Id: suspend.sh 365 2013-11-18 09:58:17Z kasper $
# This script should be added as the SUSPEND_METHOD in the
# queue definition with a $job_pid, $job_id, and $job_owner arguments.
# e.g. script.sh $job_pid $job_id $job_owner

View File

@@ -1,5 +1,5 @@
#!/usr/bin/ksh
# $Id: term.sh 364 2013-11-18 09:55:05Z kasper $
# This script should be added as the TERMINATE_METHOD in the
# queue definition with $job_pid, $job_id, $job_owner, and interval arguments.
# e.g. script.sh $job_pid $job_id $job_owner 90
@@ -10,16 +10,16 @@ then
exit 1
fi
#echo "Term script Running on: $USER $1 $2 $3 $4" >> ~$3/qdel_log.log
#echo `pgrep -g $1` >> ~$3/qdel_log.log
#echo "Term script Running on $(hostname): $USER $1 $2 $3 $4" >> ~$3/qdel_log.log
#echo $(pgrep -g $1) >> ~$3/qdel_log.log
for sig in 2 15 9
for sig in INT TERM KILL
do
stat=`pgrep -g $1 -u $3`
if [ ! -z "$stat" ]
stat=$(pgrep -g $1 -u $3)
if [ ! -z "${stat}" ]
then
#echo "Sending $sig to $1" >> ~$3/qdel_log.log
/usr/bin/pkill --signal $sig -g $1
#echo "Sending SIG${sig} to $1" >> ~$3/qdel_log.log
/usr/bin/pkill --signal ${sig} -g $1
sleep $4
else
break

View File

@@ -47,7 +47,7 @@ esac
# set other variables
next=$(date -d "${T} minutes" +%Y%m%d%H%M)
script=/opt/SGE/examples/jobs/periodic_sleeper.sh
script=$0
# output some informations
if [ ${debug} -eq 1 ]; then
@@ -58,7 +58,7 @@ if [ ${debug} -eq 1 ]; then
fi
# commands to run in Grid Engine
/opt/SGE/examples/jobs/sleeper.sh ${nap} ${do_echo}
${script} ${nap} ${do_echo}
# re-submit script to execute in T minutes
jobid=$(qsub ${terse} -a ${next} ${script} ${debug_flag} ${T} ${nap})

View File

@@ -16,6 +16,14 @@
# Name the job 'Conda-Test'
#$ -N Conda-Test
# send e-mail after job has finished
# use the -M option to define your e-mail address
# #$ -M my-email@example.org
#$ -m e
# join stdout and stderr in one file
#$ -j y
#############################################################
# initialize conda #
#############################################################

View File

View File

View File

@@ -1,33 +0,0 @@
diff --git a/source/daemons/shepherd/shepherd.c b/source/daemons/shepherd/shepherd.c
index 5af1463..e7b2831 100644
--- a/source/daemons/shepherd/shepherd.c
+++ b/source/daemons/shepherd/shepherd.c
@@ -299,17 +299,24 @@ static int handle_io_file(const char* file, const char* owner, bool rw) {
}
}
- /* reset egid and euid to the stored values */
- if (sge_seteuid(old_euid) != 0) {
- shepherd_trace("Cannot reset euid %s due to %s", owner, strerror(errno));
- SGE_CLOSE(fd);
+ /* set effective user-id to root again, because only root is allowed to change
+ * the euid to any other than the current user-id. */
+ if (sge_seteuid(SGE_SUPERUSER_UID) != 0) {
+ shepherd_trace("Cannot become root due to %s", strerror(errno));
return -1;
}
+
+ /* reset egid and euid to the stored values (e.g. those of the sgeadmin user) */
if (sge_setegid(old_egid) != 0) {
shepherd_trace("Cannot reset egid %s due to %s", owner, strerror(errno));
SGE_CLOSE(fd);
return -1;
}
+ if (sge_seteuid(old_euid) != 0) {
+ shepherd_trace("Cannot reset euid %s due to %s", owner, strerror(errno));
+ SGE_CLOSE(fd);
+ return -1;
+ }
return fd;
}

View File

@@ -0,0 +1 @@
/bin/true

View File

@@ -0,0 +1 @@
/bin/true

1
local/prolog.d/00_bin-true Symbolic link
View File

@@ -0,0 +1 @@
/bin/true

25
local/scripts/SGESuspend.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/ksh
# $Id: SGESuspend.sh 365 2013-11-18 09:58:17Z kasper $
# This script should be added as the SUSPEND_METHOD in the
# queue definition with a $job_pid, $job_id, and $job_owner arguments.
# e.g. script.sh $job_pid $job_id $job_owner
if [ -z "$3" ]
then
echo "Usage: $0 \$job_pid \$job_id \$job_owner"
exit 1
fi
stat=`pgrep -g $1`
if [ ! -z "$stat" ]
then
#echo "Sending $sig to $1" >> ~$3/qdel_log.log
/usr/bin/pkill --signal SIGTSTP -g $1
else
echo "Process $1 not found for job $2" >> ~$3/qdel_log.log
echo "Unable to suspend." >> ~$3/qdel_log.log
exit 1
fi
#uncomment the following for debugging
#echo "Suspending Job $2 " >> ~$3/qdel_log.log

30
local/scripts/SGETerm.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/ksh
# $Id: SGETerm.sh 364 2013-11-18 09:55:05Z kasper $
# This script should be added as the TERMINATE_METHOD in the
# queue definition with $job_pid, $job_id, $job_owner, and interval arguments.
# e.g. script.sh $job_pid $job_id $job_owner 90
if [ -z "$4" ]
then
echo "Usage: $0 \$job_pid \$job_id \$job_owner interval"
exit 1
fi
#echo "Term script Running on: $USER $1 $2 $3 $4" >> ~$3/qdel_log.log
#echo `pgrep -g $1` >> ~$3/qdel_log.log
for sig in 2 15 9
do
stat=`pgrep -g $1 -u $3`
if [ ! -z "$stat" ]
then
#echo "Sending $sig to $1" >> ~$3/qdel_log.log
/usr/bin/pkill --signal $sig -g $1
sleep $4
else
break
fi
done
#uncomment the following for debugging
#echo "Job $2 killed." >> ~$3/qdel_log.log

11
local/scripts/epilog Executable file
View File

@@ -0,0 +1,11 @@
#! /bin/bash
# $Id: epilog 181 2010-09-17 15:55:28Z kasper $
## Delete the STDOUT and STDERR files (.o and .e) if they are empty
## ( we do not want to delete non-empty files, they may contain useful
## troubleshooting or debug information ... )
##
[ -r $SGE_STDOUT_PATH -a -f $SGE_STDOUT_PATH ] && [ ! -s $SGE_STDOUT_PATH ] && rm -f $SGE_STDOUT_PATH
[ -r $SGE_STDERR_PATH -a -f $SGE_STDERR_PATH ] && [ ! -s $SGE_STDERR_PATH ] && rm -f $SGE_STDERR_PATH
exit 0

1
local/scripts/pe_epilog Symbolic link
View File

@@ -0,0 +1 @@
/bin/true

1
local/scripts/pe_prolog Symbolic link
View File

@@ -0,0 +1 @@
/bin/true

1
local/scripts/prolog Symbolic link
View File

@@ -0,0 +1 @@
/bin/true

5
local/scripts/qlogin_wrapper Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
# $Id: qlogin_wrapper 175 2010-09-15 15:34:28Z kasper $
HOST=$1
PORT=$2
/usr/bin/ssh -XAq -p $PORT $USER@$HOST