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
492219c2
Commit
492219c2
authored
4 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[frontend] Adds failure log messages to processCLOSEW()
parent
6cf1afa7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ReleaseNotes.md
+2
-0
2 additions, 0 deletions
ReleaseNotes.md
xroot_plugins/XrdSsiCtaRequestMessage.cpp
+10
-4
10 additions, 4 deletions
xroot_plugins/XrdSsiCtaRequestMessage.cpp
with
12 additions
and
4 deletions
ReleaseNotes.md
+
2
−
0
View file @
492219c2
-
cta/CTA#964 Adds failure log messages to processCLOSEW in CTA Frontend
# v3.2-1
# v3.2-1
## Summary
## Summary
...
...
This diff is collapsed.
Click to expand it.
xroot_plugins/XrdSsiCtaRequestMessage.cpp
+
10
−
4
View file @
492219c2
...
@@ -504,23 +504,31 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c
...
@@ -504,23 +504,31 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c
request
.
creationLog
.
username
=
m_cliIdentity
.
username
;
request
.
creationLog
.
username
=
m_cliIdentity
.
username
;
request
.
creationLog
.
time
=
time
(
nullptr
);
request
.
creationLog
.
time
=
time
(
nullptr
);
cta
::
log
::
ScopedParamContainer
params
(
m_lc
);
params
.
add
(
"requesterInstance"
,
notification
.
wf
().
requester_instance
());
std
::
string
logMessage
=
"In RequestMessage::processCLOSEW(): "
;
// CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which
// CTA Archive ID is an EOS extended attribute, i.e. it is stored as a string, which
// must be converted to a valid uint64_t
// must be converted to a valid uint64_t
const
auto
archiveFileIdItor
=
notification
.
file
().
xattr
().
find
(
"sys.archive.file_id"
);
const
auto
archiveFileIdItor
=
notification
.
file
().
xattr
().
find
(
"sys.archive.file_id"
);
if
(
notification
.
file
().
xattr
().
end
()
==
archiveFileIdItor
)
{
if
(
notification
.
file
().
xattr
().
end
()
==
archiveFileIdItor
)
{
logMessage
+=
"sys.archive.file_id is not present in extended attributes"
;
m_lc
.
log
(
cta
::
log
::
INFO
,
logMessage
);
throw
PbException
(
std
::
string
(
__FUNCTION__
)
+
": Failed to find the extended attribute named sys.archive.file_id"
);
throw
PbException
(
std
::
string
(
__FUNCTION__
)
+
": Failed to find the extended attribute named sys.archive.file_id"
);
}
}
const
std
::
string
archiveFileIdStr
=
archiveFileIdItor
->
second
;
const
std
::
string
archiveFileIdStr
=
archiveFileIdItor
->
second
;
uint64_t
archiveFileId
=
0
;
uint64_t
archiveFileId
=
0
;
if
((
archiveFileId
=
strtoul
(
archiveFileIdStr
.
c_str
(),
nullptr
,
10
))
==
0
)
if
((
archiveFileId
=
strtoul
(
archiveFileIdStr
.
c_str
(),
nullptr
,
10
))
==
0
)
{
{
params
.
add
(
"sys.archive.file_id"
,
archiveFileIdStr
);
logMessage
+=
"sys.archive.file_id is not a positive integer"
;
m_lc
.
log
(
cta
::
log
::
INFO
,
logMessage
);
throw
PbException
(
"Invalid archiveFileID "
+
archiveFileIdStr
);
throw
PbException
(
"Invalid archiveFileID "
+
archiveFileIdStr
);
}
}
params
.
add
(
"fileId"
,
archiveFileId
);
cta
::
utils
::
Timer
t
;
cta
::
utils
::
Timer
t
;
cta
::
log
::
ScopedParamContainer
params
(
m_lc
);
std
::
string
logMessage
=
"In RequestMessage::processCLOSEW(): "
;
if
(
request
.
fileSize
>
0
)
{
if
(
request
.
fileSize
>
0
)
{
// Queue the request
// Queue the request
std
::
string
archiveRequestAddr
=
m_scheduler
.
queueArchiveWithGivenId
(
archiveFileId
,
m_cliIdentity
.
username
,
request
,
m_lc
);
std
::
string
archiveRequestAddr
=
m_scheduler
.
queueArchiveWithGivenId
(
archiveFileId
,
m_cliIdentity
.
username
,
request
,
m_lc
);
...
@@ -535,8 +543,6 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c
...
@@ -535,8 +543,6 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c
}
}
// Create a log entry
// Create a log entry
params
.
add
(
"fileId"
,
archiveFileId
);
params
.
add
(
"requesterInstance"
,
notification
.
wf
().
requester_instance
());
m_lc
.
log
(
cta
::
log
::
INFO
,
logMessage
);
m_lc
.
log
(
cta
::
log
::
INFO
,
logMessage
);
// Set response type
// Set response type
...
...
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