Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Administration.reload should support setting the use-current-server-config parameter #123

Closed
Ladicek opened this issue Jun 29, 2016 · 7 comments
Assignees
Milestone

Comments

@Ladicek
Copy link
Contributor

Ladicek commented Jun 29, 2016

The :reload management operation can take a parameter called use-current-server-config. If this parameter is set to false (the default is true) and --read-only-server-config was used when starting the server, the server reloads to the original configuration. This might be useful as a workaround for #14.

@Ladicek
Copy link
Contributor Author

Ladicek commented Jun 29, 2016

Or possibly another method Administration.reloadToOriginal. In standalone, it would set use-current-server-config to false; in domain, it would set both use-current-domain-config and use-current-host-config to false.

@mnovak1
Copy link
Collaborator

mnovak1 commented Jun 29, 2016

👍 to both options :-)

Little disadvantage of --read-only-server-config is that it will not make sense to archive standalone-...xml after test. For example for investigation purposes. I guess it could be workarounded by archiving snapshot of configuration.

@kwart
Copy link
Member

kwart commented Jun 29, 2016

+1

@Ladicek
Copy link
Contributor Author

Ladicek commented Jun 29, 2016

Right, --read-only-server-config still creates the snapshots as usual, IIUC. I need to play with it a little.

Not sure how archiving standalone*.xml would work even if we had "reload to snapshot".

@Ladicek
Copy link
Contributor Author

Ladicek commented Jul 12, 2016

@mnovak1 @kwart I'm thinking about dropping the PR (#127) for this. It exposes a relatively unknown feature on a prominent place (the Administration class), it can't guarantee that it's used correctly (there's an attempt to detect misuse, but it's a bit hacky), and I don't even know how the --read-only-*-config is supposed to work in managed domain. WildFly 11 will have WFCORE-351 / WFCORE-1052, which allows proper "reload to snapshot" functionality, which I'm definitely keen on supporting in Creaper.

If you think you would use this in the meantime, I have two options: implement in your own project (shouldn't be hard to do), or add it in Creaper (after a bit of hesitation), but not to the Administration class. I'd create a separate class (something like ReloadToOriginal) that would expose this. And I'd probably add it only for standalone, as I really don't understand how it works for managed domain. WDYT?

@kwart
Copy link
Member

kwart commented Jul 14, 2016

From my PoV, it's more consistent to keep it in Creaper. We don't need it in the Administration, some other place is also fine. You can annotate it with @TechnicalPreview or @Unsafe to keep it out of production use :)

@Ladicek
Copy link
Contributor Author

Ladicek commented Jul 15, 2016

OK, so a separate class ReloadToOriginal it is.

@Ladicek Ladicek self-assigned this Jul 15, 2016
@Ladicek Ladicek added this to the 1.4.0 milestone Jul 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants