Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
22542d6e
Commit
22542d6e
authored
5 years ago
by
Julien Leduc
Browse files
Options
Downloads
Patches
Plain Diff
Adding preflighttest script with a single test that checks TPC capability on FST
parent
a4d2142c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/orchestration/tests/preflighttest.sh
+62
-0
62 additions, 0 deletions
continuousintegration/orchestration/tests/preflighttest.sh
with
62 additions
and
0 deletions
continuousintegration/orchestration/tests/preflighttest.sh
0 → 100755
+
62
−
0
View file @
22542d6e
#!/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
TMPDIR
=
$(
mktemp
-d
--suffix
.testflight
)
FLIGHTTEST_RC
=
0
# flighttest return code
###
# TPC capabilities
#
# if the installed xrootd version is not the same as the one used to compile eos
# Third Party Copy can be broken
#
# Valid check:
# [root@eosctafst0017 ~]# xrdfs
# root://pps-ngtztag6p5ht-minion-2.cern.ch:1101 query config tpc
# 1
#
# invalid check:
# [root@ctaeos /]# xrdfs root://ctaeos.toto.svc.cluster.local:1095 query config tpc
# tpc
TEST_LOG
=
"
${
TMPDIR
}
/tpc_cap.log"
echo
"Checking xrootd TPC capabilities on FSTs:"
kubectl
-n
${
NAMESPACE
}
exec
ctaeos
--
eos node
ls
-m
|
grep
status
=
online |
sed
-e
's/.*hostport=//;s/ .*//'
| xargs
-ifoo
bash
-o
pipefail
-c
"kubectl -n
${
NAMESPACE
}
exec ctaeos -- xrdfs root://foo query config tpc | grep -q 1 && echo foo: OK|| echo foo: KO"
|
tee
${
TEST_LOG
}
if
$(
cat
${
TEST_LOG
}
|
grep
-q
KO
)
;
then
echo
"TPC capabilities: FAILED"
((
FLIGHTTEST_RC+
=
1
))
else
echo
"TPC capabilities: SUCCESS"
fi
echo
rm
-fr
${
TMPDIR
}
exit
${
FLIGHTTEST_RC
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment