admin@glassfish.java.net

Re: create-local-instance fails in deployment devtests; admin hudson jobs are failing

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Fri, 23 Jul 2010 14:57:15 -0700
I've checked-in a fix.  There are 19 test failures now.  16 are LOAD BALANCER and 3 are Dynamic Reconfig

[java] - end-to-end-CLUSTER-getapp1-dynrecfg-disabled-bef------------: FAIL -
[java] - end-to-end-CLUSTER-getapp2-dynrecfg-disabled-bef------------: FAIL -
[java] - end-to-end-stop-local-instance10----------------------------: PASS -
[java] - end-to-end-start-local-instance11---------------------------: PASS -
[java] - end-to-end-CLUSTER-getapp1-dynrecfg-disabled-aft------------: PASS -
[java] - end-to-end-CLUSTER-getapp2-dynrecfg-disabled-bef0-----------: FAIL -
[java] - end-to-end-stop-local-instance20----------------------------: PASS -
[java] - end-to-end-start-local-instance21---------------------------: PASS -
[java] - end-to-end-CLUSTER-getapp1-dynrecfg-disabled-aft0-----------: PASS -


- LB_commands-start-def-domain0-------------------------------: PASS -
- Test-create-http-lb-config----------------------------------: PASS -
- Test-list-http-lb-configs-----------------------------------: PASS -
- Test-create-http-lb-cluster-ref-----------------------------: FAIL -
- Test-delete-http-lb-cluster-ref-----------------------------: FAIL -
- Test-create-http-lb-server-ref-1----------------------------: FAIL -
- Test-create-http-lb-server-ref-2----------------------------: FAIL -
- Test-enable-http-lb-server----------------------------------: PASS -
- Test-disable-http-lb-server---------------------------------: FAIL -
- Test-enable-http-lb-server-1--------------------------------: FAIL -
- Test-delete-http-health-checker-----------------------------: FAIL -
- Test-create-http-health-checker-----------------------------: FAIL -
- Test-delete-http-lb-server-ref-1----------------------------: FAIL -
- Test-delete-http-lb-server-ref-2----------------------------: FAIL -
- Test-configure-lb-weight------------------------------------: FAIL -
- Test-configure-lb-weight-1----------------------------------: PASS -
- Test-configure-lb-weight-2----------------------------------: PASS -
- Test-enable-http-lb-application-----------------------------: PASS -
- Test-disable-http-lb-application----------------------------: FAIL -
- Test-enable-http-lb-application-1---------------------------: FAIL -
- Test-delete-http-lb-config----------------------------------: PASS -
- Test-create-http-lb-----------------------------------------: FAIL -
- Test-list-http-lbs------------------------------------------: FAIL -
- Tests-delete-http-lb----------------------------------------: FAIL -
- LB_commands-stop-def-domain1--------------------------------: PASS -
-----------------------------------------
- Total PASS        : 9                 -
- Total FAIL        : 16                -
- Total DID NOT RUN : 0                 -
-----------------------------------------



Are they "supposed" to be failing?

On 7/23/2010 12:34 PM, Tim Quinn wrote:
I see there is frequent mail traffic on this, which is reassuring!

Is there an ETA for the fix?  I have some unrelated changes but I need to run deployment cluster devtests before checking in my changes, and those tests don't work due (I think) to this problem.

Just trying to plan my work...

Thanks.

- Tim

On Jul 23, 2010, at 1:55 PM, Jennifer Chou wrote:

You mean the patch below?  I ran the ports, instance, and cluster devtests.

On 7/23/2010 7:45 PM, Byron Nevins wrote:
Can you try it on devtests and see if it works?


On 7/23/2010 11:42 AM, Jennifer Chou wrote:
ok sounds good.  not checking anything in.

On 7/23/2010 7:32 PM, Byron Nevins wrote:
I recommend NOT doing this.  We should have this ugly code in one and only one place.  ServerHelper has those lines now.  It just needs to be refactored into another method in ServerHelper where you call it with a Nodes or Node object...


On 7/23/2010 10:44 AM, Jennifer Chou wrote:
Here's the patch I was going to checkin.  just running ql on it right now.  Let me know if you want me to go ahead with checking in.
I was thinking that since server being created as passed to PortManager.  Then port manager calls the getHost duck typed method on Server which I think may not have that info yet?
So I removed call to duck typed method server.getHost in PortManager.

Index: src/main/java/com/sun/enterprise/config/util/PortManager.java
===================================================================
--- src/main/java/com/sun/enterprise/config/util/PortManager.java       (revisio
n 39006)
+++ src/main/java/com/sun/enterprise/config/util/PortManager.java       (working
 copy)
