-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
-
False
-
False
-
Undefined
-
-
2021 Week 34-36 (from Aug 23)
JBoss EAP s2i scripts provide a way for handling unfinished transactions for scale down processing.
The script is here
https://github.com/jboss-container-images/jboss-eap-modules/blob/7.3.x/os-eap-txnrecovery/bash/added/partitionPV.sh
It defines two methods. One for starting the application that configures a shared PV that all application pod can access. The other is used for starting a recovery pod which checks about unfinished transactions. It's controlled with `SPLIT_DATA` env variable. The EAP launch script can be seen here:
https://github.com/jboss-container-images/jboss-eap-modules/blob/7.3.x/jboss/container/eap/launch/added/openshift-launch.sh#L53
The solution in 3.x is based within an s2i script which starts pods of a single application in way they share a storage (persistent volume). All pods write to the shared PV and creates own standalone/data dir. When a pod finishes then there is running - alongside to the proper application - a recovery pod which verifies if there is some orphaned data dir and if so then it starts application server linking to the orphaned dir. It waits until transactions are finished and then remove the directory and stops the app server.
The idea is to have that configured in template as two separate DeploymentConfigs:
https://github.com/jboss-container-images/jboss-eap-7-openshift-image/blob/7.3.x/templates/eap73-openjdk11-tx-recovery-s2i.json#L570
https://github.com/jboss-container-images/jboss-eap-7-openshift-image/blob/7.3.x/templates/eap73-openjdk11-tx-recovery-s2i.json#L926
For JBoss EAP this s2i scripts are considered as tech preview but the only solution which can be used for OpenShift 3.x.
JBoss EAP consider WildFly Operator to be the supported solution for scaling down problem for OpenShift 4.x.
It could be good if RHPAM image is capable to run with the shared PV and permits to starts the recovery pod alongside of the standard application: https://github.com/jboss-container-images/jboss-eap-7-openshift-image/blob/7.3.x/templates/eap73-openjdk11-tx-recovery-s2i.json#L973 / https://github.com/jboss-container-images/jboss-eap-modules/blob/7.3.x/jboss/container/eap/launch/added/openshift-migrate.sh
- is blocked by
-
KIECLOUD-555 Adjust permissions on os-eap-txnrecovery.run module on jboss-eap-modules
- Closed