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
e2a4e4b7
Commit
e2a4e4b7
authored
8 years ago
by
Eric Cano
Browse files
Options
Downloads
Patches
Plain Diff
Improved the error loging when reporting to EOS fails.
parent
33057455
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
tapeserver/castor/tape/tapeserver/daemon/MigrationReportPacker.cpp
+25
-15
25 additions, 15 deletions
...r/castor/tape/tapeserver/daemon/MigrationReportPacker.cpp
with
25 additions
and
15 deletions
tapeserver/castor/tape/tapeserver/daemon/MigrationReportPacker.cpp
+
25
−
15
View file @
e2a4e4b7
...
...
@@ -154,38 +154,48 @@ void MigrationReportPacker::ReportFlush::execute(MigrationReportPacker& reportPa
reportPacker
.
m_lc
.
log
(
cta
::
log
::
INFO
,
"Received a flush report from tape, but had no file to report to client. Doing nothing."
);
return
;
}
std
::
unique_ptr
<
cta
::
ArchiveJob
>
job
;
try
{
while
(
!
reportPacker
.
m_successfulArchiveJobs
.
empty
())
{
std
::
unique_ptr
<
cta
::
ArchiveJob
>
job
(
std
::
move
(
reportPacker
.
m_successfulArchiveJobs
.
front
()));
// Get the next job to report and make sure we will not attempt to process it twice.
job
=
std
::
move
(
reportPacker
.
m_successfulArchiveJobs
.
front
());
reportPacker
.
m_successfulArchiveJobs
.
pop
();
if
(
!
job
.
get
())
continue
;
cta
::
log
::
ScopedParamContainer
params
(
reportPacker
.
m_lc
);
params
.
add
(
"archiveFileId"
,
job
->
archiveFile
.
archiveFileID
)
.
add
(
"diskInstance"
,
job
->
archiveFile
.
diskInstance
)
.
add
(
"diskFileId"
,
job
->
archiveFile
.
diskFileId
)
.
add
(
"lastKnownDiskPath"
,
job
->
archiveFile
.
diskFileInfo
.
path
);
.
add
(
"diskInstance"
,
job
->
archiveFile
.
diskInstance
)
.
add
(
"diskFileId"
,
job
->
archiveFile
.
diskFileId
)
.
add
(
"lastKnownDiskPath"
,
job
->
archiveFile
.
diskFileInfo
.
path
);
if
(
job
->
complete
())
{
params
.
add
(
"reportURL"
,
job
->
reportURL
());
reportPacker
.
m_lc
.
log
(
cta
::
log
::
INFO
,
"Reported to the client a full file archival"
);
}
else
{
reportPacker
.
m_lc
.
log
(
cta
::
log
::
INFO
,
"Recorded the partial migration of a file"
);
}
reportPacker
.
m_successfulArchiveJobs
.
pop
(
);
job
.
reset
(
nullptr
);
}
reportPacker
.
m_lc
.
log
(
cta
::
log
::
INFO
,
"Reported to the client that a batch of files was written on tape"
);
}
catch
(
const
cta
::
exception
::
Exception
&
e
){
LogContext
::
ScopedParam
sp
[]
=
{
LogContext
::
ScopedParam
(
reportPacker
.
m_lc
,
Param
(
"exceptionMessageValue"
,
e
.
getMessageValue
()))
};
tape
::
utils
::
suppresUnusedVariable
(
sp
);
cta
::
log
::
ScopedParamContainer
params
(
reportPacker
.
m_lc
);
params
.
add
(
"exceptionMessageValue"
,
e
.
getMessageValue
());
if
(
job
.
get
())
{
params
.
add
(
"archiveFileId"
,
job
->
archiveFile
.
archiveFileID
)
.
add
(
"diskInstance"
,
job
->
archiveFile
.
diskInstance
)
.
add
(
"diskFileId"
,
job
->
archiveFile
.
diskFileId
)
.
add
(
"lastKnownDiskPath"
,
job
->
archiveFile
.
diskFileInfo
.
path
);
}
const
std
::
string
msg_error
=
"An exception was caught trying to call reportMigrationResults"
;
reportPacker
.
m_lc
.
log
(
cta
::
log
::
ERR
,
msg_error
);
throw
failedMigrationRecallResult
(
msg_error
);
}
catch
(
const
std
::
exception
&
e
){
LogContext
::
ScopedParam
sp
[]
=
{
LogContext
::
ScopedParam
(
reportPacker
.
m_lc
,
Param
(
"exceptionWhat"
,
e
.
what
()))
};
tape
::
utils
::
suppresUnusedVariable
(
sp
);
cta
::
log
::
ScopedParamContainer
params
(
reportPacker
.
m_lc
);
params
.
add
(
"exceptionWhat"
,
e
.
what
());
if
(
job
.
get
())
{
params
.
add
(
"archiveFileId"
,
job
->
archiveFile
.
archiveFileID
)
.
add
(
"diskInstance"
,
job
->
archiveFile
.
diskInstance
)
.
add
(
"diskFileId"
,
job
->
archiveFile
.
diskFileId
)
.
add
(
"lastKnownDiskPath"
,
job
->
archiveFile
.
diskFileInfo
.
path
);
}
const
std
::
string
msg_error
=
"An std::exception was caught trying to call reportMigrationResults"
;
reportPacker
.
m_lc
.
log
(
cta
::
log
::
ERR
,
msg_error
);
throw
failedMigrationRecallResult
(
msg_error
);
...
...
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