Details
-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
17.0.0.Alpha1
-
None
Description
For the OpenShift image work we need to be able to handle configuration of datasources. There is an effort underway to replace the current template marker replacement done in standalone.xml with CLI commands.
While this works for the datasource subsystem itself, the OpenShift image scripts also touch other subsystems. For example if it is configured to use the Tx subsystem JDBC log store, we need to change the value of the /subsystem=transactions/log-store=log-store's 'type' attribute and to set the values of jdbc-action-store-table-prefix, jdbc-communication-store-table-prefix and jdbc-state-store-table-prefix and jdbc-store-datasource attributes on the subsystem itself.
The equivalent in the existing xml marker replacement is to inject the following xml into the subsystem (the 'os77c791d37250' is calculated by the OpenShift launch scripts):
<jdbc-store datasource-jndi-name="java:jboss/datasources/testtx_postgresqlObjectStore"> <action table-prefix="os77c791d37250"/> <communication table-prefix="os77c791d37250"/> <state table-prefix="os77c791d37250"/> </jdbc-store>
However, this is not possible to do via CLI. Starting the server without a jdbc-store, you end up with the following
[standalone@localhost:9990 /] /subsystem=transactions/log-store=log-store:read-resource { "outcome" => "success", "result" => { "type" => "default", "transactions" => undefined } }
If you try to write the 'type' attribute it gives the error than it is read-only
[standalone@embedded /] /subsystem=transactions/log-store=log-store:write-attribute(name=type, value=jdbc) { "outcome" => "failed", "failure-description" => "WFLYCTL0048: Attribute type is not writable", "rolled-back" => true }
If you try to delete the resource and add it again, it gives another error:
[standalone@embedded /] /subsystem=transactions/log-store=log-store:remove { "outcome" => "success", "result" => undefined } [standalone@embedded /] /subsystem=transactions/log-store=log-store:add(type=jdbc) { "outcome" => "failed", "failure-description" => "WFLYCTL0212: Duplicate resource [ (\"subsystem\" => \"transactions\"), (\"log-store\" => \"log-store\") ]", "rolled-back" => true }
Despite the change looking like it has taken effect:
[standalone@embedded /] /subsystem=transactions/log-store=log-store:read-resource { "outcome" => "success", "result" => { "type" => "jdbc", "transactions" => undefined } }
However, it is not persisted in xml, so restarting the server it says the type is 'default' again
Attachments
Issue Links
- relates to
-
WFLY-12121 Transaction JDBC object store CLI operation fails when set to false with information JDBC connection is needed
- Open