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

WFCORE-693 Do not require the exclusive management lock to run the "kill" or "de… #998

Merged
merged 1 commit into from Aug 28, 2015

Conversation

luck3y
Copy link
Contributor

@luck3y luck3y commented Aug 25, 2015

Don't aquire exclusive lock for server kill / shutdown ops.

@luck3y luck3y changed the title Do not require the exclusive management lock to run the "kill" or "de… WFCORE-693 Do not require the exclusive management lock to run the "kill" or "de… Aug 25, 2015
@wildfly-ci
Copy link

Windows Build 2005 is now running using a merge of cb90138

@wildfly-ci
Copy link

Linux Build 2493 is now running using a merge of cb90138

@wildfly-ci
Copy link

Core - Full Integration - Windows Build 42 is now running using a merge of cb90138

@wildfly-ci
Copy link

Linux Build 2493 outcome was SUCCESS using a merge of cb90138
Summary: Tests passed: 3403, ignored: 64 Build time: 00:39:08

@wildfly-ci
Copy link

Windows Build 2005 outcome was SUCCESS using a merge of cb90138
Summary: Tests passed: 3403, ignored: 64 Build time: 00:39:45

@wildfly-ci
Copy link

Core - Full Integration - Windows Build 42 outcome was FAILURE using a merge of cb90138
Summary: Tests failed: 1 (1 new), passed: 3054, ignored: 358 Build time: 00:52:39

Failed tests

org.jboss.as.test.clustering.messaging.ClusteredMessagingTestCase.testClusteredTopic: java.lang.AssertionError: null
    at org.jboss.as.test.clustering.messaging.ClusteredMessagingTestCase.receiveMessage(ClusteredMessagingTestCase.java:218)
    at org.jboss.as.test.clustering.messaging.ClusteredMessagingTestCase.testClusteredTopic(ClusteredMessagingTestCase.java:169)
