[JBoss JIRA] (WFCORE-1987) Create request/response reporting mechanism
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1987?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-1987:
------------------------------------------
I would expect getDomainResults to return an undefined node for a write-attribute call. The key thing is it's concerned with the *result* child of the response that goes to the user, not the complete response. The result of a write-attribute is 'undefined':
{code}
{
"outcome" => "success",
"result" => undefined
}
{code}
Does the A2 node have the warnings you expect? If so you'll need to propagate those to A1 by reading them from A2 and calling context.addWarning, similarly to how it currently reads the result from A2 and passes it to A1 by calling context.getResult().set(...)
What needs thought is how to deal with warnings that come from slave HCs and from the servers as part of domain rollout. My impression from your comments is that in the case of servers, the 'server-results' structure is showing the warnings from the servers, as part of each server's response. Correct? If so, that sounds ok.
For these domain rollout ops, I think it's fine to ignore warnings from the slave HCs. They should be redundant, same as what the master generated in your A2 response.
All this is about ops that result in a domain-wide rollout (i.e. that go the OperationCoordinatorStepHandler.executeTwoPhaseOperation path). This feature also needs to deal with ops that go the executeDirect path or that are proxied steps in a composite that goes the executeTwoPhaseOperation. That is
/host=slave:do-something-that-generates-a-warn
or
/host=slave/server=a:do-something-that-generates-a-warn
or
/host=master/server=a:do-something-that-generates-a-warn
Aha! It looks like that is largely handled. See ProxyStepHandler L199-201 -- any headers from the proxied process are copied into the local response.
This will all need to be verified via tests.
> Create request/response reporting mechanism
> -------------------------------------------
>
> Key: WFCORE-1987
> URL: https://issues.jboss.org/browse/WFCORE-1987
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Remoting
> Reporter: Radim Hatlapatka
> Assignee: Bartosz Baranowski
> Labels: downstream_dependency
>
> In certain cases it is useful to send back, to client, some sort of context information about the outcome of operation. For instance, when change in configuration warrants another one and without it, after reload/restart server could not operate properly. For instance JBEAP-7284.
> Scope of this enhancement are:
> a) way to send back information
> b) control level of "information" - just like in case of loggers
> a) Information will be sent in response headers, under "warnings" key. Each entry, "warning" will contain operation, address, level/severity and i18n string with proper ID.
> b) default level threshold would be "WARNING", if user requires more detailed information, he can request it via operation-headers->warninig-level
> Example:
> {noformat}
> {
> "outcome" => "success",
> "response-headers" => {
> "warnings" => [
> {
> "warning" => "WFLYCTL0436: Couldn't convert 'XXX' into proper warning level, threshold falling back to 'ALL'. Possible values: SEVERE,WARNING,INFO,CONFIG,FINE,FINER,FINEST",
> "level" => "ALL",
> "operation" => {
> "address" => [
> ("subsystem" => "undertow"),
> ("server" => "default-server"),
> ("http-listener" => "default")
> ],
> "operation" => "write-attribute"
> }
> },
> {
> "warning" => "WFLYUT0090: Worker used in http-listener: 'puppet-master', must be used in remoting subsystem.",
> "level" => "WARNING",
> "operation" => {
> "address" => [
> ("subsystem" => "undertow"),
> ("server" => "default-server"),
> ("http-listener" => "default")
> ],
> "operation" => "write-attribute"
> }
> }
> ],
> "operation-requires-reload" => true,
> "process-state" => "reload-required"
> }
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (WFCORE-2089) Infinite wildfly boot on StartException in service start
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2089?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFCORE-2089:
-------------------------------------
Git Pull Request: https://github.com/wildfly/wildfly-core/pull/2143 (was: https://github.com/wildfly/wildfly-core/pull/2053)
> Infinite wildfly boot on StartException in service start
> --------------------------------------------------------
>
> Key: WFCORE-2089
> URL: https://issues.jboss.org/browse/WFCORE-2089
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management, Security
> Reporter: Jan Kalina
> Assignee: ehsavoie Hugonnet
> Priority: Blocker
> Attachments: threads-2.txt, threads.txt
>
>
> Following exception (and probably similar too) will cause wildfly frozing during start. Visible especially during integration tests (which will never ends), but reproducible directly too (see steps).
> {code:java}
> 15:59:37,252 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service org.wildfly.security.security-realm.ManagementRealm: org.jboss.msc.service.StartException in service org.wildfly.security.security-realm.ManagementRealm: WFLYELY00025: Referenced property file is invalid: ELY01006: No realm name found in password property file
> at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:185)
> at org.wildfly.extension.elytron.PropertiesRealmDefinition$1$1.get(PropertiesRealmDefinition.java:164)
> at org.wildfly.extension.elytron.TrivialService.start(TrivialService.java:53)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1963)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1896)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> *Update:* This problem with infinite boot will occure everytime the start() method of some service throws StartException(). Not an Elytron problem.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months
[JBoss JIRA] (WFCORE-1855) Possible NPE on controller service start
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1855?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFCORE-1855:
------------------------------------------
https://github.com/bstansberry/wildfly-core/tree/WFCORE-1855 is WIP on this. Kind of a workaround. I opened up a PR for it but I think I'll withdraw it for now as it's a bit out of date and I don't feel urgency to get this particular solution in.
> Possible NPE on controller service start
> ----------------------------------------
>
> Key: WFCORE-1855
> URL: https://issues.jboss.org/browse/WFCORE-1855
> Project: WildFly Core
> Issue Type: Bug
> Reporter: David Lloyd
> Assignee: Brian Stansberry
>
> In {{org.jboss.as.controller.AbstractControllerService}}, the {{start}} method starts up a background thread which performs a certain amount of the boot process. Before this thread is started, a volatile field {{controller}} is initialized with the controller reported by the {{start()}} method.
> Inside this thread, some work is performed, and at the end of a certain amount of work, the {{finishBoot()}} method is invoked. This method calls {{controller.finishBoot()}}, referencing the field that was set in the {{start()}} method.
> The problem arises when the service itself is stopped before the boot thread completes. This causes the {{controller}} field to be nulled out, resulting in an NPE.
> I think we need to look at:
> * Why are we using a background thread for this?
> * Why are we _not_ using the asynchronous startup feature?
> I think we must do one of these two things in order to make this code "safe".
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 3 months