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
f0ca5c8a
Commit
f0ca5c8a
authored
5 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[ci] Changes client_ar.sh to use "tapefile ls" instead of "archivefile ls"
parent
24ff324a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
continuousintegration/orchestration/tests/client_ar.sh
+20
-3
20 additions, 3 deletions
continuousintegration/orchestration/tests/client_ar.sh
with
20 additions
and
3 deletions
continuousintegration/orchestration/tests/client_ar.sh
+
20
−
3
View file @
f0ca5c8a
...
...
@@ -56,6 +56,23 @@ annotate() {
}
# Provide an EOS directory and list all filenames under that directory which are on tape.
# This replaces "cta-admin archivefile ls --all" which is deprecated in favour of "tapefile ls"
# Output is sent to stdout
tapefile_ls
()
{
EOS_DIR
=
${
1
:-${
EOS_BASEDIR
}}
eos root://
${
EOSINSTANCE
}
find
--fid
${
EOS_DIR
}
|
\
admin_cta
--json
tape
ls
--fidfile
/dev/stdin |
\
jq
'.[] | .vid'
|
\
xargs admin_cta
--json
tapefile
ls
--lookupnamespace
--vid
|
\
admin_cta
--json
tf
ls
--lookupnamespace
--vid
| jq
'.[] | .df.path'
|
\
sed
's/"//g'
|
\
grep
"^
${
EOS_DIR
}
"
}
while
getopts
"d:e:n:N:s:p:vS:rAPGt:m:"
o
;
do
case
"
${
o
}
"
in
e
)
...
...
@@ -484,7 +501,7 @@ if [[ $REMOVE == 1 ]]; then
die
"Could not launch cta-admin command."
fi
# recount the files on tape as the workflows may have gone further...
INITIALFILESONTAPE
=
$(
admin_cta archiv
efile
ls
--all
|
grep
${
EOS_DIR
}
|
wc
-l
)
INITIALFILESONTAPE
=
$(
tap
efile
_
ls
${
EOS_DIR
}
|
wc
-l
)
echo
"Before starting deletion there are
${
INITIALFILESONTAPE
}
files on tape."
#XrdSecPROTOCOL=sss eos -r 0 0 root://${EOSINSTANCE} rm -Fr ${EOS_DIR} &
KRB5CCNAME
=
/tmp/
${
EOSPOWER_USER
}
/krb5cc_0
XrdSecPROTOCOL
=
krb5 eos root://
${
EOSINSTANCE
}
rm
-Fr
${
EOS_DIR
}
&
...
...
@@ -511,7 +528,7 @@ if [[ $REMOVE == 1 ]]; then
echo
"Timed out after
${
WAIT_FOR_DELETED_FILE_TIMEOUT
}
seconds waiting for file to be deleted from tape"
break
fi
FILESONTAPE
=
$(
admin_cta archiv
efile
ls
--all
>
>(
grep
${
EOS_DIR
}
|
wc
-l
)
2>
>(
cat
>
/tmp/ctaerr
)
)
FILESONTAPE
=
$(
tap
efile
_
ls
${
EOS_DIR
}
>
>(
wc
-l
)
2>
>(
cat
>
/tmp/ctaerr
)
)
if
[[
$(
cat
/tmp/ctaerr |
wc
-l
)
-gt
0
]]
;
then
echo
"cta-admin COMMAND FAILED!!"
echo
"ERROR CTA ERROR MESSAGE:"
...
...
@@ -531,7 +548,7 @@ if [[ $REMOVE == 1 ]]; then
if
[[
${
RETRIEVED
}
-gt
${
DELETED
}
]]
;
then
LASTCOUNT
=
${
DELETED
}
echo
"Some files have not been deleted:"
admin_cta archiv
efile
ls
--all
|
grep
${
EOS_DIR
}
tap
efile
_
ls
${
EOS_DIR
}
else
echo
"All files have been deleted"
LASTCOUNT
=
${
RETRIEVED
}
...
...
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