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
7fd49c57
Commit
7fd49c57
authored
Feb 04, 2021
by
Michael Davis
Browse files
[frontend] Adds failure log messages to processCLOSEW()
parent
6a2b0fac
Pipeline
#2926
passed with stages
in 16 minutes and 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ReleaseNotes.md
View file @
7fd49c57
-
cta/CTA#964 Adds failure log messages to processCLOSEW in CTA Frontend
# v3.2-1
## Summary
...
...
xroot_plugins/XrdSsiCtaRequestMessage.cpp
View file @
7fd49c57
...
...
@@ -504,23 +504,31 @@ void RequestMessage::processCLOSEW(const cta::eos::Notification ¬ification, c
request
.
creationLog
.
username
=
m_cliIdentity
.
username
;
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
// must be converted to a valid uint64_t
const
auto
archiveFileIdItor
=
notification
.
file
().
xattr
().
find
(
"sys.archive.file_id"
);
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"
);
}
const
std
::
string
archiveFileIdStr
=
archiveFileIdItor
->
second
;
uint64_t
archiveFileId
=
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
);
}
params
.
add
(
"fileId"
,
archiveFileId
);
cta
::
utils
::
Timer
t
;
cta
::
log
::
ScopedParamContainer
params
(
m_lc
);
std
::
string
logMessage
=
"In RequestMessage::processCLOSEW(): "
;
if
(
request
.
fileSize
>
0
)
{
// Queue the request
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
}
// Create a log entry
params
.
add
(
"fileId"
,
archiveFileId
);
params
.
add
(
"requesterInstance"
,
notification
.
wf
().
requester_instance
());
m_lc
.
log
(
cta
::
log
::
INFO
,
logMessage
);
// Set response type
...
...
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