@@ -38,6 +38,7 @@
 import com.sun.enterprise.config.serverbeans.Cluster;
 import com.sun.enterprise.config.serverbeans.Config;
 import com.sun.enterprise.config.serverbeans.Domain;
+import com.sun.enterprise.config.serverbeans.Node;
 import com.sun.enterprise.config.serverbeans.Server;
 import com.sun.enterprise.config.serverbeans.SystemProperty;
 import com.sun.enterprise.util.ObjectAnalyzer;
@@ -63,12 +64,26 @@
             newServer = theNewServer;
             domain = theDomain;
             serverName = newServer.getName();
-            host = newServer.getHost();
+            String nodeName = newServer.getNode();
+            if (!StringUtils.ok(nodeName))
+                throw new TransactionFailure(Strings.get("PortManager.noNodeSpecified", serverName));
+
+            Node node = domain.getNodeNamed(nodeName);
+            if (node == null)
+                throw new TransactionFailure(Strings.get("PortManager.noNode",nodeName));
+
+            host = node.getNodeHost();
+            // XXX Hack to get around the fact that the default localhost
+            // node entry is malformed
+            if (host == null && nodeName.equals("localhost")) {
+                host = "localhost";
+            }
+
             allPorts = new ArrayList<Integer>();
             newServerPorts = new ServerPorts(cluster, config, domain, newServer);

             if (!StringUtils.ok(host))
-                throw new TransactionFailure(Strings.get("PortManager.noHost",serverName));
+                throw new TransactionFailure(Strings.get("PortManager.noHost",nodeName));

             isLocal = NetUtils.IsThisHostLocal(host);

@@ -249,7 +264,7 @@
     private final Server newServer;
     private final boolean isLocal;
     private final Domain domain;
-    private final String host;
+    private String host = null;
     private final List<Integer> allPorts;
     private final List<Server> allServers;
     private final List<ServerPorts> serversOnHost;

Index: src/main/java/com/sun/enterprise/config/util/LocalStrings.properties
===================================================================
--- src/main/java/com/sun/enterprise/config/util/LocalStrings.properties
(revision 39006)
+++ src/main/java/com/sun/enterprise/config/util/LocalStrings.properties
(working copy)
@@ -3,7 +3,9 @@
 PortUtils.duplicate_port=Found two system-property elements with the same port
number ({0}) for {1}.
 PortUtils.non_int_port=Found a system-property with a non-integer port number (
{0}) for {1}.
 PortUtils.illegal_port_number=The supplied port number, {0}, for the server, {1
}, is illegal. Legal values are 0 to {2} inclusive.
-PortManager.noHost=There is no node-agent-ref specified for the instance {0}.
+PortManager.noNodeSpecified=There is no node specified for the instance {0}.
+PortManager.noNode=Node {0} does not exist.
+PortManager.noHost=Node host is not specified on node {0}.
 PortManager.noFreePort=Can''t locate a free port.  None of the ports between {0
} and {1} are available.

On 7/23/2010 6:35 PM, Byron Nevins wrote:
I just changed things last night -- I'll take a look.

Jennifer  -- Server.getHostName() on DAS returns null!!!  I'll fix it...
 
On 7/23/2010 9:49 AM, Jennifer Chou wrote:
working on fix right now.

On 7/23/2010 5:39 PM, Tom Mueller wrote:
Yes.
Tom

On 7/23/2010 11:37 AM, Tim Quinn wrote:
Hi.

The Hudson admin job is red with (among other things) this error when trying to create an instance:

 [java] remote failure: Exception while adding the new configuration org.jvnet.hk2.config.TransactionFailure: There is no node-agent-ref specified for the instance in_892228. : org.jvnet.hk2.config.TransactionFailure: There is no node-agent-ref specified for the instance in_892228.
  
  
We are seeing the same error in the deployment devtests in trying to create an instance.
Is someone looking into this?
- Tim




-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188
  
--------------------------------------------------------------------- To unsubscribe, e-mail: admin-unsubscribe@glassfish.dev.java.net For additional commands, e-mail: admin-help@glassfish.dev.java.net


-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188
  
--------------------------------------------------------------------- To unsubscribe, e-mail: admin-unsubscribe@glassfish.dev.java.net For additional commands, e-mail: admin-help@glassfish.dev.java.net




Oracle
Tim Quinn | Principal Member of Technical Staff | +1.847.604.9475
Oracle GlassFish Engineering
Lake Forest, IL


-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188