DICE-UNC / jargon

Jargon core libraries
Other
28 stars 31 forks source link

old form rule marked as iRODS seems to run in the Python rule engine #265

Open michael-conway opened 6 years ago

michael-conway commented 6 years ago

Not sure about this one....

calling irods function with:<ExecMyRuleInp_PI><myRule>myTestRule||acGetIcatResults(*Action,*Condition,*B)##forEachExec(*B,msiGetValByKey(*B,RESC_LOC,*R)##remoteExec(*R,null,msiDataObjChksum(*B,*Operation,*C),nop)##msiGetValByKey(*B,DATA_NAME,*D)##msiGetValByKey(*B,COLL_NAME,*E)##writeLine(stdout,CheckSum of *E/*D at *R is *C),nop)|nop##nop
</myRule>
<RHostAddr_PI><hostAddr></hostAddr>
<rodsZone></rodsZone>
<port>0</port>
<dummyInt>0</dummyInt>
</RHostAddr_PI>
<KeyValPair_PI><ssLen>1</ssLen>
<keyWord>instance_name</keyWord>
<svalue>irods_rule_engine_plugin-irods_rule_language-instance</svalue>
</KeyValPair_PI>
<outParamDesc>*Action%*Condition%*Operation%*C%ruleExecOut</outParamDesc>
<MsParamArray_PI><paramLen>3</paramLen>
<oprType>0</oprType>
<MsParam_PI><label>*Action</label>
<type>STR_PI</type>
<STR_PI><myStr>chksumRescLoc</myStr>
</STR_PI>
</MsParam_PI>
<MsParam_PI><label>*Condition</label>
<type>STR_PI</type>
<STR_PI><myStr>COLL_NAME = '/zone1/home/test1/jargon-scratch/RuleProcessingAOImplTest'</myStr>
</STR_PI>
</MsParam_PI>
<MsParam_PI><label>*Operation</label>
<type>STR_PI</type>
<STR_PI><myStr>ChksumAll</myStr>
</STR_PI>
</MsParam_PI>

irods error...(4.2.1 on ubs14)


Oct 21 11:23:32 pid:24553 remote addresses: 192.168.56.1, ::1 ERROR: [exec_rule_text:532] Improperly formatted rule text in Python rule engine plugin
Oct 21 11:23:32 pid:24553 remote addresses: 192.168.56.1, ::1 ERROR: rsExecMyRule : -1828000, [-]   /tmp/tmpYqRcvD/irods_rule_engine_plugin-python.cxx:533:irods::error exec_rule_text(const irods::default_re_ctx &, const std::string &, msParamArray_t *, const std::string &, irods::callback) :  status [RULE_ENGINE_ERROR]  errno [] -- message [Improperly formatted rule_text]

Oct 21 11:23:32 pid:24553 remote addresses: 192.168.56.1, ::1 ERROR: executeRuleAction Failed for remoteExec status = -1828000 RULE_ENGINE_ERROR
Oct 21 11:23:32 pid:24553 NOTICE: executeRuleBody: Microservice or Action remoteExec Failed with status -1828000
Oct 21 11:23:32 pid:24553 remote addresses: 192.168.56.1, ::1 ERROR: executeRuleAction Failed for foreach status = -1828000 RULE_ENGINE_ERROR
Oct 21 11:23:32 pid:24553 NOTICE: executeRuleBody: Microservice or Action foreach Failed with status -1828000
Oct 21 11:23:32 pid:24553 NOTICE: execRuleNodeRes: applyRule Failed: myTestRule with status -1828000
Oct 21 11:23:32 pid:24553 DEBUG: 
Oct 21 11:23:32 pid:24553 NOTICE: execMyRule myTestRule||acGetIcatResults(*Action,*Condition,*B)##forEachExec(*B,msiGetValByKey(*B,RESC_LOC,*R)##remoteExec(*R,null,msiDataObjChksum(*B,*Operation,*C),nop)##msiGetValByKey(*B,DATA_NAME,*D)##msiGetValByKey(*B,COLL_NAME,*E)##writeLine(stdout,CheckSum of *E/*D at *R is *C),nop)|nop##nop
 Failed with status -1828000
Oct 21 11:23:32 pid:24553 remote addresses: 192.168.56.1, ::1 ERROR: rsExecMyRule : -1828000, [-]   /home/irodsbuild/irods/plugins/rule_engines/irods_rule_engine_plugin-irods_rule_language/libirods_rule_engine_plugin-irods_rule_language.cpp:394:irods::error exec_rule_text(irods::default_re_ctx &, const std::string &, msParamArray_t *, const std::string &, irods::callback) :  status [RULE_ENGINE_ERROR]  errno [] -- message [execMyRule failed for rule myTestRule||acGetIcatResults(*Action,*Condition,*B)##forEachExec(*B,msiGetValByKey(*B,RESC_LOC,*R)##remoteExec(*R,null,msiDataObjChksum(*B,*Operation,*C),nop)##msiGetValByKey(*B,DATA_NAME,*D)##msiGetValByKey(*B,COLL_NAME,*E)##writeLine(stdout,CheckSum of *E/*D at *R is *C),nop)|nop##nop
]
michael-conway commented 5 years ago

Put in bucket for re-testing with latest iRODS

michael-conway commented 5 years ago

retested and updated issue on iRODS side that problem persists. parking for now.

korydraughn commented 1 month ago

This issue mentions old form rule. It's not clear to me what that means. Perhaps it is about an old way of writing/submitting rule code to the PREP? If so, I don't think that is worth testing. Instead, we should add a few tests which demonstrate and prove Jargon supports PREP rule execution.

trel commented 1 month ago

The 'old form rule' is the original irods rule language format - where everything was on one line.

I think anyone with rules from that era need to move forward (and migrate their logic) - not worth the code here to parse and run them now.

korydraughn commented 1 month ago

Agreed.