[jboss-jira] [JBoss JIRA] (WFCORE-4908) The write-attribute operation does not work on a hosts JVM resource

Brian Stansberry (Jira) issues at jboss.org
Wed Apr 8 09:54:27 EDT 2020


    [ https://issues.redhat.com/browse/WFCORE-4908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14027287#comment-14027287 ] 

Brian Stansberry commented on WFCORE-4908:
------------------------------------------

OK, so there is a CLI or server side bug that this didn't just fail:

{code}
[domain at embedded /] /host=master/server-config=server-one/jvm=default:write-attribute(name=jvm-options["-Xlog:gc*:file=${jboss.domain.servers.dir}/server-two/log/gc.log"])
{code}

Running that in a debugger, AbstractWriteAttributeHandler.execute gets hit and this is the operation ModelNode that gets passed in:

{code}
{
    "address" => [
        ("host" => "master"),
        ("server-config" => "server-one"),
        ("jvm" => "default")
    ],
    "operation" => "write-attribute",
    "name" => "jvm-options",
    "operation-headers" => {
        "caller-type" => "user",
        "domain-uuid" => "12b0b780-9370-4ba0-b58a-5968527a4b8f",
        "execute-for-coordinator" => true
    },
    "value" => undefined
}
{code}

So somewhere along the line the bogus text appended to jvm-options gets stripped.

> The write-attribute operation does not work on a hosts JVM resource
> -------------------------------------------------------------------
>
>                 Key: WFCORE-4908
>                 URL: https://issues.redhat.com/browse/WFCORE-4908
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Management
>            Reporter: James Perkins
>            Assignee: Jeff Mesnil
>            Priority: Major
>              Labels: domain-mode
>
> Under a hosts server config, {{/host=master/server-config=server-one/}}, there is a {{jvm}} resource. On this resource the {{write-attribute}} operation does not work expected.
> {code}
> [domain at embedded /] /host=master/server-config=server-one/jvm=default:add
> {
>     "outcome" => "success",
>     "result" => undefined,
>     "server-groups" => undefined
> }
> [domain at embedded /] /host=master/server-config=server-one/jvm=default:write-attribute(name=jvm-options["-Xlog:gc*:file=${jboss.domain.servers.dir}/server-two/log/gc.log"])
> {
>     "outcome" => "success",
>     "result" => undefined,
>     "server-groups" => undefined
> }
> [domain at embedded /] /host=master/server-config=server-one/jvm=default:read-resource
> {
>     "outcome" => "success",
>     "result" => {
>         "agent-lib" => undefined,
>         "agent-path" => undefined,
>         "debug-enabled" => undefined,
>         "debug-options" => undefined,
>         "env-classpath-ignored" => undefined,
>         "environment-variables" => undefined,
>         "heap-size" => undefined,
>         "java-agent" => undefined,
>         "java-home" => undefined,
>         "jvm-options" => undefined,
>         "launch-command" => undefined,
>         "max-heap-size" => undefined,
>         "max-permgen-size" => undefined,
>         "permgen-size" => undefined,
>         "stack-size" => undefined,
>         "type" => undefined
>     }
> }
> {code}
> As you can see from the above command does not update the {{jvm-options}}. However if you use the {{add-jvm-option}} operation that does work. It seems the {{write-attribute}} operation should also work.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list