Error when getting collection permissions if the collection is empty

19 views
Skip to first unread message

s...@it-innovation.soton.ac.uk

unread,
Feb 15, 2012, 9:49:37 AM2/15/12
to iROD-Chat
I am using iRODS 3.0 and prods 3.0.0 beta1, and I am having a problem
getting access permissions. To get the access permissions I use the
Prods Rule class and make a rule that invokes the
“msiGetCollectionACL” micro service.

I only get an error if there is nothing in the collection. If I have
uploaded a file to the collection, the access permissions are returned
with no problems.

The error I get is the following:

iRODS Exception : Code = -15000, Cause: RODSException: [-15000
SYS_PACK_INSTRUCT_FORMAT_ERR]: RODSMessage::unpack failed.1! The
header length is unexpected: ''
, trace = #0 /opt/irodsphp/prods/src/RODSConn.class.php(1335):
RODSMessage->unpack(Resource id #34)
#1 /opt/irodsphp/prods/src/ProdsRule.class.php(55): RODSConn-
>execUserRule('getCollectionPe...', Array, Array, Array, NULL)
#2 /opt/lampp/htdocs/irods_rest_interface/irods_utils_class.php(2162):
ProdsRule->execute()

If anyone can help it would be gratefully received!

Thanks in advance

Steve Taylor

Lisa Stillwell

unread,
Feb 15, 2012, 2:06:04 PM2/15/12
to irod...@googlegroups.com
Hi Steve,

I can take a look at this.
Can you send me the piece of code where send your rule using the ProdsRule class so I can try it out here?

thanks,
Lisa Stillwell
RENCI/UNC - Chapel Hill

> --
> "iRODS: the Integrated Rule-Oriented Data-management System; A community driven, open source, data grid software solution" https://www.irods.org
>
> iROD-Chat: http://groups.google.com/group/iROD-Chat

s...@it-innovation.soton.ac.uk

unread,
Feb 16, 2012, 5:13:05 AM2/16/12
to iROD-Chat
Thanks very much for looking at this!

Here is the function I wrote in PHP - I suspect I am doing something
wrong but I cannot figure out what!

Thanks again

Steve

///////////////////////////////////////////////////////////////////////////
static function getObjectPermission
($account, $path) {
///////////////////////////////////////////////////////////////////////////


try {

$rule_body='getObjectPermission'.
'|'.
'|'.
'msiGetDataObjACL(*objectPath, *outParams)'.
'##'.
'writeLine(serverLog, getObjectPermission Success - Input
path = *objectPath. Result = $status. Output Params = *outParams.)' .
'##'.
'writeBytesBuf(stdout,*outParams)'.
'|'.
'writeLine(serverLog, getObjectPermission Fail - Result =
$status.)' .
'##'.
'nop'.
'##'.
'nop';


$input_params=array(
'*objectPath'=>$path
);
$out_params = array('ruleExecOut');


$rule=new ProdsRule($account,$rule_body,$input_params,
$out_params);

$results = array();
$results=$rule->execute();

$output = implode (",", $results);

$result_output = print_r ($results, true);
$out_params_output = print_r($out_params, true);

$output2 = "Rule Exec Results: " . $result_output .
"Output Parameters Array = ". $out_params_output;

iRODSUtils::logToFile("Rule execution results = ". $output ."
another form " . $output2);

return $output;

}
catch (Exception $e) {
throw $e;

s...@it-innovation.soton.ac.uk

unread,
Mar 2, 2012, 9:50:29 AM3/2/12
to iROD-Chat
This is an update on what happened for the benefit of the list - this
turned out to be a small and subtle bug in the ERA module, and the
irods team made a fix very quickly. I put the fix into my irods
installation, and it works well and addresses the original problem I
had, so I am very pleased!

I am pretty sure the fix has been committed to the irods trunk, and I
am guessing it will be available in the next maintenance release.

I would like to publicly say thanks very much to Antoine who made the
fix, and Lisa who liaised with me initally. This kind of support is
great stuff.

Thanks again to the irods team - fantastic!


Steve

PS Im not affiliated with irods- just a happy user!

On Feb 16, 10:13 am, "s...@it-innovation.soton.ac.uk" <s...@it-

Terrell Russell

unread,
Mar 2, 2012, 10:11:35 AM3/2/12
to iROD-Chat
This is Antoine's commit that makes the changes you mention:

  https://github.com/trel/iRODS/commit/aea9c609bc227756e6b41f6a8736b37af1237871

Terrell


On Mar 2, 7:50 am, "s...@it-innovation.soton.ac.uk" <s...@it-
Reply all
Reply to author
Forward
0 new messages