[jboss-jira] [JBoss JIRA] (WFCORE-255) jboss.server.base.dir, jboss.server.config.dir and jboss.server.log.dir should also be allowed to be set as a system-property resource or overridden via JAVA_OPTS or the launch-command.
James Perkins (Jira)
issues at jboss.org
Mon May 4 20:16:00 EDT 2020
[ https://issues.redhat.com/browse/WFCORE-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076284#comment-14076284 ]
James Perkins commented on WFCORE-255:
--------------------------------------
One workaround I did not think about until just now. If you change the {{directory-grouping}} to {{by-type}} and then override the {{jboss.domain.log.dir}} that at least puts all the logs into the same main directory.
{code}
$JBOSS_HOME/bin/jboss-cli.sh -commands="embed-host-controller,/host=master:write-attribute(name=directory-grouping, value=by-type),stop-embedded-host-controller"
$JBOSS_HOME/bin/domain.sh -Djboss.domain.log.dir=/var/log/
{code}
That results in something like:
{code}
jperkins at localhost ~/tmp/logs $ tree
.
├── audit.log
├── host-controller.log
├── process-controller.log
└── servers
├── server-one
│ ├── audit.log
│ └── server.log
└── server-two
├── audit.log
└── server.log
{code}
> jboss.server.base.dir, jboss.server.config.dir and jboss.server.log.dir should also be allowed to be set as a system-property resource or overridden via JAVA_OPTS or the launch-command.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-255
> URL: https://issues.redhat.com/browse/WFCORE-255
> Project: WildFly Core
> Issue Type: Feature Request
> Components: Management
> Reporter: James Perkins
> Assignee: James Perkins
> Priority: Major
> Labels: domain-mode, downstream_dependency
>
> The three properties {{jboss.server.base.dir}}, {{jboss.server.config.dir}} and {{jboss.server.log.dir}} are allowed to be overridden for servers. For a domain server, these values need to be allowed to be set as a {{boot-time=true}} system property.
> These properties should also be allowed to be set as a system-property resource or overridden via {{JAVA_OPTS}} or the {{launch-command}}.
> The {{add}}, {{write-attribute}} and {{remove}} operations should not modify the runtime, but should modify the model. It's debatable whether the server should be put in a {{restart-required}} state. Currently similar resources do _not_ set the server state to {{restart-required}}. For now we should stick with the same state.
> {code}
> [domain at localhost:9999 /] /host=master/system-property=jboss.server.log.dir:add(boot-time=true,value="/var/log")
> {
> "outcome" => "failed",
> "result" => undefined,
> "failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.",
> "rolled-back" => true,
> "server-groups" => {"main-server-group" => {"host" => {"master" => {
> "server-one" => {"response" => {
> "outcome" => "failed",
> "failure-description" => "JBAS015845: System property jboss.server.log.dir cannot be set via the xml configuration file or from a management client; it's value must be known at initial process start so it can only set from the commmand line",
>
> "rolled-back" => true
> }},
> "server-two" => {"response" => {
> "outcome" => "failed",
> "failure-description" => "JBAS015845: System property jboss.server.log.dir cannot be set via the xml configuration file or from a management client; it's value must be known at initial process start so it can only set from the commmand line",
> "rolled-back" => true
> }}
> }}}}
> }
> {code}
> These properties should also be allowed to be set in the {{/host=\*/server-config=\*/jvm=\*/}} resource on the {{jvm-options}} and likely {{launch-command}} attributes.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list