glassfish
  1. glassfish
  2. GLASSFISH-15374

Cannot change CONFIG node to SSH if it has instances

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1_b36
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      build: b35 promoted

      Description

      I created a CONFIG node on a remote system, leaving all fields blank, other than node name and node host name. On the remote machine I created a cluster with 2 instances, using create-local-instance commands. I started the instances from CLI - so far so good. In Admin Console I stopped cluster (worked fine) and went on to change the CONFIG node to SSH. I got the following error:

      An error has occurred
      Cannot update node vmbconf. It is in use by a server instance and therefore attribute installdir cannot be changed.

      The user did nothing wrong, yet node cannot be converted to SSH. The reason is that when changing CONFIG node to SSH, installation directory is replaced with the default $

      {com.sun.aas.productRoot} in Admin Console, even though the field was already populated. It is populated during the remote instance creation for config nodes. Thus the field had: /export/home/j2eetest/v31/glassfish3, but it was replaced with the default ${com.sun.aas.productRoot}

      when changing to SSH. The value of this field should not be overwritten if a custom entry is already present.

        Activity

        Hide
        Anissa Lam added a comment -

        This means for the edit case, from CONFIG change to SSH node type, the following will be filled in for the Installation Directory field.
        If the installation Directory fields is empty, it will show "$

        {com.sun.aas.productRoot}" when changing the type from CONFIG to SSH.
        If the installation Directory is NOT empty to begin with, this fields will NOT change. It will always show you the value that was there before the edit.


        1) How bad is its impact? (Severity)
        Prevents a smooth transaction from converting a CONFIG node to SSH node.

        2) How often does it happen? (Frequency)
        When the CONFIG node has the Installation Directory field before the conversion.

        3) How much effort is required to fix it? (Cost)
        Min. an hour of work + testing.

        4) What is the risk of fixing it? (Risk)
        Very low. Change is local. svn diff follows.



        Index: cluster/src/main/resources/node/nodeEdit.jsf
        ===================================================================
        — cluster/src/main/resources/node/nodeEdit.jsf (revision 44118)
        +++ cluster/src/main/resources/node/nodeEdit.jsf (working copy)
        @@ -72,7 +72,11 @@
        setPageSessionAttribute(key="showInstalldirConfig" value="#{false}");
        }
        if ("#{pageSession.attrMap['type']}=CONFIG"){
        + //for CONFIG Node convert to SSH node case, if there is already installdir specified, keep the value specified instead of changing that to default.
        mapPut(map="#{pageSession.valueMap}" key="installdir", value="
        ${com.sun.aas.productRoot}

        ");
        + if("#

        {pageSession.attrMap['installDir']}"){
        + mapPut(map="#{pageSession.valueMap}" key="installdir", value="#{pageSession.attrMap['installDir']}

        ");
        + }
        mapPut(map="#

        {pageSession.valueMap}

        " key="installdirConfig", value="#

        {pageSession.attrMap['installDir']}

        ");
        setPageSessionAttribute(key="showInstalldirSSH" value="#

        {false}

        ");
        setPageSessionAttribute(key="showInstalldirConfig" value="#

        {true}

        ");

        Show
        Anissa Lam added a comment - This means for the edit case, from CONFIG change to SSH node type, the following will be filled in for the Installation Directory field. If the installation Directory fields is empty, it will show "$ {com.sun.aas.productRoot}" when changing the type from CONFIG to SSH. If the installation Directory is NOT empty to begin with, this fields will NOT change. It will always show you the value that was there before the edit. 1) How bad is its impact? (Severity) Prevents a smooth transaction from converting a CONFIG node to SSH node. 2) How often does it happen? (Frequency) When the CONFIG node has the Installation Directory field before the conversion. 3) How much effort is required to fix it? (Cost) Min. an hour of work + testing. 4) What is the risk of fixing it? (Risk) Very low. Change is local. svn diff follows. Index: cluster/src/main/resources/node/nodeEdit.jsf =================================================================== — cluster/src/main/resources/node/nodeEdit.jsf (revision 44118) +++ cluster/src/main/resources/node/nodeEdit.jsf (working copy) @@ -72,7 +72,11 @@ setPageSessionAttribute(key="showInstalldirConfig" value="#{false}"); } if ("#{pageSession.attrMap['type']}=CONFIG"){ + //for CONFIG Node convert to SSH node case, if there is already installdir specified, keep the value specified instead of changing that to default. mapPut(map="#{pageSession.valueMap}" key="installdir", value=" ${com.sun.aas.productRoot} "); + if("# {pageSession.attrMap['installDir']}"){ + mapPut(map="#{pageSession.valueMap}" key="installdir", value="#{pageSession.attrMap['installDir']} "); + } mapPut(map="# {pageSession.valueMap} " key="installdirConfig", value="# {pageSession.attrMap['installDir']} "); setPageSessionAttribute(key="showInstalldirSSH" value="# {false} "); setPageSessionAttribute(key="showInstalldirConfig" value="# {true} ");
        Hide
        Anissa Lam added a comment -

        Fix checked in on 12/29.

        Project: glassfish
        Repository: svn
        Revision: 44140
        Author: anilam
        Date: 2010-12-29 16:37:53 UTC
        Link:

        Log Message:
        ------------
        GLASSFISH-15374. Do not fill in default for installdir when converting CONFIG node to SSH node if that value is not empty.
        Approver: Anissa
        Reviewer: Siraj.

        Revisions:
        ----------
        44140

        Modified Paths:
        ---------------
        trunk/v3/admingui/cluster/src/main/resources/node/nodeEdit.jsf

        Show
        Anissa Lam added a comment - Fix checked in on 12/29. Project: glassfish Repository: svn Revision: 44140 Author: anilam Date: 2010-12-29 16:37:53 UTC Link: Log Message: ------------ GLASSFISH-15374 . Do not fill in default for installdir when converting CONFIG node to SSH node if that value is not empty. Approver: Anissa Reviewer: Siraj. Revisions: ---------- 44140 Modified Paths: --------------- trunk/v3/admingui/cluster/src/main/resources/node/nodeEdit.jsf
        Hide
        lidiam added a comment -

        Verified on promoted build b38.

        Show
        lidiam added a comment - Verified on promoted build b38.

          People

          • Assignee:
            Anissa Lam
            Reporter:
            lidiam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: