Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
6994f150
Commit
6994f150
authored
Dec 01, 2014
by
Eric Cano
Browse files
Reaching the end of tape is now reported as "Info_tapeFilledUp" instead of "Error_tapeXXXX"
in the the session finished summary.
parent
442d242d
Changes
2
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp
View file @
6994f150
...
...
@@ -240,9 +240,25 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() {
// side and the task injector, which will trigger the end of session.
m_injector
->
setErrorFlag
();
// report the error to the watchdog for counting
if
(
currentErrorToCount
.
size
())
{
m_watchdog
.
addToErrorCount
(
currentErrorToCount
);
// If we reached the end of tape, this is not an error (ENOSPC)
try
{
// If it's not the error we're looking for, we will go about our business
// in the catch section. dynamic cast will throw, and we'll do ourselves
// if the error code is not the one we want.
const
castor
::
exception
::
Errnum
&
en
=
dynamic_cast
<
const
castor
::
exception
::
Errnum
&>
(
e
);
if
(
en
.
errorNumber
()
!=
ENOSPC
)
{
throw
0
;
}
// This is indeed the end of the tape. Not an error.
m_watchdog
.
addToErrorCount
(
"Info_tapeFilledUp"
);
}
catch
(...)
{
// The error is not an ENOSPC, so it is, indeed, an error.
// If we got here with a new error, currentErrorToCount will be non-empty,
// and we will pass the error name to the watchdog.
if
(
currentErrorToCount
.
size
())
{
m_watchdog
.
addToErrorCount
(
currentErrorToCount
);
}
}
//first empty all the tasks and circulate mem blocks
...
...
castor/tape/tapeserver/daemon/TapeWriteTask.cpp
View file @
6994f150
...
...
@@ -156,10 +156,25 @@ namespace daemon {
//first set the error flag: we can't proceed any further with writes.
m_errorFlag
.
set
();
// If we got here with a new error, currentErrorToCount will be non-empty,
// and we will pass the error name to the watchdog
if
(
currentErrorToCount
.
size
())
{
watchdog
.
addToErrorCount
(
currentErrorToCount
);
// If we reached the end of tape, this is not an error (ENOSPC)
try
{
// If it's not the error we're looking for, we will go about our business
// in the catch section. dynamic cast will throw, and we'll do ourselves
// if the error code is not the one we want.
const
castor
::
exception
::
Errnum
&
en
=
dynamic_cast
<
const
castor
::
exception
::
Errnum
&>
(
e
);
if
(
en
.
errorNumber
()
!=
ENOSPC
)
{
throw
0
;
}
// This is indeed the end of the tape. Not an error.
watchdog
.
addToErrorCount
(
"Info_tapeFilledUp"
);
}
catch
(...)
{
// The error is not an ENOSPC, so it is, indeed, an error.
// If we got here with a new error, currentErrorToCount will be non-empty,
// and we will pass the error name to the watchdog.
if
(
currentErrorToCount
.
size
())
{
watchdog
.
addToErrorCount
(
currentErrorToCount
);
}
}
//log and circulate blocks
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment