glassfish
  1. glassfish
  2. GLASSFISH-14340

With dy.conf=false, create-jdbc-connection-pool used --target

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_b32
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,340

      Description

      Build 26. Created, started two clusters (c1, c2), with two instances each of
      them.
      Then executed:
      =====================================================
      asadmin set configs.config.c1-config.dynamic-reconfiguration-enabled=false
      in1 :
      configs.config.c1-config.dynamic-reconfiguration-enabled=false

      in2 :
      configs.config.c1-config.dynamic-reconfiguration-enabled=false

      configs.config.c1-config.dynamic-reconfiguration-enabled=false
      Command set executed successfully.

      ==============================================
      Created jdbc connection pool, using --target option that has to be ignored:

      ===============================================================

      asadmin create-jdbc-connection-pool --target c1 --property
      User=derbypublic:Password=derbypublic:dataBaseName=DerbyDB:serverName=localhost:
      portNumber=1527 --restype javax.sql.DataSource --datasourceclassname
      org.apache.derby.jdbc.ClientDataSource cmpcustomer-pool3
      CLI031 Warning: Option "target" is obsolete and will be ignored.
      JDBC connection pool cmpcustomer-pool3 created successfully.
      WARNING : The command was not replicated to all cluster instances because the
      dynamic-reconfig-enabled flag is set to false for cluster c1
      Command create-jdbc-connection-pool completed with warnings.

      ====================================================

      Then tried "create-jdbc-resource --target c2", using just created connection
      pool:
      =============================================================
      asadmin create-jdbc-resource --target c2 --connectionpoolid cmpcustomer-pool3
      qq3
      org.glassfish.api.admin.CommandException: remote failure: An error occurred
      during replication
      Command create-jdbc-resource failed on server instance in1 :
      org.glassfish.api.admin.CommandException: remote failure: Attribute value (pool-
      name = cmpcustomer-pool3) is not found in list of jdbc connection pools.
      Command create-jdbc-resource failed on server instance in2 :
      org.glassfish.api.admin.CommandException: remote failure: Attribute value (pool-
      name = cmpcustomer-pool3) is not found in list of jdbc connection pools.
      Command create-jdbc-resource failed on server instance in3 :
      org.glassfish.api.admin.CommandException: remote failure: Attribute value (pool-
      name = cmpcustomer-pool3) is not found in list of jdbc connection pools.
      Command create-jdbc-resource failed on server instance in4 :
      org.glassfish.api.admin.CommandException: remote failure: Attribute value (pool-
      name = cmpcustomer-pool3) is not found in list of jdbc connection pools.
      Command create-jdbc-resource failed.
      ==================================================

      For a cluster c2 this command failed, but really jdbc-resource was created,
      but for c1 such command did not fail:
      ===================================================

      asadmin create-jdbc-resource --target c1 --connectionpoolid cmpcustomer-pool3
      qq31
      JDBC resource qq31 created successfully.
      WARNING : The command was not replicated to all cluster instances because the
      dynamic-reconfig-enabled flag is set to false for cluster c1
      Command create-jdbc-resource completed with warnings.
      ===========================================================

      When --target was not used during a conne tion pool creation, jdbc resources
      with this pool were created successfully for both clusters (see at the bottom).
      I.e. with dynamic-reconfiguration-enabled=false --target was not really ignored
      and the pool was not available for another cluster.

      ===============================================================

      asadmin create-jdbc-connection-pool --property
      User=derbypublic:Password=derbypublic:dataBaseName=DerbyDB:serverName=localhost:
      portNumber=1527 --restype javax.sql.DataSource --datasourceclassname
      org.apache.derby.jdbc.ClientDataSource cmpcustomer-pool4
      JDBC connection pool cmpcustomer-pool4 created successfully.
      in1 :
      JDBC connection pool cmpcustomer-pool4 created successfully.

      in2 :
      JDBC connection pool cmpcustomer-pool4 created successfully.

      in3 :
      JDBC connection pool cmpcustomer-pool4 created successfully.

      in4 :
      JDBC connection pool cmpcustomer-pool4 created successfully.

      Command create-jdbc-connection-pool executed successfully.
      asadmin create-jdbc-resource --target c2 --connectionpoolid cmpcustomer-pool4
      qq4
      JDBC resource qq4 created successfully.
      in1 :
      JDBC resource qq4 created successfully.

      in2 :
      JDBC resource qq4 created successfully.

      in3 :
      JDBC resource qq4 created successfully.

      in4 :
      JDBC resource qq4 created successfully.

      Command create-jdbc-resource executed successfully.

      asadmin create-jdbc-resource --target c1 --connectionpoolid cmpcustomer-pool4
      qq41
      JDBC resource qq41 created successfully.
      WARNING : The command was not replicated to all cluster instances because the
      dynamic-reconfig-enabled flag is set to false for cluster c1
      Command create-jdbc-resource completed with warnings.

      1. diff.txt
        5 kB
        Jennifer Chou

        Activity

        Hide
        Tom Mueller added a comment -

        This bug may have the same root cause as issue 14338. The problem here is that
        the command replication code is using the wrong dynamic-reconfiguration-enabled
        flag for instances. Rather than using the --target option from the command line,
        it has to use the flag from the config associated with the instance.

        Show
        Tom Mueller added a comment - This bug may have the same root cause as issue 14338. The problem here is that the command replication code is using the wrong dynamic-reconfiguration-enabled flag for instances. Rather than using the --target option from the command line, it has to use the flag from the config associated with the instance.
        Hide
        easarina added a comment -

        create-jdbc-connection-pool help has such description of --target:
        ==================================================================
        Do not specify this option. This option is retained for
        compatibility with other releases. If you specify this
        option, a syntax error does not occur. Instead, the sub-
        command runs successfully and the option is ignored.
        =====================================================================

        I.e. this option has to be ignored, if it was specified. But obviously that in
        this case, the option was not ignored, because we can see different behaviors
        with and without --target option.

        Show
        easarina added a comment - create-jdbc-connection-pool help has such description of --target: ================================================================== Do not specify this option. This option is retained for compatibility with other releases. If you specify this option, a syntax error does not occur. Instead, the sub- command runs successfully and the option is ignored. ===================================================================== I.e. this option has to be ignored, if it was specified. But obviously that in this case, the option was not ignored, because we can see different behaviors with and without --target option.
        Hide
        Jennifer Chou added a comment -

        Sending C:/fishfry/v3/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/GlassFishClusterExecutor.java
        Sending C:/fishfry/v3/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/LocalStrings.properties
        Transmitting file data ...
        Committed revision 43357.
        Revision: 43357
        Author : jc129909
        Date : Dec 2, 2010 3:00:20 PM
        GLASSFISH-14338 dy.conf=false. create-resource-ref was reported - failed, but really was created.
        GLASSFISH-14340 With dy.conf=false, create-jdbc-connection-pool used --target

        • When RuntimeType is ALL, allow other instances in the domain with dy.conf=true to be replicated to instead of not replicated at all when the target cluster has dy.conf=false
        Show
        Jennifer Chou added a comment - Sending C:/fishfry/v3/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/GlassFishClusterExecutor.java Sending C:/fishfry/v3/cluster/admin/src/main/java/com/sun/enterprise/v3/admin/cluster/LocalStrings.properties Transmitting file data ... Committed revision 43357. Revision: 43357 Author : jc129909 Date : Dec 2, 2010 3:00:20 PM GLASSFISH-14338 dy.conf=false. create-resource-ref was reported - failed, but really was created. GLASSFISH-14340 With dy.conf=false, create-jdbc-connection-pool used --target When RuntimeType is ALL, allow other instances in the domain with dy.conf=true to be replicated to instead of not replicated at all when the target cluster has dy.conf=false

          People

          • Assignee:
            Jennifer Chou
            Reporter:
            easarina
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: