Karaf
  1. Karaf
  2. KARAF-624

admin:stop command behavior not correct

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: karaf-instance, karaf-shell
    • Labels:
      None

      Description

      When using admin commands, like this:

      admin:create test
      admin:start test
      admin:list (to see if the test instance is started)

      After admin:stop test disconnect the shell from the root instance. It should stay on the root instance shell and only the stop the test instance.

        Activity

        Hide
        Christian Schneider added a comment -

        I debugged the code.
        In admin core InstanceImpl is used to shut down the test instance. There it reads the port file from the properties and sends the shutdown command.
        The problem is that the karaf.shutdown.port.file property points to the port file of the main instance of karaf. So karaf shuts down itself. It seems that while loading a property file parameters are already replaced.
        Perhaps based in System properties?

        Show
        Christian Schneider added a comment - I debugged the code. In admin core InstanceImpl is used to shut down the test instance. There it reads the port file from the properties and sends the shutdown command. The problem is that the karaf.shutdown.port.file property points to the port file of the main instance of karaf. So karaf shuts down itself. It seems that while loading a property file parameters are already replaced. Perhaps based in System properties?
        Hide
        Guillaume Nodet added a comment -

        Can you check with 2.2.x ? I'm quite sure it works, so that must be a regression.

        Show
        Guillaume Nodet added a comment - Can you check with 2.2.x ? I'm quite sure it works, so that must be a regression.
        Hide
        Christian Schneider added a comment -

        I just tested with trunk:

        instance:create test
        instance:start test
        karaf@root> instance:list
        SSH Port RMI Ports State Pid Name
        [ 8102] [1100/44445 ] [Starting] [ 5516] test
        [ 8101] [1099/44444 ] [Started ] [11688] root

        This does not seem to change even after several minutes. instance:connect test does not work

        Show
        Christian Schneider added a comment - I just tested with trunk: instance:create test instance:start test karaf@root> instance:list SSH Port RMI Ports State Pid Name [ 8102] [1100/44445 ] [Starting] [ 5516] test [ 8101] [1099/44444 ] [Started ] [11688] root This does not seem to change even after several minutes. instance:connect test does not work
        Hide
        Christian Schneider added a comment -

        instance:stop correctly stops the child instance and does not leave the root shell

        Show
        Christian Schneider added a comment - instance:stop correctly stops the child instance and does not leave the root shell

          People

          • Assignee:
            Christian Schneider
            Reporter:
            Jean-Baptiste Onofré
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development