glassfish
  1. glassfish
  2. GLASSFISH-12736

support creation of local instance from DAS data - rendezvous flag handling

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1_ms04
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,736

      Description

      This issue is for implementing support for establishing an instance on a node
      using create-local-instance when the data for the instance already exists in the
      DAS. This will be used during the upgrade of a cluster from v2 to 3.1.

      See issue 12724 for details.

        Issue Links

          Activity

          Hide
          Jennifer Chou added a comment -

          Current behavior for create-local-instance instance1:

          if instance1 is already registered to DAS and already has rendezvousOccurred
          property = true
          --> fail

          if (instance1 is already registered on DAS)
          if rendezvousOccurred = false OR rendezvousOccurred is missing
          Add/Set rendezvousOccurred = true
          Continue to create the local file system.

          else (instance1 is NOT registered on DAS)
          Register instance1 to DAS with property rendezvousOccurred = true
          Continue to create the local file system

          For upgrade:
          If data for the instance already exists in the DAS and there is no
          rendezvousOccurred property, rendezvousOccurred will get created and set to true.

          More required?

          Somebody should also probably review the code.

          Show
          Jennifer Chou added a comment - Current behavior for create-local-instance instance1: if instance1 is already registered to DAS and already has rendezvousOccurred property = true --> fail if (instance1 is already registered on DAS) if rendezvousOccurred = false OR rendezvousOccurred is missing Add/Set rendezvousOccurred = true Continue to create the local file system. else (instance1 is NOT registered on DAS) Register instance1 to DAS with property rendezvousOccurred = true Continue to create the local file system For upgrade: If data for the instance already exists in the DAS and there is no rendezvousOccurred property, rendezvousOccurred will get created and set to true. More required? Somebody should also probably review the code.
          Hide
          Nazrul added a comment -

          Current create-local-instance logic looks fine to me.

          During v2.x to 3.1 upgrade, we need to do one of the following:
          1) set the rendezvousOccurred to false OR
          2) Assume that rendezvousOccurred is false in create-local-instance command when
          the property is not present

          Goal: User will be able to use create-local-instance to re-create the instances
          in the remote node host. Note that all the server instance definitions will be
          present in the domain.xml after GFv2.x to 3.1 upgrade.

          Show
          Nazrul added a comment - Current create-local-instance logic looks fine to me. During v2.x to 3.1 upgrade, we need to do one of the following: 1) set the rendezvousOccurred to false OR 2) Assume that rendezvousOccurred is false in create-local-instance command when the property is not present Goal: User will be able to use create-local-instance to re-create the instances in the remote node host. Note that all the server instance definitions will be present in the domain.xml after GFv2.x to 3.1 upgrade.
          Hide
          Jennifer Chou added a comment -

          create-local-instance supports #2 right now.
          Assume that rendezvousOccurred is false in create-local-instance command when
          the property is not present

          Added the following tests for rendezvousOccurred property and the upgrade case:

          private void testRendezvous()

          { String instance = "rendezvousinstance"; report("create-local-instance-rendezvous", asadmin("create-local-instance", instance)); AsadminReturn ret = asadminWithOutput("get", "servers.server."+instance+".property.rendezvousOccurred"); boolean success = ret.outAndErr.indexOf("servers.server."+instance+".property.rendezvousOccurred=true") >= 0; report("rendezvous-true-rendezvous", success); report("create-local-instance-rendezvousAlready", !asadmin("create-local-instance", instance)); report("set-rendezvousOccurred-false", asadmin("set", "servers.server."+instance+".property.rendezvousOccurred=false")); report("create-local-instance-rendezvousAgain", asadmin("create-local-instance", instance)); report("delete-local-instance-rendezvous", asadmin("delete-local-instance", instance)); }

          private void testUpgrade()

          { //Issue 12736 support creation of local instance from DAS data - rendezvous flag handling String instance = "upgradeinstance"; cleanup(); //remove locahost dir so we can see it gets created here. report("register-instance-upgrade", asadmin("_register-instance", "--node", "localhost", instance)); report("upgradeinstance-registered", asadminWithOutput("get", "servers.server."+instance)); report("create-local-instance-upgrade", asadmin("create-local-instance", instance)); report("das-properties-exists-upgrade", checkDasProperties()); AsadminReturn ret = asadminWithOutput("get", "servers.server."+instance+".property.rendezvousOccurred"); boolean success = ret.outAndErr.indexOf("servers.server."+instance+".property.rendezvousOccurred=true") >= 0; report("rendezvous-true-upgrade", success); report("delete-local-instance-upgrade", asadmin("delete-local-instance", instance)); }
          Show
          Jennifer Chou added a comment - create-local-instance supports #2 right now. Assume that rendezvousOccurred is false in create-local-instance command when the property is not present Added the following tests for rendezvousOccurred property and the upgrade case: private void testRendezvous() { String instance = "rendezvousinstance"; report("create-local-instance-rendezvous", asadmin("create-local-instance", instance)); AsadminReturn ret = asadminWithOutput("get", "servers.server."+instance+".property.rendezvousOccurred"); boolean success = ret.outAndErr.indexOf("servers.server."+instance+".property.rendezvousOccurred=true") >= 0; report("rendezvous-true-rendezvous", success); report("create-local-instance-rendezvousAlready", !asadmin("create-local-instance", instance)); report("set-rendezvousOccurred-false", asadmin("set", "servers.server."+instance+".property.rendezvousOccurred=false")); report("create-local-instance-rendezvousAgain", asadmin("create-local-instance", instance)); report("delete-local-instance-rendezvous", asadmin("delete-local-instance", instance)); } private void testUpgrade() { //Issue 12736 support creation of local instance from DAS data - rendezvous flag handling String instance = "upgradeinstance"; cleanup(); //remove locahost dir so we can see it gets created here. report("register-instance-upgrade", asadmin("_register-instance", "--node", "localhost", instance)); report("upgradeinstance-registered", asadminWithOutput("get", "servers.server."+instance)); report("create-local-instance-upgrade", asadmin("create-local-instance", instance)); report("das-properties-exists-upgrade", checkDasProperties()); AsadminReturn ret = asadminWithOutput("get", "servers.server."+instance+".property.rendezvousOccurred"); boolean success = ret.outAndErr.indexOf("servers.server."+instance+".property.rendezvousOccurred=true") >= 0; report("rendezvous-true-upgrade", success); report("delete-local-instance-upgrade", asadmin("delete-local-instance", instance)); }

            People

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

              Dates

              • Created:
                Updated:
                Resolved: