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
ab2e6543
Commit
ab2e6543
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[test] Traces retrieval of a file through the logs
parent
01ddc7f2
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
+44
-7
44 additions, 7 deletions
continuousintegration/test/simple_test
with
44 additions
and
7 deletions
continuousintegration/test/simple_test
+
44
−
7
View file @
ab2e6543
...
...
@@ -6,6 +6,7 @@ CTA_FRONTEND_LOG=/home/cta/cta/cta-frontend.log
CTA_TAPED_LOG
=
/var/log/cta/cta-taped.log
EOS_INSTANCE
=
eosdev
EOS_RUID
=
71761
EOS_TEST_DIR
=
/eos/users/test
RED
=
'\033[0;31m'
...
...
@@ -74,16 +75,29 @@ getArchiveID()
getTapeLog
()
{
FILEID
=
$1
shift
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
LOGLINE
=
$(
grep
" fileId=
\"
${
FILEID
}
\"
"
$CTA_TAPED_LOG
|
grep
" LVL=
\"
Info
\"
"
)
echo
$LOGLINE
|
grep
"
$*
"
>
/dev/null
[
$?
-ne
0
]
||
break
wait_dot
done
[
"
${
LOGLINE
}
"
!=
""
]
||
error
"Archive request fileID=
\"
${
1
}
\"
not found in
${
CTA_TAPED_LOG
}
"
}
getFrontendLog
()
{
for
i
in
{
1..15
}
do
LOGLINE
=
$(
grep
" fileId=
\"
${
2
}
\"
"
$CTA_FRONTEND_LOG
|
grep
"
$1
"
)
[
$?
-ne
0
]
||
break
wait_dot
done
[
"
${
LOGLINE
}
"
!=
""
]
||
error
"Archive request fileID=
\"
${
2
}
\"
event
$1
not found in
${
CTA_TAPED_LOG
}
"
}
##
## Archving
##
...
...
@@ -93,6 +107,11 @@ FILENAME=file.$$
# Copy small file into EOS
eos
cp
/etc/motd
${
EOS_TEST_DIR
}
/
${
FILENAME
}
echo_start
"
\n
List disk file:"
echo_end
""
eos
ls
-y
${
EOS_TEST_DIR
}
/
${
FILENAME
}
eos fileinfo
${
EOS_TEST_DIR
}
/
${
FILENAME
}
echo_start
"
\n
Waiting for SYNC::CREATE event."
getEOSWFE SYNC::CREATE
${
EOS_TEST_DIR
}
/
${
FILENAME
}
echo_end
"done"
...
...
@@ -112,20 +131,25 @@ echo_end '\n'
echo_start
"Checking CTA Frontend log for CTA Archive ID."
getArchiveID
$EOS_DISK_ID
echo_end
"done
.
"
echo_end
"done"
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
.
"
getTapeLog
$ARCHIVE_FILE_ID
"Reported to the client a full file archival"
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
Waiting for ARCHIVED event."
getEOSWFE ARCHIVED
${
EOS_TEST_DIR
}
/
${
FILENAME
}
echo_end
"done"
echo
-e
"
$LOGLINE
\n
"
echo_start
"
\n
List disk file:"
echo_end
""
eos
ls
-y
${
EOS_TEST_DIR
}
/
${
FILENAME
}
...
...
@@ -135,9 +159,22 @@ eos fileinfo ${EOS_TEST_DIR}/${FILENAME}
## Retrieval
##
echo_start
"
\n
Waiting for PREPARE event."
getEOSWFE PREPARE
${
EOS_TEST_DIR
}
/
${
FILENAME
}
XrdSecPROTOCOL
=
sss
XrdSecSSSKT
=
/etc/cta/eos.sss.keytab
sudo
xrdfs root://localhost/ prepare
-s
"
${
EOS_TEST_DIR
}
/
${
FILENAME
}
?eos.ruid=
${
EOS_RUID
}
"
echo_start
"
\n
Waiting for SYNC::PREPARE event."
getEOSWFE SYNC::PREPARE
${
EOS_TEST_DIR
}
/
${
FILENAME
}
echo_end
"done"
echo
-e
"
$LOGLINE
\n
"
echo_start
"Checking CTA Frontend log for PREPARE event."
getFrontendLog
"[Rr]etrieve"
$ARCHIVE_FILE_ID
echo_end
"done"
echo
-e
"
$LOGLINE
\n
"
echo_start
"Waiting for file to be retrieved from tape."
getTapeLog
$ARCHIVE_FILE_ID
"File successfully transfered to disk"
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