------- Stdout: -------
23:52:26,101 WARNING [org.jboss.as.arquillian.container.managed.ManagedDeployableContainer] (main) Bundles path is deprecated and no longer used.
23:52:26,103 INFO  [org.jboss.as.arquillian.container.managed.ManagedDeployableContainer] (main) Starting container with: [C:\Java\jdk1.8.0_45\bin\java, -D[Standalone], -Xms64m, -Xmx512m, -Xmx512m, -Djava.net.preferIPv4Stack=true, -Djava.net.preferIPv4Stack=false, -Djava.awt.headless=true, -Djboss.modules.system.pkgs=org.jboss.byteman, -Djboss.dist=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering/../../../dist/target/wildfly-10.0.0.CR1-SNAPSHOT, -Djboss.dist=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering/../../../dist/target/wildfly-10.0.0.CR1-SNAPSHOT, -Djava.net.preferIPv6Addresses=true, -server, -Dts.timeout.factor=100, -Dnode0=::1, -Dnode1=::1, -Dmcast=ff13::1, -Dmcast.ttl=0, -Djbossas.ts.submodule.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering, -Djbossas.ts.integ.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering/.., -Djbossas.ts.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering/../.., -Djbossas.project.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering/../../.., -Djboss.inst=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering/target/wildfly-clustered-messaging-0, -Djboss.node.name=node-0, -Djboss.messaging.cluster.password=clusterpwd, -ea, -Djboss.home.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0, -Dorg.jboss.boot.log.file=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\log\server.log, -Dlogging.configuration=file:C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\configuration\logging.properties, -jar, C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\jboss-modules.jar, -mp, C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\modules;C:\BuildAgent\work\db872761b443af46\full\dist\target\wildfly-10.0.0.CR1-SNAPSHOT\modules;C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\modules, org.jboss.as.standalone, -Djboss.home.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0, -Djboss.server.base.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone, -Djboss.server.log.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\log, -Djboss.server.config.dir=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\configuration, -Dts.wildfly.version=10.0.0.CR1-SNAPSHOT, -c=standalone-full-ha.xml]
23:52:26,582 INFO  [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
23:52:26,866 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
23:52:26,953 INFO  [org.jboss.as] (MSC service thread 1-5) WFLYSRV0049: WildFly Full 10.0.0.CR1-SNAPSHOT (WildFly Core 2.0.0.Beta5-SNAPSHOT) starting
23:52:28,357 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 32) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
23:52:28,539 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
23:52:28,558 INFO  [org.xnio] (MSC service thread 1-7) XNIO version 3.3.1.Final
23:52:28,570 INFO  [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.3.1.Final
23:52:28,680 INFO  [org.wildfly.iiop.openjdk] (ServerService Thread Pool -- 45) WFLYIIOP0001: Activating IIOP Subsystem
23:52:28,686 INFO  [org.jboss.as.connector] (MSC service thread 1-6) WFLYJCA0009: Starting JCA Subsystem (IronJacamar 1.2.5.Final)
23:52:28,710 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 67) WFLYUT0003: Undertow 1.3.0.Beta9 starting
23:52:28,719 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 1.3.0.Beta9 starting
23:52:28,720 INFO  [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 4.0.9.Final
23:52:28,831 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 64) WFLYSEC0002: Activating Security Subsystem
23:52:28,835 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 68) WFLYWS0002: Activating WebServices Extension
23:52:28,838 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 43) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
23:52:28,842 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 44) WFLYCLINF0001: Activating Infinispan subsystem.
23:52:28,848 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 57) WFLYNAM0001: Activating Naming Subsystem
23:52:28,852 INFO  [org.jboss.as.clustering.jgroups] (ServerService Thread Pool -- 49) WFLYCLJG0001: Activating JGroups subsystem.
23:52:28,854 INFO  [org.jboss.as.security] (MSC service thread 1-3) WFLYSEC0001: Current PicketBox version=4.9.3.Final
23:52:28,857 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 66) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
23:52:28,904 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 67) WFLYUT0014: Creating file handler for path 'C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
23:52:28,925 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 39) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
23:52:28,928 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0018: Started Driver service with driver-name = h2
23:52:28,937 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0012: Started server default-server.
23:52:28,938 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0018: Host default-host starting
23:52:29,083 INFO  [org.jboss.as.naming] (MSC service thread 1-3) WFLYNAM0003: Starting Naming Service
23:52:29,083 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
23:52:29,108 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 52) WFLYJSF0007: Activated the following JSF Implementations: [main]
23:52:29,112 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow AJP listener ajp listening on /0:0:0:0:0:0:0:1:8009
23:52:29,116 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on /0:0:0:0:0:0:0:1:8080
23:52:29,286 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 71) MODCLUSTER000001: Initializing mod_cluster version 1.3.1.Final
23:52:29,346 INFO  [org.jboss.modcluster] (ServerService Thread Pool -- 71) MODCLUSTER000032: Listening to proxy advertisements on /ff13:0:0:0:0:0:0:1:23364
23:52:29,569 INFO  [org.wildfly.iiop.openjdk] (MSC service thread 1-2) WFLYIIOP0009: CORBA ORB Service started
23:52:29,624 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-2) WFLYMSGAMQ0001: AIO wasn't located on this platform, it will fall back to using pure Java NIO.
23:52:29,722 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\deployments
23:52:29,799 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
23:52:29,937 INFO  [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.1.0.Beta1
23:52:29,962 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=true,journalDirectory=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\data\activemq\journal,bindingsDirectory=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\data\activemq\bindings,largeMessagesDirectory=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\data\activemq\largemessages,pagingDirectory=C:\BuildAgent\work\db872761b443af46\full\testsuite\integration\clustering\target\wildfly-clustered-messaging-0\standalone\data\activemq\paging)
23:52:29,989 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221013: Using NIO Journal
23:52:30,132 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
23:52:30,139 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
23:52:30,152 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
23:52:30,154 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
23:52:30,383 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-2) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
23:52:30,383 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-8) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor


@wildfly-ci
Copy link

WildFly pull requests Build 1913 outcome was FAILURE using a merge of cb90138
Summary: Snapshot dependency failed: ... WildFly Core Full - Integration - Windows (new) Build time: 00:00:02

@luck3y
Copy link
Contributor Author

