Ok, now that the flag issue is understood and fixed, let's get back to the initial problem, namely the missing opaque information. The flag and missing opaque info are actually related. They are both symptoms of the same behaviour, namely a (write) recovery.

But, as I discovered the hard way, the code uses different paths when the client connected directly to the data server or it was redirected before from a manager. When the client connects directly to the data server everything is fine from the opaque info point of view. But when the client is redirected to a data server and then a recovery is triggered, then the opaque info that the initial redirector gave to the client is not passed on in the open call for the recovery.

I have read the latest protocol specification but it is still not clear to me what should happen in such a case. Therefore, from CASTOR's point of view this is not an issue but in general would you expect that the retry of an open after a redirection should resubmit the opaque info or not?

The code responsible for this is just a few lines below the flag problem.
https://github.com/xrootd/xrootd/blob/master/src/XrdCl/XrdClFileStateHandler.cc#L1443

As you can see the recovery request will have the same opaque info as the initial request that was sent to the redirector. At this point we could have used the full opaque info that the redirector gave us which is in url.GetPathWithParams().

This is a short Dump of the logs to get a better idea of what is happening:

[2015-09-21 09:42:48.682109 +0200][Debug  ][PostMaster        ] [lxc2dev6d1.cern.ch:1095 #0] Reporting disconnection to queued message handlers.
[2015-09-21 09:42:48.682121 +0200][Dump   ][XRootD            ] [lxc2dev6d1.cern.ch:1095] Stream event reported for msg kXR_write (handle: 0x00000000, offset: 0, size: 3140)
[2015-09-21 09:42:48.682132 +0200][Debug  ][XRootD            ] [lxc2dev6d1.cern.ch:1095] Handling error while processing kXR_write (handle: 0x00000000, offset: 0, size: 3140): [ERROR] Socket error.
[2015-09-21 09:42:48.682142 +0200][Error  ][XRootD            ] [lxc2dev6d1.cern.ch:1095] Unable to get the response to request kXR_write (handle: 0x00000000, offset: 0, size: 3140)
[2015-09-21 09:42:48.682159 +0200][Dump   ][File              ] [0x1452d80@root://localhost:1094//castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?oss.asize=3140] File state error encountered. Message kXR_write (handle: 0x00000000, offset: 0, size: 3140) returned with [ERROR] Socket error
[2015-09-21 09:42:48.682171 +0200][Dump   ][File              ] [0x1452d80@root://localhost:1094//castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?oss.asize=3140] Putting message kXR_write (handle: 0x00000000, offset: 0, size: 3140) in the recovery list
[2015-09-21 09:42:48.682181 +0200][Debug  ][File              ] [0x1452d80@root://localhost:1094//castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?oss.asize=3140] Running the recovery procedure
[2015-09-21 09:42:48.682192 +0200][Dump   ][File              ] [0x1452d80@root://localhost:1094//castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?oss.asize=3140] Sending a recovery open command to root://lxc2dev6d1.cern.ch:1095//castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?castor.accessop=3&castor.client_sec_gid=1028&castor.client_sec_uid=58602&castor.exptime=1442821368&castor.id=root.14188:51@localhost&castor.manager=lxc2dev6.cern.ch:1094&[log in to unmask]&castor.pfn2=0:15511:1fb69fff-2d63-e236-e053-8d06100af565&castor.sfn=/castor/cern.ch/dev/e/esindril/dir_default/test_2.dat&castor.sig!
 nature=IN
 g/r+QgzgufTAGR+RV6jy0nnsE5ihz+Y9BnAVrMBbJksnh7lNsC0icuWnvCxasWpJPdPBSkEo3YlEPAY5/ZqA==&castor.txtype=user&oss.asize=3140
[2015-09-21 09:42:48.682225 +0200][Dump   ][XRootD            ] [lxc2dev6d1.cern.ch:1095] Sending message kXR_open (file: /castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?oss.asize=3140, mode: 0644, flags: kXR_open_updt )
[2015-09-21 09:42:48.682248 +0200][Dump   ][PostMaster        ] [lxc2dev6d1.cern.ch:1095 #0] Sending message kXR_open (file: /castor/cern.ch/dev/e/esindril/dir_default/test_2.dat?oss.asize=3140, mode: 0644, flags: kXR_open_updt ) (0xf8000b00) through substream 0 expecting answer at 0
[2015-09-21 09:42:48.682364 +0200][Debug  ][PostMaster        ] [lxc2dev6d1.cern.ch:1095] Found 1 address(es): [::ffff:188.184.135.189]:1095


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1