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
010f0750
Commit
010f0750
authored
6 years ago
by
Cedric CAFFY
Committed by
Eric Cano
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added simple repack script to archive_retrieve.sh
parent
8cc7a6fe
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
continuousintegration/orchestration/tests/archive_retrieve.sh
+3
-0
3 additions, 0 deletions
...inuousintegration/orchestration/tests/archive_retrieve.sh
continuousintegration/orchestration/tests/simple_repack.sh
+85
-0
85 additions, 0 deletions
continuousintegration/orchestration/tests/simple_repack.sh
with
88 additions
and
0 deletions
continuousintegration/orchestration/tests/archive_retrieve.sh
+
3
−
0
View file @
010f0750
...
...
@@ -41,6 +41,9 @@ kubectl -n ${NAMESPACE} exec client -- bash /root/simple_client_ar.sh || exit 1
kubectl
-n
${
NAMESPACE
}
cp
grep_xrdlog_mgm_for_error.sh ctaeos:/root/grep_xrdlog_mgm_for_error.sh
kubectl
-n
${
NAMESPACE
}
exec
ctaeos
--
bash /root/grep_xrdlog_mgm_for_error.sh
||
exit
1
echo
./simple_repack.sh
-n
${
NAMESPACE
}
||
exit
1
NB_FILES
=
20
FILE_SIZE_KB
=
15
...
...
This diff is collapsed.
Click to expand it.
continuousintegration/orchestration/tests/simple_repack.sh
0 → 100755
+
85
−
0
View file @
010f0750
#!/bin/sh
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
executeReclaim
()
{
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin ta reclaim
-v
$1
echo
"Tape
$1
reclaimed"
}
executeRepack
()
{
WAIT_FOR_REPACK_FILE_TIMEOUT
=
100
echo
echo
"Changing the tape
$1
to FULL status"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin ta ch
-v
$1
-f
true
echo
"Creating the eos directory to put the retrieve files from the repack request"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
rm
-rf
root://ctaeos.cta.svc.cluster.local:1094//eos/ctaeos/repack
kubectl
-n
${
NAMESPACE
}
exec
ctaeos
-ti
--
eos
mkdir
/eos/ctaeos/repack
kubectl
-n
${
NAMESPACE
}
exec
ctaeos
-ti
--
eos
chmod
1777 /eos/ctaeos/repack
echo
"Removing an eventual previous repack request for tape
$1
"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin re
rm
-v
$1
echo
"Launching the repack request on tape
$1
"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin re add
-v
$1
-m
-b
root://ctaeos.cta.svc.cluster.local:1094//eos/ctaeos/repack
SECONDS_PASSED
=
0
while
test
0
=
`
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin re
ls
-v
$1
|
grep
-E
"Complete|Failed"
|
wc
-l
`
;
do
echo
"Waiting for repack request on tape
$1
to be complete: Seconds passed =
$SECONDS_PASSED
"
sleep
1
let
SECONDS_PASSED
=
SECONDS_PASSED+1
if
test
${
SECONDS_PASSED
}
==
${
WAIT_FOR_REPACK_FILE_TIMEOUT
}
;
then
echo
"Timed out after
${
WAIT_FOR_REPACK_FILE_TIMEOUT
}
seconds waiting for tape
$1
to be repacked"
exit
1
fi
done
if
test
1
=
`
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin re
ls
-v
$1
|
grep
-E
"Failed"
|
wc
-l
`
;
then
echo
"Repack failed for tape
$1
"
exit
1
fi
}
echo
"Execution of simple_repack.sh"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin ta
ls
--all
-h
executeRepack V01001
sleep
1
echo
"Reclaiming tape V01001"
executeReclaim V01001
executeRepack V01003
echo
echo
"Summary of the content of the tapes"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin ta
ls
-v
V01001
-h
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin ta
ls
-v
V01003
-h
echo
echo
"Summary of the repack requests"
kubectl
-n
${
NAMESPACE
}
exec
ctacli
-ti
--
cta-admin re
ls
-h
\ No newline at end of file
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