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
a1488b9b
Commit
a1488b9b
authored
10 years ago
by
David COME
Browse files
Options
Downloads
Patches
Plain Diff
Move the attemped mounting of the tape into a try/catch block
parent
475035b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/tape/tapeserver/daemon/TapeReadSingleThread.hpp
+9
-3
9 additions, 3 deletions
castor/tape/tapeserver/daemon/TapeReadSingleThread.hpp
with
9 additions
and
3 deletions
castor/tape/tapeserver/daemon/TapeReadSingleThread.hpp
+
9
−
3
View file @
a1488b9b
...
...
@@ -68,7 +68,7 @@ public:
/**
* Set the task injector. Has to be done that way (and not in the constructor)
* because there is a dependency
* because there is a dep
26569
endency
* @param ti the task injector
*/
void
setTaskInjector
(
RecallTaskInjector
*
ti
)
{
...
...
@@ -104,14 +104,20 @@ private:
*/
virtual
void
run
()
{
m_logContext
.
pushOrReplace
(
log
::
Param
(
"thread"
,
"tapeRead"
));
std
::
auto_ptr
<
castor
::
tape
::
tapeFile
::
ReadSession
>
rs
;
try
{
// Before anything, the tape should be mounted
m_rmc
.
mountTape
(
m_vid
,
m_drive
.
librarySlot
);
// Then we have to initialise the tape read session
std
::
auto_ptr
<
castor
::
tape
::
tapeFile
::
ReadSession
>
rs
;
try
{
rs
.
reset
(
new
castor
::
tape
::
tapeFile
::
ReadSession
(
m_drive
,
m_vid
));
m_logContext
.
log
(
LOG_INFO
,
"Tape read session session successfully started"
);
}
catch
(
castor
::
exception
::
Exception
&
ex
)
{
castor
::
log
::
ScopedParamContainer
scoped
(
m_logContext
);
scoped
.
add
(
"exception_message"
,
ex
.
getMessageValue
())
.
add
(
"exception_code"
,
ex
.
code
());
m_logContext
.
log
(
LOG_ERR
,
"Failed to start tape read session"
);
// TODO: log and unroll the session
// TODO: add an unroll mode to the tape read task. (Similar to exec, but pushing blocks marked in 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