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
1713e731
Commit
1713e731
authored
7 years ago
by
Eric Cano
Browse files
Options
Downloads
Patches
Plain Diff
Added detailed logs to initial connections ping() in DriveHandler::runChild().
parent
be83981f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tapeserver/daemon/DriveHandler.cpp
+17
-1
17 additions, 1 deletion
tapeserver/daemon/DriveHandler.cpp
with
17 additions
and
1 deletion
tapeserver/daemon/DriveHandler.cpp
+
17
−
1
View file @
1713e731
...
...
@@ -862,6 +862,12 @@ int DriveHandler::runChild() {
std
::
string
hostname
=
cta
::
utils
::
getShortHostname
();
auto
&
lc
=
m_processManager
.
logContext
();
{
log
::
ScopedParamContainer
params
(
lc
);
params
.
add
(
"objectStoreURL"
,
m_tapedConfig
.
objectStoreURL
.
value
());
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will connect to object store backend."
);
}
// Before anything, we need to check we have access to the scheduler's central storages.
std
::
unique_ptr
<
cta
::
objectstore
::
Backend
>
backend
(
cta
::
objectstore
::
BackendFactory
::
createBackend
(
m_tapedConfig
.
objectStoreURL
.
value
()).
release
());
...
...
@@ -877,6 +883,9 @@ int DriveHandler::runChild() {
try
{
std
::
string
processName
=
"DriveProcess-"
;
processName
+=
m_configLine
.
unitName
;
log
::
ScopedParamContainer
params
(
lc
);
params
.
add
(
"processName"
,
processName
);
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will create agent entry."
);
backendPopulator
.
reset
(
new
cta
::
objectstore
::
BackendPopulator
(
*
backend
,
processName
,
m_processManager
.
logContext
()));
}
catch
(
cta
::
exception
::
Exception
&
ex
)
{
log
::
ScopedParamContainer
param
(
m_processManager
.
logContext
());
...
...
@@ -888,9 +897,13 @@ int DriveHandler::runChild() {
}
std
::
unique_ptr
<
cta
::
catalogue
::
Catalogue
>
catalogue
;
try
{
log
::
ScopedParamContainer
params
(
lc
);
params
.
add
(
"fileCatalogConfigFile"
,
m_tapedConfig
.
fileCatalogConfigFile
.
value
());
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will get catalogue login information."
);
const
cta
::
rdbms
::
Login
catalogueLogin
=
cta
::
rdbms
::
Login
::
parseFile
(
m_tapedConfig
.
fileCatalogConfigFile
.
value
());
const
uint64_t
nbConns
=
1
;
const
uint64_t
nbArchiveFileListingConns
=
0
;
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will connect to catalogue."
);
catalogue
=
cta
::
catalogue
::
CatalogueFactory
::
create
(
m_sessionEndContext
.
logger
(),
catalogueLogin
,
nbConns
,
nbArchiveFileListingConns
);
osdb
.
reset
(
new
cta
::
OStoreDBWithAgent
(
*
backend
,
backendPopulator
->
getAgentReference
(),
*
catalogue
,
m_processManager
.
logContext
().
logger
()));
}
catch
(
cta
::
exception
::
Exception
&
ex
)
{
...
...
@@ -901,9 +914,11 @@ int DriveHandler::runChild() {
sleep
(
1
);
return
castor
::
tape
::
tapeserver
::
daemon
::
Session
::
MARK_DRIVE_AS_DOWN
;
}
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will create scheduler."
);
cta
::
Scheduler
scheduler
(
*
catalogue
,
*
osdb
,
m_tapedConfig
.
mountCriteria
.
value
().
maxFiles
,
m_tapedConfig
.
mountCriteria
.
value
().
maxBytes
);
// Before launching the transfer session, we validate that the scheduler is reachable.
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will ping scheduler."
);
try
{
scheduler
.
ping
();
}
catch
(
cta
::
exception
::
Exception
&
ex
)
{
...
...
@@ -914,6 +929,7 @@ int DriveHandler::runChild() {
return
castor
::
tape
::
tapeserver
::
daemon
::
Session
::
MARK_DRIVE_AS_DOWN
;
}
lc
.
log
(
log
::
DEBUG
,
"In DriveHandler::runChild(): will start agent heartbeat."
);
// The object store is accessible, let's turn the agent heartbeat on.
objectstore
::
AgentHeartbeatThread
agentHeartbeat
(
backendPopulator
->
getAgentReference
(),
*
backend
,
m_processManager
.
logContext
().
logger
());
agentHeartbeat
.
startThread
();
...
...
@@ -943,7 +959,7 @@ int DriveHandler::runChild() {
}
}
// 2) I
n
the previous session crashed, we might want to run a cleaner session, depending
// 2) I
f
the previous session crashed, we might want to run a cleaner session, depending
// on the previous state
std
::
set
<
SessionState
>
statesRequiringCleaner
=
{
SessionState
::
Mounting
,
SessionState
::
Running
,
SessionState
::
Unmounting
};
...
...
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