Skip to content

Commit

Permalink
dcache-xrootd: Fix login handshake to support xrootd clients (> 4.7.0)
Browse files Browse the repository at this point in the history
Motivation:

In the 4.7 releases, xrootd client started enforcing protocol requirements
for kXR_login which, unfortunately, broke access to dCache.
xrootd client expects an answer with a 16-character session ID from the door and then
the pool after the redirection.

The login spec can be found at: http://xrootd.org/doc/dev45/XRdv310.htm#_Toc464248819

Without it, the 4.7.0 client declared an error and retries after a while. This will also
fail and so we go into what appears to be a hang. Eventually (after several minutes)
the login will fail with an error.

Modification:

The login answer following the spec has been added in the xrootd pool.

Result:

It works for both xrootd 4.6.1 and 4.7.0.

Target: master
Require-notes: yes
Require-book: no
Patch: https://rb.dcache.org/r/10510
Committed: master@
  • Loading branch information
vgaronne committed Sep 28, 2017
1 parent 497c06d commit eee56de
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@
import org.dcache.vehicles.XrootdProtocolInfo;
import org.dcache.xrootd.AbstractXrootdRequestHandler;
import org.dcache.xrootd.core.XrootdException;
import org.dcache.xrootd.core.XrootdSessionIdentifier;
import org.dcache.xrootd.protocol.XrootdProtocol;
import org.dcache.xrootd.protocol.messages.AuthenticationRequest;
import org.dcache.xrootd.protocol.messages.CloseRequest;
import org.dcache.xrootd.protocol.messages.DirListRequest;
import org.dcache.xrootd.protocol.messages.EndSessionRequest;
import org.dcache.xrootd.protocol.messages.GenericReadRequestMessage.EmbeddedReadRequest;
import org.dcache.xrootd.protocol.messages.LoginRequest;
import org.dcache.xrootd.protocol.messages.LoginResponse;
import org.dcache.xrootd.protocol.messages.MkDirRequest;
import org.dcache.xrootd.protocol.messages.MvRequest;
import org.dcache.xrootd.protocol.messages.OpenRequest;
Expand All @@ -81,6 +83,7 @@
import org.dcache.xrootd.util.OpaqueStringParser;
import org.dcache.xrootd.util.ParseException;


import static org.dcache.xrootd.protocol.XrootdProtocol.*;

/**
Expand Down Expand Up @@ -213,9 +216,9 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable t)
}

@Override
protected XrootdResponse<LoginRequest> doOnLogin(ChannelHandlerContext ctx, LoginRequest msg)
{
return withOk(msg);
protected XrootdResponse<LoginRequest> doOnLogin(ChannelHandlerContext ctx, LoginRequest msg) {
XrootdSessionIdentifier sessionId = new XrootdSessionIdentifier();
return new LoginResponse(msg, sessionId, "");
}

@Override
Expand Down

0 comments on commit eee56de

Please sign in to comment.