Skip to content
GitLab
Menu
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
2a1bbf46
Commit
2a1bbf46
authored
Dec 13, 2018
by
Cedric CAFFY
Browse files
Added extra informations in the Tape session finished log
parent
56120543
Changes
4
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
View file @
2a1bbf46
...
@@ -505,7 +505,10 @@ TEST_P(DataTransferSessionTest, DataTransferSessionGooddayRecall) {
...
@@ -505,7 +505,10 @@ TEST_P(DataTransferSessionTest, DataTransferSessionGooddayRecall) {
// 10) Check logs
// 10) Check logs
std
::
string
logToCheck
=
logger
.
getLog
();
std
::
string
logToCheck
=
logger
.
getLog
();
logToCheck
+=
""
;
logToCheck
+=
""
;
std
::
cout
<<
"log to check = "
<<
logToCheck
;
ASSERT_NE
(
std
::
string
::
npos
,
logToCheck
.
find
(
"MSG=
\"
Tape session started
\"
thread=
\"
TapeRead
\"
tapeDrive=
\"
T10D6116
\"
tapeVid=
\"
TstVid
\"
"
"mountId=
\"
1
\"
vo=
\"
vo
\"
mediaType=
\"
TestMediaType
\"
tapePool=
\"
TestTapePool
\"
"
"logicalLibrary=
\"
TestLogicalLibrary
\"
mountType=
\"
Retrieve
\"
vendor=
\"
TestVendor
\"
"
"capacityInBytes=
\"
12345678
\"
"
));
ASSERT_NE
(
std
::
string
::
npos
,
logToCheck
.
find
(
"firmwareVersion=
\"
123A
\"
serialNumber=
\"
123456
\"
"
ASSERT_NE
(
std
::
string
::
npos
,
logToCheck
.
find
(
"firmwareVersion=
\"
123A
\"
serialNumber=
\"
123456
\"
"
"mountTotalCorrectedReadErrors=
\"
5
\"
mountTotalReadBytesProcessed=
\"
4096
\"
"
"mountTotalCorrectedReadErrors=
\"
5
\"
mountTotalReadBytesProcessed=
\"
4096
\"
"
"mountTotalUncorrectedReadErrors=
\"
1
\"
mountTotalNonMediumErrorCounts=
\"
2
\"
"
));
"mountTotalUncorrectedReadErrors=
\"
1
\"
mountTotalNonMediumErrorCounts=
\"
2
\"
"
));
...
@@ -1689,7 +1692,10 @@ TEST_P(DataTransferSessionTest, DataTransferSessionTapeFullMigration) {
...
@@ -1689,7 +1692,10 @@ TEST_P(DataTransferSessionTest, DataTransferSessionTapeFullMigration) {
// Check logs for drive statistics
// Check logs for drive statistics
std
::
string
logToCheck
=
logger
.
getLog
();
std
::
string
logToCheck
=
logger
.
getLog
();
logToCheck
+=
""
;
logToCheck
+=
""
;
std
::
cout
<<
logToCheck
<<
std
::
endl
;
ASSERT_NE
(
std
::
string
::
npos
,
logToCheck
.
find
(
"MSG=
\"
Tape session started
\"
thread=
\"
TapeWrite
\"
tapeDrive=
\"
T10D6116
\"
tapeVid=
\"
TstVid
\"
mountId=
\"
1
\"
"
"lastFseq=
\"
0
\"
compression=
\"
1
\"
useLbp=
\"
0
\"
vo=
\"
vo
\"
"
"mediaType=
\"
TestMediaType
\"
tapePool=
\"
TestTapePool
\"
logicalLibrary=
\"
TestLogicalLibrary
\"
"
"mountType=
\"
Archive
\"
vendor=
\"
TestVendor
\"
capacityInBytes=
\"
12345678
\"
"
));
ASSERT_NE
(
std
::
string
::
npos
,
logToCheck
.
find
(
"firmwareVersion=
\"
123A
\"
serialNumber=
\"
123456
\"
"
ASSERT_NE
(
std
::
string
::
npos
,
logToCheck
.
find
(
"firmwareVersion=
\"
123A
\"
serialNumber=
\"
123456
\"
"
"mountTotalCorrectedWriteErrors=
\"
5
\"
mountTotalUncorrectedWriteErrors=
\"
1
\"
"
"mountTotalCorrectedWriteErrors=
\"
5
\"
mountTotalUncorrectedWriteErrors=
\"
1
\"
"
"mountTotalWriteBytesProcessed=
\"
4096
\"
mountTotalNonMediumErrorCounts=
\"
2
\"
"
));
"mountTotalWriteBytesProcessed=
\"
4096
\"
mountTotalNonMediumErrorCounts=
\"
2
\"
"
));
...
...
tapeserver/castor/tape/tapeserver/daemon/TapeReadSingleThread.cpp
View file @
2a1bbf46
...
@@ -220,15 +220,17 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::run() {
...
@@ -220,15 +220,17 @@ void castor::tape::tapeserver::daemon::TapeReadSingleThread::run() {
try
{
try
{
// Report the parameters of the session to the main thread
// Report the parameters of the session to the main thread
typedef
cta
::
log
::
Param
Param
;
typedef
cta
::
log
::
Param
Param
;
m_watchdog
.
addParameter
(
Param
(
"
v
id"
,
m_volInfo
.
vid
));
m_watchdog
.
addParameter
(
Param
(
"
tapeV
id"
,
m_volInfo
.
vid
));
m_watchdog
.
addParameter
(
Param
(
"mountType"
,
mountTypeToString
(
m_volInfo
.
mountType
)));
m_watchdog
.
addParameter
(
Param
(
"mountType"
,
mountTypeToString
(
m_volInfo
.
mountType
)));
m_watchdog
.
addParameter
(
Param
(
"mountId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"mountId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"tapeDrive"
,
m_drive
.
config
.
unitName
));
m_watchdog
.
addParameter
(
Param
(
"vendor"
,
m_retrieveMount
.
getVendor
()));
m_watchdog
.
addParameter
(
Param
(
"volReqId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"volReqId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"vo"
,
m_retrieveMount
.
getVo
()));
m_watchdog
.
addParameter
(
Param
(
"vo"
,
m_retrieveMount
.
getVo
()));
m_watchdog
.
addParameter
(
Param
(
"mediaType"
,
m_retrieveMount
.
getMediaType
()));
m_watchdog
.
addParameter
(
Param
(
"mediaType"
,
m_retrieveMount
.
getMediaType
()));
m_watchdog
.
addParameter
(
Param
(
"tapePool"
,
m_retrieveMount
.
getPoolName
()));
m_watchdog
.
addParameter
(
Param
(
"tapePool"
,
m_retrieveMount
.
getPoolName
()));
m_watchdog
.
addParameter
(
Param
(
"logicalLibrary"
,
m_drive
.
config
.
logicalLibrary
));
m_watchdog
.
addParameter
(
Param
(
"logicalLibrary"
,
m_drive
.
config
.
logicalLibrary
));
m_watchdog
.
addParameter
(
Param
(
"capacityInBytes"
,
m_retrieveMount
.
getCapacityInBytes
()));
// Set the tape thread time in the watchdog for total time estimation in case
// Set the tape thread time in the watchdog for total time estimation in case
// of crash
// of crash
...
...
tapeserver/castor/tape/tapeserver/daemon/TapeWriteSingleThread.cpp
View file @
2a1bbf46
...
@@ -287,16 +287,19 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() {
...
@@ -287,16 +287,19 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() {
{
{
// Report the parameters of the session to the main thread
// Report the parameters of the session to the main thread
typedef
cta
::
log
::
Param
Param
;
typedef
cta
::
log
::
Param
Param
;
m_watchdog
.
addParameter
(
Param
(
"
v
id"
,
m_volInfo
.
vid
));
m_watchdog
.
addParameter
(
Param
(
"
tapeV
id"
,
m_volInfo
.
vid
));
m_watchdog
.
addParameter
(
Param
(
"mountType"
,
mountTypeToString
(
m_volInfo
.
mountType
)));
m_watchdog
.
addParameter
(
Param
(
"mountType"
,
mountTypeToString
(
m_volInfo
.
mountType
)));
m_watchdog
.
addParameter
(
Param
(
"mountId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"mountId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"volReqId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"volReqId"
,
m_volInfo
.
mountId
));
m_watchdog
.
addParameter
(
Param
(
"tapeDrive"
,
m_drive
.
config
.
unitName
));
m_watchdog
.
addParameter
(
Param
(
"vendor"
,
m_archiveMount
.
getVendor
()));
m_watchdog
.
addParameter
(
Param
(
"vo"
,
m_archiveMount
.
getVo
()));
m_watchdog
.
addParameter
(
Param
(
"vo"
,
m_archiveMount
.
getVo
()));
m_watchdog
.
addParameter
(
Param
(
"mediaType"
,
m_archiveMount
.
getMediaType
()));
m_watchdog
.
addParameter
(
Param
(
"mediaType"
,
m_archiveMount
.
getMediaType
()));
m_watchdog
.
addParameter
(
Param
(
"tapePool"
,
m_archiveMount
.
getPoolName
()));
m_watchdog
.
addParameter
(
Param
(
"tapePool"
,
m_archiveMount
.
getPoolName
()));
m_watchdog
.
addParameter
(
Param
(
"logicalLibrary"
,
m_drive
.
config
.
logicalLibrary
));
m_watchdog
.
addParameter
(
Param
(
"logicalLibrary"
,
m_drive
.
config
.
logicalLibrary
));
m_watchdog
.
addParameter
(
Param
(
"capacityInBytes"
,
m_archiveMount
.
getCapacityInBytes
()));
// Set the tape thread time in the watchdog for total time estimation in case
// Set the tape thread time in the watchdog for total time estimation in case
// of crash
// of crash
m_watchdog
.
updateThreadTimer
(
totalTimer
);
m_watchdog
.
updateThreadTimer
(
totalTimer
);
...
...
tapeserver/daemon/DriveHandler.cpp
View file @
2a1bbf46
...
@@ -231,7 +231,7 @@ void DriveHandler::kill() {
...
@@ -231,7 +231,7 @@ void DriveHandler::kill() {
// If we have a subprocess, kill it and wait for completion (if needed). We do not need to keep
// If we have a subprocess, kill it and wait for completion (if needed). We do not need to keep
// track of the exit state as kill() means we will not be called anymore.
// track of the exit state as kill() means we will not be called anymore.
log
::
ScopedParamContainer
params
(
m_processManager
.
logContext
());
log
::
ScopedParamContainer
params
(
m_processManager
.
logContext
());
params
.
add
(
"
unitNam
e"
,
m_configLine
.
unitName
);
params
.
add
(
"
tapeDriv
e"
,
m_configLine
.
unitName
);
if
(
m_pid
!=
-
1
)
{
if
(
m_pid
!=
-
1
)
{
params
.
add
(
"SubProcessId"
,
m_pid
);
params
.
add
(
"SubProcessId"
,
m_pid
);
// The socket pair will be reopened on the next fork. Clean it up.
// The socket pair will be reopened on the next fork. Clean it up.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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