[
https://issues.jboss.org/browse/WFCORE-3406?page=com.atlassian.jira.plugi...
]
Chao Wang commented on WFCORE-3406:
-----------------------------------
Another example
https://github.com/soul2zimate/quickstart/tree/WFCORE-3406/helloworld
proves {{find-non-progressing-operation}} *works* as expected. It adds 50 seconds sleep in
servlet destroy to simulate blocked undeploy operation.
Steps to reproduce:
1. Start WildFly in Standalone.
2. From CLI, deploy attached helloworld.war:
{code}
[standalone@localhost:9990 /] deploy ~/path/to/helloworld.war
{code}
Or use wildfly-maven-plugin in helloworld source folder.
{code}
mvn clean install wildfly:deploy
{code}
3. Visit
http://localhost:8080/helloworld/HelloWorld to activate servlet.
4. From CLI, undeploy attached helloworld.war:
{code}
[standalone@localhost:9990 /] undeploy helloworld.war
{code}
Or use wildfly-maven-plugin
{code}
mvn clean install wildfly:undeploy
{code}
On server side, there is sleep message from destroy():
{code}
15:06:37,792 INFO [stdout] (ServerService Thread Pool -- 70) calling destroy method to
wait
{code}
5. Open a new CLI terminal to test operations after 15 seconds (default stability
timeout):
{code}
[standalone@localhost:9990 /]
/core-service=management/service=management-operations:find-non-progressing-operation
{
"outcome" => "success",
"result" => "-1125201532"
}
{code}
result shows find-non-progressing-operation returns the blocked operation with id.
{code}
[standalone@localhost:9990 /]
/core-service=management/service=management-operations:cancel-non-progressing-operation
{
"outcome" => "success",
"result" => "-1125201532"
}
{code}
result shows cancel-non-progressing-operation tries to cancel the same operation.
Due to the cancellation, there is error message on server side:
{code}
15:07:27,809 ERROR [org.jboss.as.server] (management-handler-thread - 3) WFLYSRV0008:
Undeploy of deployment "helloworld.war" was rolled back with no failure message
15:07:27,810 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 3) WFLYCTL0027: Operation was interrupted before service
container stability could be reached. Process should be restarted. Step that first updated
the service container was 'undeploy' at address '[("deployment"
=> "helloworld.war")]'
{code}
At CLI terminal where it executes the undeploy command returns {code}Undeploy failed:
WFLYCTL0271: Operation cancelled{code}
At last, the servlet page is still available to visit.
The previous observed problem comes from customized BlockerExtension.
{{find-non-progressing-operation}} needs to compare {{exclusive-running-time}} in
[ActiveOperationResource.getModel() L2604 - L2607
|https://github.com/wildfly/wildfly-core/blob/4.0.0.Alpha2/controller/src/main/java/org/jboss/as/controller/OperationContextImpl.java#L2604]
In case of {{ProcessType.STANDALONE_SERVER}}, it doesn't explicitly call
[
context.readResourceForUpdate|https://github.com/wildfly/wildfly-core/blo...]
which takes exclusive lock to update {{exclusiveStartTime}} as domain mode. Therefore,
{{exclusiveStartTime}} is always -1 as default. On the contrary, in the servlet example,
it did compare with correct {{exclusiveStartTime}}.
find-non-progressing-operation doesn't return the blocking
operation
--------------------------------------------------------------------
Key: WFCORE-3406
URL:
https://issues.jboss.org/browse/WFCORE-3406
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Reporter: Claudio Miranda
Assignee: Chao Wang
Attachments: helloworld.war
The find-non-progressing-operation operation of
/core-service=management/service=management-operations doesn't return the operation id
of a blocking operation on standalone. It works on domain mode.
To simulate the blocking operation, install the BlockingExtension from testsuite and call
{code}
/subsystem=blocker-test:block(block-point=MODEL,block-time=50000}
{code}
Open another jboss-cli.sh and call
{code}
/core-service=management/service=management-operations:find-non-progressing-operation
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)