Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
2c3bd119
Commit
2c3bd119
authored
Apr 12, 2019
by
Cedric CAFFY
Committed by
Eric Cano
Apr 15, 2019
Browse files
Added a CI repack test job
parent
7a52a8a8
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
2c3bd119
...
...
@@ -168,7 +168,23 @@ archiveretrieve:
tags
:
-
kubernetes
-
mhvtl
repack
:
except
:
-
tags
stage
:
test
retry
:
1
script
:
-
export NAMESPACE="repack-${CTA_BUILD_ID}-$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)"
-
cd continuousintegration/orchestration/; ./run_systemtest.sh -n ${NAMESPACE} -p ${CI_PIPELINE_ID} -s tests/repack.sh -O -D -t
2400
artifacts
:
when
:
always
expire_in
:
30 days
paths
:
-
pod_logs
tags
:
-
kubernetes
-
mhvtl
nightly1
:
stage
:
shouldfail
...
...
continuousintegration/orchestration/tests/client_ar.sh
View file @
2c3bd119
...
...
@@ -244,6 +244,7 @@ fi # DONOTARCHIVE
if
[[
$ARCHIVEONLY
==
1
]]
;
then
echo
"Archiveonly mode: exiting"
test
-z
$TAILPID
||
kill
${
TAILPID
}
&> /dev/null
exit
0
fi
...
...
continuousintegration/orchestration/tests/repack.sh
0 → 100755
View file @
2c3bd119
#!/bin/bash
usage
()
{
cat
<<
EOF
1>&2
Usage:
$0
-n <namespace>
EOF
exit
1
}
while
getopts
"n:"
o
;
do
case
"
${
o
}
"
in
n
)
NAMESPACE
=
${
OPTARG
}
;;
*
)
usage
;;
esac
done
shift
$((
OPTIND-1
))
if
[
-z
"
${
NAMESPACE
}
"
]
;
then
usage
fi
if
[
!
-z
"
${
error
}
"
]
;
then
echo
-e
"ERROR:
\n
${
error
}
"
exit
1
fi
echo
"Preparing namespace for the tests"
./prepare_tests.sh
-n
${
NAMESPACE
}
kubectl
-n
${
NAMESPACE
}
cp
client_helper.sh client:/root/client_helper.sh
NB_FILES
=
500
FILE_SIZE_KB
=
15
echo
echo
"Launching client_ar.sh on client pod"
echo
" Archiving
${
NB_FILES
}
files of
${
FILE_SIZE_KB
}
kB each"
echo
" Archiving files: xrdcp as user1"
kubectl
-n
${
NAMESPACE
}
cp
client_ar.sh client:/root/client_ar.sh
kubectl
-n
${
NAMESPACE
}
exec
client
--
bash /root/client_ar.sh
-n
${
NB_FILES
}
-s
${
FILE_SIZE_KB
}
-p
100
-d
/eos/ctaeos/preprod
-v
-A
||
exit
1
#kubectl -n ${NAMESPACE} exec ctaeos -- bash /root/grep_xrdlog_mgm_for_error.sh || exit 1
source
./repack_helper.sh
vidToRepack1
=
$(
getFirstVidContainingFiles
)
if
[
"
$vidToRepack1
"
!=
"null"
]
then
echo
echo
"Launching a repack on tape
$vidToRepack1
"
echo
writeTapeSummary
$vidToRepack1
executeRepack
$vidToRepack1
echo
echo
"Reclaiming tape
$vidToRepack1
"
executeReclaim
$vidToRepack1
echo
writeTapeSummary
$vidToRepack1
else
echo
"No vid found to repack"
exit
1
fi
vidDestination
=
$(
getFirstVidContainingFiles
)
writeTapeSummary
$vidDestination
\ No newline at end of file
continuousintegration/orchestration/tests/repack_helper.sh
View file @
2c3bd119
...
...
@@ -32,7 +32,7 @@ executeReclaim() {
echo
"Tape
$1
reclaimed"
}
get
VidToRepack
()
{
get
FirstVidContainingFiles
()
{
vidToRepack
=
$(
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin
--json
ta
ls
--all
| jq
-r
'[.[] | select(.occupancy != "0") | select(.lastFseq != 0) | .vid] | .[0]'
)
echo
$vidToRepack
}
...
...
continuousintegration/orchestration/tests/simple_repack.sh
View file @
2c3bd119
...
...
@@ -31,7 +31,7 @@ source ./repack_helper.sh
echo
"Execution of simple_repack.sh"
vidToRepack1
=
$(
get
VidToRepack
)
vidToRepack1
=
$(
get
FirstVidContainingFiles
)
if
[
"
$vidToRepack1
"
!=
"null"
]
then
echo
...
...
@@ -47,7 +47,7 @@ else
exit
1
fi
vidToRepack2
=
$(
get
VidToRepack
)
vidToRepack2
=
$(
get
FirstVidContainingFiles
)
if
[
"
$vidToRepack2
"
!=
"null"
]
then
echo
...
...
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