Skip to content

Commit

Permalink
ftp: add support for SITE TASKID command
Browse files Browse the repository at this point in the history
Motivation:

The Globus transfer agents issue the SITE TASKID command with the UUID
associated with a transfer.  This command currently fails.

Modification:

Add a trivial SITE TASKID command.  Currently, the ID is discarded as
the access log file contains the ID.

Result:

Fewer commands failing for the Globus transfer agents.

Target: master
Request: 3.0
Request: 2.16
Request: 2.15
Request: 2.14
Request: 2.13
Patch: https://rb.dcache.org/r/10063/
Acked-by: Dmitry Litvintsev
Requires-notes: yes
Requires-book: no
  • Loading branch information
paulmillar committed Feb 16, 2017
1 parent 04fadfb commit daad892
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2462,7 +2462,8 @@ private long parseTimeval(String timeval, String errorSuffix)
"SITE <SP> CHGRP <SP> <group> <SP> <path> - Change group-owner of <path> to group <group>\r\n" +
"SITE <SP> CHMOD <SP> <perm> <SP> <path> - Change permission of <path> to octal value <perm>\r\n" +
"SITE <SP> SYMLINKFROM <SP> <path> - Register symlink location; SYMLINKTO must follow\r\n" +
"SITE <SP> SYMLINKTO <SP> <path> - Create symlink to <path>; SYMLINKFROM must be earlier command.")
"SITE <SP> SYMLINKTO <SP> <path> - Create symlink to <path>; SYMLINKFROM must be earlier command\r\n" +
"SITE <SP> TASKID <SP> <id> - Provide server with an identifier")
public void ftp_site(String arg)
throws FTPCommandException
{
Expand Down Expand Up @@ -2528,6 +2529,12 @@ public void ftp_site(String arg)
return;
}
doSymlinkTo(args[1]);
} else if (args[0].equalsIgnoreCase("TASKID")) {
if (args.length == 1) {
reply("501 Syntax error in parameters or arguments.");
return;
}
doTaskid(arg.substring(6));
} else {
reply("500 Unknown SITE command");
}
Expand Down Expand Up @@ -2804,6 +2811,14 @@ public void doClientinfo(String description)
reply("250 OK");
}

public void doTaskid(String arg)
{
// REVISIT: the task id is recorded in the access log, so may be
// discoverable, provided this file still exists. In future, we
// may want to record client-supplied identifiers in billing.
reply("250 OK");
}

@Help("SBUF <SP> <size> - Set buffer size.")
public void ftp_sbuf(String arg)
{
Expand Down

0 comments on commit daad892

Please sign in to comment.