Please let me know what causes the error output when setting the replica.

37 views
Skip to first unread message

成島雅人

unread,
Mar 30, 2023, 7:08:02 AM3/30/23
to iRODS-Chat
I want to set a replica when iput, so core.py (using irods_rule_engine_plugin_python) calls acPostProcForPut and creates a replica with msiDataObjRepl.
Replica is created, but error is printed in debug message and log.

[message]
 $ iput testfile00
Level 0: selected destination hierarchy [replResc;replicaresc] is not stale; replication is not allowed.
Level 1: DEBUG: msiDataObjRepl: rsDataObjRepl failed /tempZone/home/rdmuser/testfile00, status = -169000

[log]
 log_message":"applyRule: -169000, [-]\t/irods_source/server/re/include/irods/irods_re_plugin.hpp:333:irods::error irods::dynamic_operation_execution_manager<std::tuple<>, RuleExecInfo *, irods::DONT_AUDIT_RULE>::call(const std::string &, const std::string &, OP, As &&...) [T = std::tuple<>, C = RuleExecInfo *, Audit = irods::DONT_AUDIT_RULE, OP = std::function<irods::error (const std::string &, irods::re_pack_inp<std::tuple<>> &)>, As = <const std::string &, irods::re_pack_inp<std::tuple<>> &>] :  status [SYS_NOT_ALLOWED]  errno [] -- message [irods_rule_engine_plugin_python::irods::error exec_rule(const irods::default_re_ctx &, const std::string &, std::list<boost::any> &, irods::callback) Caught Python exception.\nTraceback (most recent call last):\n  File \"/etc/irods/core.py\", line 20, in acPostProcForPut\n    callback.msiDataObjRepl(source_file, 'destRescName=' + dest_resource, 0)\nRuntimeError: [iRods__Error__Code:-169000] [-]\t/irods_source/server/re/include/irods/irods_re_plugin.hpp:333:irods::error irods::dynamic_operation_execution_manager<std::tuple<>, RuleExecInfo *, irods::DONT_AUDIT_RULE>::call(const std::string &, const std::string &, OP, As &&...) [T = std::tuple<>, C = RuleExecInfo *, Audit = irods::DONT_AUDIT_RULE, OP = std::function<irods::error (const std::string &, RuleExecInfo *&, irods::unpack &&)>, As = <const std::string &, RuleExecInfo *&, irods::unpack>] :  status [SYS_NOT_ALLOWED]  errno [] -- message [exec_microservice_adapter failed]\n\t[-]\t/irods_source/server/re/src/irods_re_plugin.cpp:133:irods::error irods::default_microservice_manager<RuleExecInfo *>::exec_microservice_adapter(std::string, irods::default_ms_ctx, std::list<boost::any> &) :  status [SYS_NOT_ALLOWED]  errno [] -- message [exec_microservice_adapter failed]\n\n\n]\n\t[-]\t/irods_plugin_source/irods_rule_engine_plugin-python.cxx:557:irods::error exec_rule(const irods::default_re_ctx &, const std::string &, std::list<boost::any> &, irods::callback) :  status [SYS_NOT_ALLOWED]  errno [] -- message [irods_rule_engine_plugin_python::irods::error exec_rule(const irods::default_re_ctx &, const std::string &, std::list<boost::any> &, irods::callback) Caught Python exception.\nTraceback (most recent call last):\n  File \"/etc/irods/core.py\", line 20, in acPostProcForPut\n    callback.msiDataObjRepl(source_file, 'destRescName=' + dest_resource, 0)\nRuntimeError: [iRods__Error__Code:-169000] [-]\t/irods_source/server/re/include/irods/irods_re_plugin.hpp:333:irods::error irods::dynamic_operation_execution_manager<std::tuple<>, RuleExecInfo *, irods::DONT_AUDIT_RULE>::call(const std::string &, const std::string &, OP, As &&...) [T = std::tuple<>, C = RuleExecInfo *, Audit = irods::DONT_AUDIT_RULE, OP = std::function<irods::error (const std::string &, RuleExecInfo *&, irods::unpack &&)>, As = <const std::string &, RuleExecInfo *&, irods::unpack>] :  status [SYS_NOT_ALLOWED]  errno [] -- message [exec_microservice_adapter failed]\n\t[-]\t/irods_source/server/re/src/irods_re_plugin.cpp:133:irods::error irods::default_microservice_manager<RuleExecInfo *>::exec_microservice_adapter(std::string, irods::default_ms_ctx, std::list<boost::any> &) :  status [SYS_NOT_ALLOWED]  errno [] -- message [exec_microservice_adapter failed]\n\n\n]\n\n"
 

Alan King

unread,
Mar 30, 2023, 9:16:59 AM3/30/23
to irod...@googlegroups.com
Hi,

It looks like you put the data object into a replication resource. The replication resource will replicate to its child resources after the put as a result of its built-in policy. Depending on what you are trying to do, the acPostProcForPut may not be necessary because of the built-in replication policy for the replication resource.

Now, to address the problem here, the msiDataObjRepl may be targeting the replication resource. As a result, it will attempt to overwrite the good replica which was just created by the put (before the event which triggers replication within the replication resource), and this is not allowed under the rules for replication in iRODS.

Make sure that the msiDataObjRepl is targeting a resource which is outside of the replication resource, or consider a different type of coordinating resource which is more in line with the policy you are trying to implement. Alternatively, you might want to consider using the dynamic PEP pep_api_data_obj_put_post instead of acPostProcForPut. This PEP should fire *after* the replication has completed. However, you will still need to make sure the replication is targeting a resource outside of the replication hierarchy.

Hope that helps!

--
--
The Integrated Rule-Oriented Data System (iRODS) - https://irods.org
 
iROD-Chat: http://groups.google.com/group/iROD-Chat
---
You received this message because you are subscribed to the Google Groups "iRODS-Chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to irod-chat+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/1552763b-3fc7-4255-b5ee-631abbde539an%40googlegroups.com.

成島雅人

unread,
Mar 30, 2023, 9:25:56 PM3/30/23
to iRODS-Chat
thank you for answering. It was helpful.

Change msiDataObjRepl target (replResc → tcmresc)
I got it using pep_api_data_obj_put_post
No more error output.

Let me confirm for my understanding.
receive advice to create a replica,
Changed resource from replResc (replication resource) to tcmresc.
When I run msiDataObjRepl with acPostProcForPut I get
A similar message is printed.
I understand that changing the replicated resource from "replicated resource" to " outside resource" will fix the problem, am I wrong?

$ ilsresc
replResc:replication
└── replicaresc:unixfilesystem
tcmresc:unixfilesystem
2023年3月30日木曜日 22:16:59 UTC+9 alankin...@gmail.com:

Alan King

unread,
Apr 3, 2023, 9:53:07 AM4/3/23
to irod...@googlegroups.com
I think your understanding is correct. The replication performed by msiDataObjRepl in acPostProcForPut is likely the cause of the error. Without knowing the details of your policy requirements, we won't be able to offer much guidance beyond that.

The hierarchy you posted shows only 1 child resource under replResc (that is, replicaresc). Is this on purpose?



--
Alan King
Senior Software Developer | iRODS Consortium

成島雅人

unread,
Apr 3, 2023, 8:09:42 PM4/3/23
to iRODS-Chat
thank you for answering
Currently, we are checking how to use the replica, so the usage policy is undecided.
Learn and review how to use replicas.
replResc was created for testing and I created only one child.
And, as you suggested, use pep_api_data_obj_put_post to run on put.

2023年4月3日月曜日 22:53:07 UTC+9 alankin...@gmail.com:

Alan King

unread,
Apr 4, 2023, 8:58:32 AM4/4/23
to irod...@googlegroups.com
Understood. Please let us know if there's anything else we can help with!

Reply all
Reply to author
Forward
0 new messages