Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
etf
cmssam
Commits
970797b5
Commit
970797b5
authored
Apr 18, 2018
by
Andrea Sciaba
Browse files
Several fixes to mc test with singularity; singularity now mandatory
parent
16de22c4
Changes
8
Hide whitespace changes
Inline
Side-by-side
SiteTests/MonteCarlo/tests/CE-cms-mc
View file @
970797b5
...
...
@@ -5,7 +5,7 @@ date
# Source the CMS environment
if
[
-n
"
$OSG_GRID
"
]
;
then
[
-f
$OSG_GRID
/setup.sh
]
&&
source
$OSG_GRID
/setup.sh
which gfal-copy
>
/dev/null 2> /dev/null
||
(
[
-f
$OSG_GRID
/setup.sh
]
&&
source
$OSG_GRID
/setup.sh
)
if
[
-d
$OSG_APP
/cmssoft/cms
]
;
then
SW_DIR
=
$OSG_APP
/cmssoft/cms
elif
[
-d
$CVMFS
/cms.cern.ch
]
;
then
...
...
SiteTests/SE/cmssam_xrootd_endpnt.py
View file @
970797b5
...
...
@@ -966,7 +966,7 @@ def probe_contain(args, io):
host
=
(
f
.
get_property
(
'DataServer'
)
).
split
(
":"
,
1
)[
0
]
epnt
=
(
args
.
endpoint
).
split
(
":"
,
1
)[
0
]
cnt
=
len
(
epnt
)
-
epnt
.
find
(
"."
)
if
(
host
[
-
cnt
:]
!
=
epnt
[
-
cnt
:]
):
if
(
host
[
-
cnt
:]
=
=
epnt
[
-
cnt
:]
):
io
.
set_status
(
nap
.
WARNING
,
(
"managed to open foreign test"
+
\
" file
\"
%s
\"
from host %s"
)
%
(
"/store/test/xrootd/"
+
\
site
+
file
[
'name'
],
host
))
...
...
SiteTests/testjob/tests/CE-cms-singularity
View file @
970797b5
...
...
@@ -11,7 +11,7 @@ for LOCATION in \
break
fi
done
export
PATH
HAS_SINGULARITY
=
"False"
export
OSG_SINGULARITY_VERSION
=
`
singularity
--version
2>/dev/null
`
if
[
"x
$OSG_SINGULARITY_VERSION
"
!=
"x"
]
;
then
...
...
@@ -40,13 +40,10 @@ fi
# ERROR : Could not identify basedir for home directory path: /
if
[
"x
$HAS_SINGULARITY
"
=
"xTrue"
]
;
then
SINGULARITY_HOME
=
`
mktemp
-d
`
echo
"
$OSG_SINGULARITY_PATH
exec --home
$SINGULARITY_HOME
:/srv --bind /cvmfs --
bind
$SINGULARITY_HOME
:/srv --pwd /srv --scratch /var/tmp --scratch /tmp
--containall
$OSG_SINGULARITY_IMAGE_DEFAULT
echo Hello World | grep Hello World"
echo
"
$OSG_SINGULARITY_PATH
exec --home
$SINGULARITY_HOME
:/srv --bind /cvmfs --
pwd /srv
--containall
$OSG_SINGULARITY_IMAGE_DEFAULT
echo Hello World | grep Hello World"
if
!
(
$OSG_SINGULARITY_PATH
exec
--home
$SINGULARITY_HOME
:/srv
\
--bind
/cvmfs
\
--bind
$SINGULARITY_HOME
:/srv
\
--pwd
/srv
\
--scratch
/var/tmp
\
--scratch
/tmp
\
--containall
\
"
$OSG_SINGULARITY_IMAGE_DEFAULT
"
\
echo
"Hello World"
\
...
...
SiteTests/testjob/tests/CE-cms-singularity-wrapper
View file @
970797b5
#!/bin/sh
# Useful Information in case of a problem:
echo
"System:
`
/bin/uname
-a
`
"
echo
"Current working directory:
`
/bin/pwd
`
"
/bin/ls
-ld
.
echo
"SAME_SENSOR_HOME =
${
SAME_SENSOR_HOME
}
"
/bin/ls
-ld
${
SAME_SENSOR_HOME
}
echo
"PATH =
${
PATH
}
"
/bin/ls
-l
/cvmfs/cms.cern.ch/SITECONF/local
||
true
# Argument is the name of the test to run inside singularity
TEST_SCRIPT
=
$1
...
...
@@ -14,7 +23,7 @@ for LOCATION in \
break
fi
done
export
PATH
HAS_SINGULARITY
=
"True"
export
OSG_SINGULARITY_VERSION
=
`
singularity
--version
2>/dev/null
`
if
[
"x
$OSG_SINGULARITY_VERSION
"
!=
"x"
]
;
then
...
...
@@ -46,8 +55,12 @@ if [ ! -e /cvmfs/oasis.opensciencegrid.org/osg-software/osg-wn-client ]; then
fi
if
[
"
$HAS_SINGULARITY
"
==
"False"
]
;
then
echo
"Executing probe without Singularity..."
exec
$SAME_SENSOR_HOME
/tests/
$TEST_SCRIPT
echo
'ERROR: Singularity not found!'
echo
'summary: SINGULARITY_NOT_FOUND'
exit
$SAME_ERROR
else
echo
"OSG_SINGULARITY_VERSION =
${
OSG_SINGULARITY_VERSION
}
"
echo
"OSG_SINGULARITY_PATH =
${
OSG_SINGULARITY_PATH
}
"
fi
OSG_SINGULARITY_EXTRA_OPTS
=
"--home
${
SAME_SENSOR_HOME
}
:/srv --bind /cvmfs --contain"
...
...
@@ -57,13 +70,11 @@ for VAR in /lfs_roots /cms /hadoop /hdfs /mnt/hadoop /etc/cvmfs/SITECONF; do
OSG_SINGULARITY_EXTRA_OPTS
=
"
$OSG_SINGULARITY_EXTRA_OPTS
--bind
$VAR
"
fi
done
echo
"OSG_SINGULARITY_EXTRA_OPTS =
${
OSG_SINGULARITY_EXTRA_OPTS
}
"
cd
/cvmfs/singularity.opensciencegrid.org
$OSG_SINGULARITY_PATH
exec
$OSG_SINGULARITY_EXTRA_OPTS
\
--bind
${
SAME_SENSOR_HOME
}
:/srv
\
--pwd
/srv
\
--scratch
/var/tmp
\
--scratch
/tmp
\
--ipc
--pid
\
"
$OSG_SINGULARITY_IMAGE_DEFAULT
"
\
/srv/tests/CE-cms-singularity-runner /srv/tests/
${
TEST_SCRIPT
}
...
...
nagios/grid-monitoring-probes-org.cms-etf.spec
View file @
970797b5
...
...
@@ -4,7 +4,7 @@
Summary: WLCG Compliant Probes from %{site}
Name: nagios-plugins-wlcg-org.cms
Version: 1.1.4
8
Version: 1.1.4
9
Release: 1%{?dist}
License: GPL
...
...
@@ -49,6 +49,9 @@ install --directory %{buildroot}/etc/cron.d
/etc/cron.d/cms_glexec
%changelog
* Wed Apr 18 2018 Andrea Sciaba <Andrea.Sciaba@cern.ch> 1.1.49-1.
- glexec test eliminated from isolation test
- removed double binds in singularity
* Mon Mar 5 2018 Andrea Sciaba <Andrea.Sciaba@cern.ch> 1.1.48-1.
- Better error reporting in mc test
- mc test runs in Singularity if available
...
...
nagios/org.cms.glexec/probes/org.cms.glexec/testjob/tests/CE-cms-isolation
View file @
970797b5
...
...
@@ -3,35 +3,4 @@
# CE-cms-isolation
#
# This test runs the Singularity and the glexec tests and passes only if one of the tests passes
export
NAG_OK
=
0
export
NAG_WARNING
=
1
export
NAG_CRITICAL
=
2
export
NAG_UNKNOWN
=
3
$SAME_SENSOR_HOME
/tests/CE-cms-singularity
result
=
$?
if
[
$result
=
$SAME_OK
]
;
then
echo
echo
"Singularity test passed"
exit
$result
else
echo
echo
"Singularity test failed, executing glexec test..."
echo
fi
$SAME_SENSOR_HOME
/tests/glprobe.sh
-v
1
result
=
$?
if
[
$result
=
$NAG_OK
]
;
then
echo
"glexec test passed"
else
echo
"glexec test failed"
echo
"Isolation test failed"
fi
if
[
$result
=
$NAG_OK
]
;
then
exit
$SAME_OK
elif
[
$result
=
$NAG_CRITICAL
]
;
then
exit
$SAME_ERROR
elif
[
$result
=
$NAG_WARNING
]
;
then
exit
$SAME_WARNING
fi
exit
$result
exec
$SAME_SENSOR_HOME
/tests/CE-cms-singularity
nagios/org.cms.glexec/probes/org.cms.glexec/testjob/tests/CE-cms-singularity
View file @
970797b5
...
...
@@ -40,13 +40,10 @@ fi
# ERROR : Could not identify basedir for home directory path: /
if
[
"x
$HAS_SINGULARITY
"
=
"xTrue"
]
;
then
SINGULARITY_HOME
=
`
mktemp
-d
`
echo
"
$OSG_SINGULARITY_PATH
exec --home
$SINGULARITY_HOME
:/srv --bind /cvmfs --
bind
$SINGULARITY_HOME
:/srv --pwd /srv --scratch /var/tmp --scratch /tmp
--containall
$OSG_SINGULARITY_IMAGE_DEFAULT
echo Hello World | grep Hello World"
echo
"
$OSG_SINGULARITY_PATH
exec --home
$SINGULARITY_HOME
:/srv --bind /cvmfs --
pwd /srv
--containall
$OSG_SINGULARITY_IMAGE_DEFAULT
echo Hello World | grep Hello World"
if
!
(
$OSG_SINGULARITY_PATH
exec
--home
$SINGULARITY_HOME
:/srv
\
--bind
/cvmfs
\
--bind
$SINGULARITY_HOME
:/srv
\
--pwd
/srv
\
--scratch
/var/tmp
\
--scratch
/tmp
\
--containall
\
"
$OSG_SINGULARITY_IMAGE_DEFAULT
"
\
echo
"Hello World"
\
...
...
nagios/sam2nagios.sh
View file @
970797b5
...
...
@@ -19,7 +19,7 @@ cp $SAMDIR/SiteTests/SE/srmvometrics.py $NAGDIR/org.cms/srmvometrics.py
chmod
+x
$NAGDIR
/org.cms/srmvometrics.py
#rm -rf $NAGDIR/org.cms/srmvometrics.py.ORIG
mkdir
-p
$NAGDIR
/config
cp
-L
$NAGCONF
/cms.conf
$NAGCONF
/emi.ce.CREAMCE.conf
$NAGCONF
/cms_param_override
-L
$NAGCONF
/cms_glexec
$NAGCONF
/etf_plugin_cms.py
$NAGCONF
/cms_glexec-etf
$NAGDIR
/config/
cp
-L
$NAGCONF
/emi.ce.CREAMCE.conf
-L
$NAGCONF
/cms_glexec
$NAGCONF
/etf_plugin_cms.py
$NAGCONF
/cms_glexec-etf
$NAGDIR
/config/
srcdir
=
$SAMDIR
dstdir
=
$NAGDIR
/org.cms/wnjob/org.cms/probes/org.cms
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment