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

WFLY-4916: Adds Red Hat Access Submodule for sending JDRs to Red Hat Access Insights #8246

Closed
wants to merge 6 commits into from

Conversation

Kinlaw
Copy link
Contributor

@Kinlaw Kinlaw commented Oct 6, 2015

Creates submodule which sends the JDR on a daily basis. This schedule interval can be modified to send once a day, once every two days and so on. The submodule is not enabled by default, it must be added to the standalone.xml and then be called from the CLI with the following command:

./subsystem:insights:enable(rhn-uid=[redhat-uid],rhn-pw=[redhat-pw])

Once called, an initial JDR will be sent and then one will be sent daily.

<module name="org.jboss.as.controller"/>
<module name="org.jboss.as.server"/>
<module name="org.jboss.modules"/>
<module name="org.jboss.msc"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

looking at deps of this jar https://github.com/redhataccess/redhat-support-lib-java/blob/master/pom.xml
it looks like you dont need

        <module name="org.jboss.staxmapper"/>
        <module name="org.jboss.as.controller"/>
        <module name="org.jboss.as.server"/>
        <module name="org.jboss.modules"/>
        <module name="org.jboss.msc"/>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed these unused dependencies.

@ctomc
Copy link
Contributor

ctomc commented Oct 7, 2015

Also .class files do not belong to git. only sources.

@Kinlaw
Copy link
Contributor Author

Kinlaw commented Oct 8, 2015

Fixed all noted issues. Please retest.

@wildfly-ci
Copy link

Linux Build 8427 outcome was FAILURE using a merge of 5e11a62
Summary: Tests failed: 1 (1 new), passed: 3170, ignored: 373 Build time: 01:16:58

Failed tests

org.jboss.as.test.integration.messaging.mgmt.JMSQueueManagementTestCase.testMessageRemoval: java.lang.AssertionError: expected:<2> but was:<0>
    at org.jboss.as.test.integration.messaging.mgmt.JMSQueueManagementTestCase.testMessageRemoval(JMSQueueManagementTestCase.java:226)
------- Stdout: -------
 [0m03:17:24,314 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 8) AMQ221003: trying to deploy queue jms.queue.JMSQueueManagementTestCase1444267043440
 [0m03:17:24,336 INFO  [org.jboss.as.test.integration.common.jms.JMSOperationsProvider] (main) Operation successful for update = {
    "operation" => "add",
    "address" => [
        ("subsystem" => "messaging-activemq"),
        ("server" => "default"),
        ("jms-queue" => "JMSQueueManagementTestCase1444267043440")
    ],
    "entries" => ["java:jboss/exported/queue/JMSQueueManagementTestCase1444267043440"]
}
 [0m03:17:24,342 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 8) AMQ221003: trying to deploy queue jms.queue.JMSQueueManagementTestCaseother1444267043440
 [0m03:17:24,359 INFO  [org.jboss.as.test.integration.common.jms.JMSOperationsProvider] (main) Operation successful for update = {
    "operation" => "add",
    "address" => [
        ("subsystem" => "messaging-activemq"),
        ("server" => "default"),
        ("jms-queue" => "JMSQueueManagementTestCaseother1444267043440")
    ],
    "entries" => ["java:jboss/exported/queue/JMSQueueManagementTestCaseother1444267043440"]
}
03:17:24,429 INFO  [org.jboss.as.test.integration.common.jms.JMSOperationsProvider] (main) Operation successful for update = {
    "operation" => "remove",
    "address" => [
        ("subsystem" => "messaging-activemq"),
        ("server" => "default"),
        ("jms-queue" => "JMSQueueManagementTestCase1444267043440")
    ]
}
03:17:24,435 INFO  [org.jboss.as.test.integration.common.jms.JMSOperationsProvider] (main) Operation successful for update = {
    "operation" => "remove",
    "address" => [
        ("subsystem" => "messaging-activemq"),
        ("server" => "default"),
        ("jms-queue" => "JMSQueueManagementTestCaseother1444267043440")
    ]
}


<module name="javax.api"/>
<module name="javax.ws.rs.api" services="import"/>
<!-- <module name="javax.net.ssl" slot='main'/> -->
<module name="org.apache.commons.net" slot='main'/>
Copy link
Contributor

Choose a reason for hiding this comment

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

I mean that instead of dependancy here, you could just have

<artifact name="${commons-net:commons-net}"/>

as resource.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you're saying. I tried adding this to the module.xml of redhat-support-lib-java but I couldn't get it to build for some reason. I kept getting the following:

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BanTransitiveDependencies failed with message:
org.wildfly:wildfly-feature-pack:pom:10.0.0.CR3-SNAPSHOT
com.redhat.gss:redhat-support-lib-java:jar:2.0.11:compile has transitive dependencies:
commons-net:commons-net:jar:3.2:compile

Copy link
Contributor

Choose a reason for hiding this comment

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

that is fine, enforcement works as it should :)
you need to add <exclude> for all transitive dependencies of the module

@wildfly-ci
Copy link

Windows Build 3489 outcome was FAILURE using a merge of beed4ba
Summary: Tests failed: 1 (1 new), passed: 3205, ignored: 370 Build time: 00:57:09

Failed tests

org.jboss.as.test.clustering.cluster.singleton.SingletonServiceTestCase(SYNC-tcp).testSingletonService: org.apache.http.conn.HttpHostConnectException: Connect to [::1]:8080 [/0:0:0:0:0:0:0:1] failed: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at org.jboss.as.test.clustering.cluster.singleton.SingletonServiceTestCase.testSingletonService(SingletonServiceTestCase.java:219)
------- Stdout: -------
18:22:46,365 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Starting deployment=NONE, container=container-0
18:22:46,367 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Starting deployment=NONE, container=container-1
18:22:46,368 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Deploying deployment=deployment-0
18:22:46,379 INFO  [org.jboss.as.repository] (management-handler-thread - 2) WFLYDR0001: Content added at location C:\BuildAgent\work\a31d203e70e89f90\testsuite\integration\clustering\target\wildfly-SYNC-tcp-0\standalone\data\content\fa\af4c0d7dc983590cd9a40004cba30ee909d828\content
18:22:46,381 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0027: Starting deployment of "singleton.war" (runtime-name: "singleton.war")
18:22:46,420 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-8) WFLYSRV0018: Deployment "deployment.singleton.war" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice.
18:22:46,478 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 80) WFLYUT0021: Registered web context: /singleton
18:22:46,583 WARN  [org.jgroups.protocols.MPING] (MPING) d8cc9c29-501f-1696-dd36-9c9b6e950661: discarding discovery request for cluster 'ee' from d8cc9c29-501f-1696-dd36-9c9b6e950661; our cluster name is 'activemq-cluster'. Please separate your clusters properly
18:22:46,583 WARN  [org.jgroups.protocols.MPING] (MPING) node-0: discarding discovery request for cluster 'ee' from node-0; our cluster name is 'activemq-cluster'. Please separate your clusters properly
18:22:47,522 WARN  [org.jgroups.protocols.MPING] (MPING) node-0: discarding discovery request for cluster 'activemq-cluster' from node-0; our cluster name is 'ee'. Please separate your clusters properly
18:22:49,623 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 80) ISPN000078: Starting JGroups channel server
18:22:49,624 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 80) ISPN000094: Received new cluster view for channel server: [node-0|0] (1) [node-0]
18:22:49,624 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 80) ISPN000079: Channel server local address is node-0, physical addresses are [0:0:0:0:0:0:0:1:7601]
18:22:49,631 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 80) WFLYCLINF0002: Started default cache from server container
18:22:49,634 INFO  [org.wildfly.clustering.server] (notification-thread--p105-t1) WFLYCLSV0003: node-0 elected as the singleton provider of the jboss.test.myservice.default service
18:22:49,636 INFO  [org.wildfly.clustering.server] (notification-thread--p105-t1) WFLYCLSV0001: This node will now operate as the singleton provider of the jboss.test.myservice.default service
18:22:49,637 ERROR [org.wildfly.clustering.server] (notification-thread--p105-t1) WFLYCLSV0006: Failed to reach quorum of 2 for jboss.test.myservice.quorum service. No singleton master will be elected.
18:22:49,645 INFO  [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "singleton.war" (runtime-name : "singleton.war")
18:22:49,649 INFO  [org.jboss.as.test.clustering.NodeUtil] (main) Deploying deployment=deployment-1
18:22:49,659 INFO  [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0001: Content added at location C:\BuildAgent\work\a31d203e70e89f90\testsuite\integration\clustering\target\wildfly-SYNC-tcp-1\standalone\data\content\53\83f154353838309f5c9ef2db6e57b2356ef190\content
18:22:49,661 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "singleton.war" (runtime-name: "singleton.war")
18:22:49,688 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-3) WFLYSRV0018: Deployment "deployment.singleton.war" is using a private module ("org.jboss.as.server:main") which may be changed or removed in future versions without notice.
18:22:49,725 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 76) WFLYUT0021: Registered web context: /singleton
18:22:49,839 WARN  [org.jgroups.protocols.MPING] (MPING) node-1: discarding discovery request for cluster 'ee' from node-1; our cluster name is 'activemq-cluster'. Please separate your clusters properly
18:22:49,839 WARN  [org.jgroups.protocols.MPING] (MPING) node-1: discarding discovery request for cluster 'ee' from node-1; our cluster name is 'activemq-cluster'. Please separate your clusters properly
18:22:49,896 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-2,ee,node-0) ISPN000094: Received new cluster view for channel server: [node-0|1] (2) [node-0, node-1]
18:22:49,935 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 76) ISPN000078: Starting JGroups channel server
18:22:49,936 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 76) ISPN000094: Received new cluster view for channel server: [node-0|1] (2) [node-0, node-1]
18:22:49,937 INFO  [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (ServerService Thread Pool -- 76) ISPN000079: Channel server local address is node-1, physical addresses are [0:0:0:0:0:0:0:1:7701]



@Override
protected boolean requiresRuntime(OperationContext context) {
return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not override the superclass. The superclass will ensure this only adds the service on server processes, not on the Host Controllers. JDR itself is only added on servers, so there is no benefit adding this service on the Host Controller. And, if we did want this for the Host Controller process, there is additional work needed. If you leave this always returning true, on a Host Controller if there are 2 profiles that include this subsystem, they will both try to add the service and that will fail due to a duplicate service.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed override for requiresRuntime(...).

…quiresRuntime(...) override in InsightsSubsystemAdd; removed extraneous calls to start inside of InsightsService
@wildfly-ci
Copy link

Linux Build 8537 outcome was FAILURE using a merge of 3ce9687
Summary: Exit code 1 (new) Build time: 00:00:21

@wildfly-ci
Copy link

Linux with security manager Build 3365 outcome was FAILURE using a merge of 3ce9687
Summary: Exit code 1 (new) Build time: 00:00:22

@wildfly-ci
Copy link

Windows Build 3569 outcome was FAILURE using a merge of 3ce9687
Summary: Exit code 1 (new) Build time: 00:00:25

<parent>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-parent</artifactId>
<version>10.0.0.CR3-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

10.0.0.CR3 has been released so this needs to be changed to 10.0.0.CR4-SNAPSHOT. I presume this is why this PR does not build.

@n1hility n1hility added the hold PR should not be merged for some reason. label Oct 23, 2015
@bstansberry
Copy link
Contributor

Closing as we are not planning to move forward with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold PR should not be merged for some reason.
Projects
None yet
5 participants