Closed jairojunior closed 8 years ago
Important information extracted from a comment in PR #79.
update-properties
(e.g. /subsystem=logging/periodic-rotating-file-handler=FILE:update-properties(...)
) and a composite operation of write-attribute
is indeed a more generic solution.[1] In practice I've seen two ways to realize this: (1) change configuration XML (i.e. offline changes) or (2) disable deployment, change resources and enable it again. Both alternatives imply in a small downtime, and it might be related to JBoss AS 7+ architecture (subsystems are lazily loaded).
Ok,
I think some things are not possible or can make the code/procedure pretty complex. So it keep it simple and off course it should be supported by the jboss core ( we don't want to do their work).
but if you want to do manually what are the steps you should do and do you also have some downtime of the resource.
Just brainstorming ( maybe I think to simple ), maybe the administrator should say on the datasource that a particular resource is dependent, check if there is a change on the datasource, we will try to disable the resource, do the datasource change and enable it again.
Most of the time this has been handled by building the new resource beside the old resource with a different name. It's dirty, but it's a good way to keep track of your changes.
Another effective strategy is to rollback standalone.xml
to it's initial state and reapply all resources. It could be possible to make Puppet work in conjunction with configuration history[1] to accomplish this seamlessly. (i.e. pass some sort of flag to build your new configuration on top of initial configuration)
Another update: Offline changes is not a constraint anymore since we have Offline CLI [2] in EAP 7+ / Wildfly 9+.
[1] https://docs.jboss.org/author/display/AS71/Configuration+file+history?_sscc=t [2] https://developer.jboss.org/wiki/OfflineCLIWork
operation-headers
with ordering looks promising. Will create a separate issue for OfflineCLI and --server-config
parameter.
If you have a resource (e.g. a deployment) that depends on another resource (e.g. a datasource) and you try to update the datasource, it will fail cause wildfly_resource is not actually updating the resource, property by property, it's removing and inserting again.
Resource update should assemble a update-properties operation in order to avoid this issue.