Open ccacciari opened 6 years ago
Everywhere the replication is NOT successful it states. replication does work, but it fails with error messages:
Jun 27 12:26:01 pid:3738 NOTICE: writeLine: inString = DEBUG: [EUDATReplication] response = /tempZone/home/irsara/test_b2safe_data1.txt::/tempZone/home/irsara/test_b2safe_data2.txt::demoResc::registered=false+::recursive=true
Jun 27 12:26:01 pid:3738 NOTICE: writeLine: inString = true
Jun 27 12:26:01 pid:3738 remote addresses: 127.0.0.1, 145.100.4.16 ERROR: addMsParam: NULL msParamArray or label input
Jun 27 12:26:01 pid:3738 remote addresses: 127.0.0.1, 145.100.4.16 ERROR: addMsParam: NULL msParamArray or label input
This causes the return to be empty instead of Succes!
or Failure!
12:25 sara-irods4.irods.surfsara.nl:/home/irsara/git/B2SAFE-core/scripts/tests
irsara$ ./testB2SafeCmd.py -test b2safe
Test b2safe
test_10_irods_functions (testB2SafeCmd.irodsb2safetest.IrodsB2safeIntegrationTests)
Test : basic iRODS functions. ... ok
test_10_irods_put_file (testB2SafeCmd.irodsb2safetest.IrodsB2safeIntegrationTests)
Test : put a file in iRODS ... ok
test_70_b2safe_local_for_one_file_not_registered_recursive (testB2SafeCmd.irodsb2safetest.IrodsB2safeIntegrationTests)
Test : replicate a single file locally using b2safe (not registered, recursive) ... Replica_result:******
21.T12996/7C1FA156-79F4-11E8-B26A-FA163E98A05A
FAIL
======================================================================
FAIL: test_70_b2safe_local_for_one_file_not_registered_recursive (testB2SafeCmd.irodsb2safetest.IrodsB2safeIntegrationTests)
Test : replicate a single file locally using b2safe (not registered, recursive)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/irsara/git/B2SAFE-core/scripts/tests/testB2SafeCmd/irodsb2safetest.py", line 301, in test_70_b2safe_local_for_one_file_not_registered_recursive
test_assert_array(self, test_values)
File "/home/irsara/git/B2SAFE-core/scripts/tests/testB2SafeCmd/irodsb2safetest.py", line 56, in test_assert_array
self.assertEqual(result, expected, output_string)
AssertionError: The replication was NOT succesful
----------------------------------------------------------------------
Ran 3 tests in 5.367s
FAILED (failures=1)
And the code which executes should always return Succes!
def replicate_irods_file(source, destination, registered, recursive):
'''procedure to replicate a file with EUDAT rules in iRODS'''
# create test rule to replicate file
#irule_rule = "{*status = EUDATReplication(*source, *destination,*registered, *recursive, *response); writeLine('serverLog', str(*status)); if (*status) { writeLine('stdout', 'Success!'); } else { writeLine('stdout', 'Failed: *response'); }}"
irule_rule = "{*status = EUDATReplication(*source, *destination,*registered, *recursive, *response); writeLine('serverLog', str(*status)); writeLine('stdout', 'Success!'); }"
irule_input = '*source='+source+'%*destination='+destination+'%*registered='+registered+'+%*recursive='+recursive
irule_output = 'ruleExecOut'
command = ["irule", irule_rule, irule_input, irule_output]
# execute test rule
irule_result = subprocess_popen(command)
replicate_result = irule_result[0]
return replicate_result
Because the iRODS code is more strict somewhere a NULL
or empty label is passed.
int
47 addMsParamToArray( msParamArray_t *msParamArray, const char *label,
48 const char *type, void *inOutStruct, bytesBuf_t *inpOutBuf, int replFlag ) {
49 msParam_t **newParam;
50 int len, newLen;
51
52 if ( msParamArray == NULL || label == NULL ) {
53 rodsLog( LOG_ERROR,
54 "addMsParam: NULL msParamArray or label input" );
55 return SYS_INTERNAL_NULL_INPUT_ERR;
56 }
see also: https://github.com/irods/irods/issues/3722 The real problem was already there in iRODS 4.2.2. But because msiexec did not work remote it was never solved.
See also: https://github.com/irods/irods/issues/3998
The remote
service is broken.
Waiting for fix in iRODS 4.2.4
Fixed in iRODS 4.2.5. Available when 4.2.5 is released.
Running the test suite in iRODS 4.2.3, the last 12 tests about replication fail: