Description of problem:
The ability to change the jndi name for the mysql datasource doesn't work. Disabling the data source and changing the name results in the name changing in the UI, but the datasource will not reenable and the managment console shows a generic "an error occured" message in the overlay at the top. Directly editing the standalone.xml file to set the correct jndi name for my application worked until a restart of the application server was required. The name reverted to the original default even though the standalone.xml file still shows the correct (edited) JNDI name.
Setting this name arbitrarily works on my local wildfly instance. The jndiname in question is java:/MinervaPortalDS which is a legal JNDI name as far as I know.
Version-Release number of selected component (if applicable):
Current openshift cartridge version (8.1.0 of wildfly)
Each and every gear restart, or if the gear is idle for a period of time.
Steps to Reproduce:
1) Setup a fresh wildfly cartridge with a mysql instance.
2) Attempt to use the mysql datasource after changing the jndi name.
The datasource can no longer be enabled. The new JNDI name is not available to deployments resulting in unsatisfied dependencies.
The datasource's jndi name should change and be available to deployments.
Where did you edit the standalone.xml? The only place you can make changes to the configuration and expect them to persist is in the .openshift/config/standalone.xml file in your app repository (and then you must push that change)
Otherwise changes you make will be overwritten when the app is restarted, as you observed.
Have not heard from reporter for 10 days...closing.
Andrew, please reopen if you can provide the information from comment #1, otherwise I'm afraid I can't make progress on diagnosing this bug.
Sorry for the lack of reply. I thought Bugzilla would notify me of updates to the ticket.
I was editing it in ~/wildfly/standalone/configuration. It is likely that is the problem. I saw no documentation about that. However, shouldn't changes in the management console "take" or are those intended to be transient also?
Those are also transient unless you set the following environment value:
if you set that, then openshift will not replace your config on each startup and you can freely manipulate it either by hand or via the console.
I believe you can also remove the standalone.xml from your .openshift/config directory in your repo and push the change, from then on the config will not be replaced on startup (since there is no config in your repo anymore). But the env variable is the intended way to get this behavior.