Open 4quarks opened 2 years ago
A new Issue was created by @4quarks 4Quarks.
@Dr15Jones, @perrotta, @dpiparo, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.
cms-bot commands are listed here
assign core
New categories assigned: core
@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks
Hi @bbockelm, would you be able to answer to this question?
Hi!
We are currently working in the enhancement of the XrdAdaptor logs. We need to retrieve an object with the socket information so we can show the endpoint used to access data. For example:
Data was accessed at 174.65.98.3:67543
Where is this data? In XrdCl. For example, the class
XrdNetAddrInfo
contains all the parameters that we are interested in. https://github.com/xrootd/xrootd/blob/master/src/XrdNet/XrdNetAddrInfo.hh#L53Where is the trigger of the code? The execution of the connections starts (in CMSSW) at:
auto status = m_fs.Prepare(m_fileList, XrdCl::PrepareFlags::Stage, 0, this);
https://github.com/cms-sw/cmssw/blob/master/Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc#L26Examples of possible solutions:
pSubStreams[0]->socket->GetAddress()
https://github.com/xrootd/xrootd/blob/master/src/XrdCl/XrdClStream.cc#L641 https://github.com/xrootd/xrootd/blob/master/src/XrdNet/XrdNetAddr.hh#L41 Result:edm::LogWarning("XrdAdaptor") << "Connection established at: " << m_fs.pSubStreams[0]->socket->GetAddress().IP.v4.sin_addr;
locations->At(i).GetAddress()
https://github.com/xrootd/xrootd/blob/master/src/XrdCl/XrdClXRootDResponses.hh#L86 Result:edm::LogWarning("XrdAdaptor") << "Connection established at: " <<m_fs.locations->At(0).GetAddress();
We know thatm_fs
doesn't have any attribute called neitherlocations
norpSubStreams
(that would be too easy). It's just to exemplify what we want to obtain.Thanks!