- Feature Name: Static PEPs and Delay Rules - Status: in-progress - Start Date: 2020-10-13 - Authors: Kory Draughn - RFC PR: [#5175](https://github.com/irods/irods/pull/5175) - iRODS Issue: [#3049](https://github.com/irods/irods/issues/3049), [#4428](https://github.com/irods/irods/issues/4428), [#5153](https://github.com/irods/irods/issues/5153) # Static PEPs and Delay Rules ## What is this about? iRODS v4.2.9 contains a lot of changes. Some of the most important and exciting changes have to do with Intermediate Replicas, Logical Locking, and the Rule Execution (RE) Delay Server. In particular, this thread is interested in the community's thoughts about the changes to the RE Delay Server. ## What changed? In previous versions of iRODS, delay rules involved storing the contextual information in a file on the local hard drive. These files are known as Rule Execution Information files or REI files for short. These files contained information about who scheduled the rule, auth info, proxy info, data object info, and all sorts of information needed to successfully execute the rule later. This mostly worked, but presented problems related to performance and hard drive space. There are also issues with migrating the RE delay server to a different machine. To get around these issues, iRODS v4.2.9 has moved storage of the contextual information from a file on the local hard drive to the catalog. The contextual information is stored in a new column (i.e. `r_rule_exec.exe_context`) as JSON. This solves a multitude of problems. This allows the RE delay server to be migrated without any issues while also (hopefully) improving performance. ## Are there any downsides to this change? This should not be viewed as a downside. These changes are a step to future proofing your deployment. Aside from that, the most important thing to know in regards to these changes is that Static PEPs can no longer be used to schedule delay-based rules. For users and administrators who are using Static PEPs to schedule delay-based rules, you will need to update your policy to use Dynamic PEPs instead. We chose to not add support for Static PEPs due to the following reasons: - It helps push the community towards Dynamic PEPs. - It enables a path to deprecating and removing Static PEPs. - Static PEPs are planned for removal in iRODS v4.3.0. - Attempting to support Static PEPs meant we'd have to serialize ALL session variables. Given those reasons, it did not make sense to add support for them. Especially when the plan is to focus on getting iRODS v4.3.0 released before UGM 2021. ## Will I have to do anything special to upgrade my deployment? Hopefully not, iRODS v4.2.9 comes with a migration application that will automatically convert and import all existing REI files from the local hard drive into the catalog during server startup. The tool will provide information about the number of files processed as well as a log file for what happened during processing. The tool is also safe to re-run as many times as you like. However, the tool was implemented with the assumption that the contextual information was produced by a dynamic PEP. Another way to handle an upgrade is to drain all delay rules from the catalog. This will effectively skip the need of the migration tool and allow a clean upgrade. ## The Community With all of that said, we are interested in hearing what the community thinks of these changes. - Q. Do you agree with our decisions? - Q. How will this affect your deployment? - Q. Is there a better way to approach this? - Q. Have we covered all scenarios? ## Related Information See the following for details on what lead to this solution. - https://github.com/irods/irods/issues/3049 - https://github.com/irods/irods/issues/4428 - https://github.com/irods/irods/issues/5153 - https://github.com/irods/irods/pull/5175
Hi Kory, all!
Wonderfully detailed and explained as always, thank you. I hope its OK to reply here and not as an issue on the RFC repo?
My Initial thought was about the upgrade tool, where you said;
“iRODS v4.2.9 comes with a migration application that will automatically convert and import all existing REI files from the local hard drive into the catalog during server startup.”
Would it be possible to run this import tool before the upgrade? I’m thinking particularly of reducing any periods where the server/zone is in an in-between state between, say 4.2.8 and 4.2.9, where the upgrade script needs to complete before the service/zone is functional again, particularly if you have a large rule backlog (such as, say, importing 220 million metadata objects into elastic search via the indexing plugin :-) ). The database change appears to add columns rather than amend, if so, this could be done before the upgrade? Once the backlog was converted, any new/in progress rules would be easily then migrated as part of the upgrade in a matter of moments.
If not, can the tool be de-coupled from the upgrade so it could be run at any time after (such as with the 41.x -> 4.2 stale information removal script)? What happens in this case, will the rules continue to be processed, and new rules go into the catalog? If so this seems a safe and low impact path to migrating, especially if it can be stopped/started as required?
It would also be helpful to have a dry run option that would suggest how much additional space would be required in the database, and if any optimisations could be applied, such as indexes, trigrams and so forth. It would be embarrassing to run the database server out of temp table space mid-commit, or other capacity during the upgrade, if dealing with a large rule backlog to migrate!
You also mentioned; “Another way to handle an upgrade is to drain all delay rules from the catalog. This will effectively skip the need of the migration tool and allow a clean upgrade.”
As I understand this, it means let all the outstanding rules run before starting the upgrade and prevent any new one from starting? This would mean an extended downtime for the upgrade, I would presume, as functionality would have to be disabled to allow the backlog to drain?
Lastly, this statement;
“Static PEPs are planned for removal in iRODS v4.3.0.” Is there a list of Static PEPS and their targets that people can start to plan their migrations away, so that its a non-event by 4.3?
Hopefully I’ve not misunderstood something critical in the above, and its of some help.
John
--
--
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/c1a6aff6-4bcd-4e4a-b3a8-ce26bc96505an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/c5b39169-471f-48b4-932b-3efc40dcfc45n%40googlegroups.com.
Does static PEPs no longer being supported mean that the delay microservice will fail if called through a static PEP even if called indirectly by a nested rule and even if the session variables are not accessed by the delayed rule?
... there are some things you can do with static PEPs that can't be done with dynamic ones ...
Is it much work to allow a delay rule to be scheduled from a static PEP and just not serialize the session variables?
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/CACkmaQVhnvFH8iqTWyz3g%2BnYi_TYQ1F7B%3DWjr9Q0DxL%3D8sBSgw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/irod-chat/CAA-7h7k%3DJCv7xWs4NyE7BVT1MoRG70owevAHvDALSHjD%3Db-UEA%40mail.gmail.com.