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
01ddc7f2
Commit
01ddc7f2
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[test] Tracks archving a file through multiple logs
parent
2f927a48
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/test/simple_test
+42
-0
42 additions, 0 deletions
continuousintegration/test/simple_test
with
42 additions
and
0 deletions
continuousintegration/test/simple_test
+
42
−
0
View file @
01ddc7f2
...
...
@@ -3,7 +3,9 @@
EOS_MGM_LOG
=
/var/log/eos/mgm/xrdlog.mgm
EOS_WFE_LOG
=
/var/log/eos/mgm/WFE.log
CTA_FRONTEND_LOG
=
/home/cta/cta/cta-frontend.log
CTA_TAPED_LOG
=
/var/log/cta/cta-taped.log
EOS_INSTANCE
=
eosdev
EOS_TEST_DIR
=
/eos/users/test
RED
=
'\033[0;31m'
...
...
@@ -70,6 +72,22 @@ getArchiveID()
ARCHIVE_FILE_ID
=
$(
echo
$LOGLINE
|
sed
's/^.* fileId="//'
|
sed
's/".*$//'
)
}
getTapeLog
()
{
for
i
in
{
1..15
}
do
LOGLINE
=
$(
grep
" fileId=
\"
${
1
}
\"
"
$CTA_TAPED_LOG
|
grep
" LVL=
\"
Info
\"
"
)
echo
$LOGLINE
|
grep
"Reported to the client a full file archival"
>
/dev/null
[
$?
-ne
0
]
||
break
wait_dot
done
[
"
${
LOGLINE
}
"
!=
""
]
||
error
"Archive request fileID=
\"
${
1
}
\"
not found in
${
CTA_TAPED_LOG
}
"
}
##
## Archving
##
FILENAME
=
file.
$$
# Copy small file into EOS
...
...
@@ -99,3 +117,27 @@ echo $LOGLINE
echo_start
ARCHIVE_FILE_ID
=
$ARCHIVE_FILE_ID
echo_end
'\n'
echo_start
"Waiting for file to be archived to tape."
getTapeLog
$ARCHIVE_FILE_ID
echo_end
"done."
echo
-e
"
$LOGLINE
\n
"
echo_start
"List archived file on tape:"
echo_end
""
cta-admin af
ls
--instance
${
EOS_INSTANCE
}
--diskid
${
EOS_DISK_ID
}
--header
echo_start
"
\n
List disk file:"
echo_end
""
eos
ls
-y
${
EOS_TEST_DIR
}
/
${
FILENAME
}
eos fileinfo
${
EOS_TEST_DIR
}
/
${
FILENAME
}
##
## Retrieval
##
echo_start
"
\n
Waiting for PREPARE event."
getEOSWFE PREPARE
${
EOS_TEST_DIR
}
/
${
FILENAME
}
echo_end
"done"
echo
-e
"
$LOGLINE
\n
"
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