Closed kript closed 5 years ago
Interesting, could you try again with the -d option and see if it works with the default host?
Using the -d
option it works;
$ /software/npg/20180702/bin/tears -v -f -r /seq-dev/home/jc18#Sanger1-dev/irods_test_small_NFo < irods_test_small_NFo
Setting client name to: tears:1.2.4
No iRODS URI, using default settings.
host irods-sanger1-dev.internal.sanger.ac.uk
zone Sanger1-dev
user jc18
port 1247
Extra error message:
Error: rcGetHostForGet failed with status -1803000:HIERARCHY_ERROR
$ /software/npg/20180702/bin/tears -v -d -f -r /seq-dev/home/jc18#Sanger1-dev/irods_test_small_NFo < irods_test_small_NFo
Setting client name to: tears:1.2.4
No iRODS URI, using default settings.
host irods-sanger1-dev.internal.sanger.ac.uk
zone Sanger1-dev
user jc18
port 1247
1024 bytes read
1024 bytes written
0 bytes read
Total bytes written 1024
So going through the default server (zone?) works. The API call rcGetHostForGet that tears uses to get the right host for reading files is coming back with an error. This sounds like a server side problem though I don't know how we go about testing that. I wonder if there is another client that uses this API call.
I can replicate the error.
If objPath points to a file rcGetHostForGet returns an error code. So if objPath is:
/seq-dev/home/jc18#Sanger1-dev/test.txt
Then the returned error code will be -1803000 (HIERARCHY_ERROR).
If the objPath points instead to a collection then there is no error. So /seq-dev/home/jc18#Sanger1-dev
will return an answer.
In the current (and back to 2016 when the cpp version of rcGetHostForGet was first put in the irods github) the documentation in the header says this:
param[in] dataObjInp - generic dataObj input. Relevant items are: objPath - the path of the target collection.
Which explicitly calls for an object path to a collection.
However, tears predates this version of irods and the irods-legacy documentation says this:
`\usage
Get the address of the best server to download the data object /myZone/home/john/myfile:
dataObjInp_t dataObjInp; char *outHost = NULL; bzero (&dataObjInp, sizeof (dataObjInp)); rstrcpy (dataObjInp.objPath, "/myZone/home/john/myfile", MAX_NAME_LEN); status = rcGetHostForGet (conn, &dataObjInp, &outHost); if (status < 0) { \n .... handle the error }
Which wants an actual file and is what I originally programmed against.
At some point the documentation changed but the behaviour of irods did not. It looks like it now has.
Test harness passes in 4.1.10 and fails in 4.1.11 (I think) and 4.1.12
What is interesting also is that the
HIERARCHY_ERROR
doesn't appear in any of the IES or IRES logs.