luck3y commented Aug 25, 2015

retest this please

@wildfly-ci
Copy link

Windows Build 2006 is now running using a merge of cb90138

@wildfly-ci
Copy link

Linux Build 2494 is now running using a merge of cb90138

@wildfly-ci
Copy link

Core - Full Integration - Windows Build 43 is now running using a merge of cb90138

@wildfly-ci
Copy link

Windows Build 2006 outcome was SUCCESS using a merge of cb90138
Summary: Tests passed: 3403, ignored: 64 Build time: 00:36:11

@wildfly-ci
Copy link

Linux Build 2494 outcome was SUCCESS using a merge of cb90138
Summary: Tests passed: 3403, ignored: 64 Build time: 00:41:13

@wildfly-ci
Copy link

Core - Full Integration - Windows Build 43 outcome was SUCCESS using a merge of cb90138
Summary: Tests passed: 3055, ignored: 358 Build time: 00:51:13

@wildfly-ci
Copy link

WildFly pull requests Build 1914 outcome was SUCCESS using a merge of cb90138
Summary: Running Build time: 00:00:01

context.completeStep(new OperationContext.ResultHandler() {
@Override
public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) {
doExecute(serverName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ignore this comment; I'll mark this "Ready for merge" regardless.

Why the move? I'm just curious.

If this step was part of a composite, this will alter when in the sequence of events the kill/destroy happens; e.g. if the next step was then some config mod that will fail because the server isn't dead yet. But that's a silly edge case, so moving it is fine.

Since this is in a ResultHandler now, the doExecute() call can be limited to the ResultAction.KEEP case. But this op executing in a composite with something else that will trigger ResultAction.ROLLBACK is also an edge case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I ended up doing it like this as the other
examples seemed similar. Would this be more correct w.r.t. the cases you
list above:

context.authorize(operation, EnumSet.of(Action.ActionEffect.WRITE_RUNTIME));

context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);

doExecute(serverName);

?

Thanks,

Ken

On Thu, Aug 27, 2015 at 8:51 AM, Brian Stansberry notifications@github.com
wrote:

In
host-controller/src/main/java/org/jboss/as/host/controller/operations/ServerProcessHandlers.java
#998 (comment):

@@ -68,11 +71,13 @@ public void execute(final OperationContext context, final ModelNode operation) t
context.addStep(new OperationStepHandler() {
@OverRide
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {

  •            // WFLY-2189 trigger a write-runtime authz check
    

- context.getServiceRegistry(true);

  •            doExecute(serverName);
    
  •            context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
    
  •            context.authorize(operation, EnumSet.of(Action.ActionEffect.WRITE_RUNTIME));
    
  •            context.completeStep(new OperationContext.ResultHandler() {
    
  •                @Override
    
  •                public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) {
    
  •                    doExecute(serverName);
    

Feel free to ignore this comment; I'll mark this "Ready for merge"
regardless.

Why the move? I'm just curious.

If this step was part of a composite, this will alter when in the sequence
of events the kill/destroy happens; e.g. if the next step was then some
config mod that will fail because the server isn't dead yet. But that's a
silly edge case, so moving it is fine.

Since this is in a ResultHandler now, the doExecute() call can be limited
to the ResultAction.KEEP case. But this op executing in a composite with
something else that will trigger ResultAction.ROLLBACK is also an edge case.


Reply to this email directly or view it on GitHub
https://github.com/wildfly/wildfly-core/pull/998/files#r38096650.

@bstansberry bstansberry added the ready-for-merge This PR is ready to be merged and fulfills all requirements label Aug 27, 2015
jamezp added a commit to jamezp/wildfly-core that referenced this pull request Aug 27, 2015
Do not require the exclusive management lock to run the "kill" or "destroy" ops on the HC
jamezp added a commit that referenced this pull request Aug 28, 2015
WFCORE-693 Do not require the exclusive management lock to run the "kill" or "de…
@jamezp jamezp merged commit b8ea238 into wildfly:master Aug 28, 2015
@luck3y luck3y deleted the WFCORE-693 branch October 28, 2015 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to be merged and fulfills all requirements
Projects
None yet
4 participants