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
078e8364
Commit
078e8364
authored
5 years ago
by
Julien Leduc
Browse files
Options
Downloads
Patches
Plain Diff
Checking sys.retrieve.req_id in CI
parent
88e36c8a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/orchestration/tests/client_ar.sh
+18
-2
18 additions, 2 deletions
continuousintegration/orchestration/tests/client_ar.sh
with
18 additions
and
2 deletions
continuousintegration/orchestration/tests/client_ar.sh
+
18
−
2
View file @
078e8364
...
...
@@ -7,6 +7,7 @@ DATA_SOURCE=/dev/urandom
ARCHIVEONLY
=
0
# Only archive files or do the full test?
DONOTARCHIVE
=
0
# files were already archived in a previous run NEED TARGETDIR
TARGETDIR
=
''
LOGDIR
=
'/var/log'
COMMENT
=
''
# id of the test so that we can track it
...
...
@@ -134,6 +135,9 @@ if [[ "x${TARGETDIR}" = "x" ]]; then
else
EOS_DIR
=
"
${
EOS_BASEDIR
}
/
${
TARGETDIR
}
"
fi
LOGDIR
=
"
${
LOGDIR
}
/
$(
basebane
${
EOS_DIR
}
)
"
mkdir
-p
${
LOGDIR
}
||
die
"Cannot create directory LOGDIR:
${
LOGDIR
}
"
mkdir
-p
${
LOGDIR
}
/xrd_errors
||
die
"Cannot create directory LOGDIR/xrd_errors:
${
LOGDIR
}
/xrd_errors"
STATUS_FILE
=
$(
mktemp
)
ERROR_FILE
=
$(
mktemp
)
...
...
@@ -188,6 +192,12 @@ done | xargs --max-procs=${NB_PROCS} -iTEST_FILE_NAME bash -c "XRD_LOGLEVEL=Dump
# done | xargs -n ${BATCH_SIZE} --max-procs=${NB_BATCH_PROCS} ./batch_xrdcp /tmp/testfile root://${EOSINSTANCE}/${EOS_DIR}/${subdir}
echo
Done.
done
if
[
"0"
!=
"
$(
ls
${
ERROR_DIR
}
2> /dev/null |
wc
-l
)
"
]
;
then
# there were some xrdcp errors
echo
"Several xrdcp errors occured during archival!"
echo
"Please check client pod logs in artifacts"
mv
${
ERROR_DIR
}
/
*
${
LOGDIR
}
/xrd_errors/
fi
COPIED
=
0
COPIED_EMPTY
=
0
...
...
@@ -264,10 +274,16 @@ done
# CAREFULL HERE: ${STATUS_FILE} contains lines like: 99/test9900001
for
((
subdir
=
0
;
subdir <
${
NB_DIRS
}
;
subdir++
))
;
do
echo
-n
"Recalling files to
${
EOS_DIR
}
/
${
subdir
}
using
${
NB_PROCS
}
processes..."
cat
${
STATUS_FILE
}
|
grep
^
${
subdir
}
/ |
cut
-d
/
-f2
| xargs
--max-procs
=
${
NB_PROCS
}
-iTEST_FILE_NAME
bash
-c
"XRD_LOGLEVEL=Dump KRB5CCNAME=/tmp/
${
EOSPOWER_USER
}
/krb5cc_0 XrdSecPROTOCOL=krb5 xrdfs
${
EOSINSTANCE
}
prepare -s
${
EOS_DIR
}
/
${
subdir
}
/TEST_FILE_NAME?activity=T0Reprocess 2>
${
ERROR_DIR
}
/RETRIEVE_TEST_FILE_NAME && rm
${
ERROR_DIR
}
/RETRIEVE_TEST_FILE_NAME || echo ERROR with xrootd transfer for file TEST_FILE_NAME, full logs in
${
ERROR_DIR
}
/RETRIEVE_TEST_FILE_NAME"
>
/dev/null
cat
${
STATUS_FILE
}
|
grep
^
${
subdir
}
/ |
cut
-d
/
-f2
| xargs
--max-procs
=
${
NB_PROCS
}
-iTEST_FILE_NAME
bash
-c
"XRD_LOGLEVEL=Dump KRB5CCNAME=/tmp/
${
EOSPOWER_USER
}
/krb5cc_0 XrdSecPROTOCOL=krb5 xrdfs
${
EOSINSTANCE
}
prepare -s
${
EOS_DIR
}
/
${
subdir
}
/TEST_FILE_NAME?activity=T0Reprocess 2>
${
ERROR_DIR
}
/RETRIEVE_TEST_FILE_NAME && rm
${
ERROR_DIR
}
/RETRIEVE_TEST_FILE_NAME || echo ERROR with xrootd transfer for file TEST_FILE_NAME, full logs in
${
ERROR_DIR
}
/RETRIEVE_TEST_FILE_NAME"
|
tee
${
LOGDIR
}
/prepare_
${
subdir
}
.log |
grep
^ERROR
echo
Done.
cat
${
STATUS_FILE
}
|
grep
^
${
subdir
}
/ |
cut
-d
/
-f2
| xargs
--max-procs
=
${
NB_PROCS
}
-iTEST_FILE_NAME
bash
-c
"XRD_LOGLEVEL=Dump KRB5CCNAME=/tmp/
${
EOSPOWER_USER
}
/krb5cc_0 XrdSecPROTOCOL=krb5 xrdfs
${
EOSINSTANCE
}
query opaquefile
${
EOS_DIR
}
/
${
subdir
}
/TEST_FILE_NAME?mgm.pcmd=xattr
\&
mgm.subcmd=get
\&
mgm.xattrname=sys.retrieve.req_id 2>
${
ERROR_DIR
}
/XATTRGET_TEST_FILE_NAME && rm
${
ERROR_DIR
}
/XATTRGET_TEST_FILE_NAME || echo ERROR with xrootd xattr get for file TEST_FILE_NAME, full logs in
${
ERROR_DIR
}
/XATTRGET_TEST_FILE_NAME"
|
tee
${
LOGDIR
}
/prepare_sys.retrieve.req_id_
${
subdir
}
.log |
grep
^ERROR
done
if
[
"0"
!=
"
$(
ls
${
ERROR_DIR
}
2> /dev/null |
wc
-l
)
"
]
;
then
# there were some prepare errors
echo
"Several prepare errors occured during retrieval!"
echo
"Please check client pod logs in artifacts"
mv
${
ERROR_DIR
}
/
*
${
LOGDIR
}
/xrd_errors/
fi
ARCHIVED
=
$(
cat
${
STATUS_FILE
}
|
wc
-l
)
TO_BE_RETRIEVED
=
$((
${
ARCHIVED
}
-
$(
ls
${
ERROR_DIR
}
/RETRIEVE_
*
2>/dev/null |
wc
-l
)
))
...
...
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