Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6356

Using instance commands corrupts org.apache.karaf.shell.cfg

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.6
    • Fix Version/s: 4.3.0, 4.2.7
    • Component/s: karaf
    • Labels:
      None
    • Environment:

      Observed on windows 10, java 1.8.0_201 (64bit)

      Description

      Can be triggered by both forms of invoking instance commands. From the OS shell:

      1. Call bin/instance create <name>
      2. Call bin/instance ssh-port-change <name> <port>

      Or via the karaf shell using:

      1. instance:create <name>
      2. instance:ssh-port-change <name> <port>

       In both cases, post step 2) any variables defined within org.apache.karaf.shell.cfg (e.g. ${karaf.etc} within the hostKey definition) will be replaced with their literal value. In the case of the shell command the path ends up with no backslashes at all:

      hostKey = "D:Testapache-karaf-4.2.6etc/host.key"
      

      From the commands run from the root instance its a slight variance:

      hostKey = "D:\\Test\\apache-karaf-4.2.6\\etc/host.key"
      

      There are however other problems. The changed sshPort has a leading I prefix and is quoted:

      sshPort = I"8104"
      

      Other entries also gain quotes. This results in various exceptions visible in the log related to number format exceptions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jbonofre Jean-Baptiste Onofré
                Reporter:
                jamie.kemp Jamie Kemp
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: