Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6299

fabric:ensemble-remove not working on Windows.

XMLWordPrintable

    • % %
    • Hide

      It can be reproduced easily on Windows:

      fabric:create --clean --wait-for-provisioning --profile fabric
      
      container-create-child --profile default root child1
      wait-for-provisioning
      container-create-child --profile default root child2
      wait-for-provisioning
      container-create-child --profile default root child3
      wait-for-provisioning
      container-create-child --profile default root child4
      wait-for-provisioning
      
      ensemble-add -f child1 child2 child3 child4
      wait-for-provisioning
      ensemble-remove -f child4 child3
      wait-for-provisioning
      
      Show
      It can be reproduced easily on Windows: fabric:create --clean --wait- for -provisioning --profile fabric container-create-child --profile default root child1 wait- for -provisioning container-create-child --profile default root child2 wait- for -provisioning container-create-child --profile default root child3 wait- for -provisioning container-create-child --profile default root child4 wait- for -provisioning ensemble-add -f child1 child2 child3 child4 wait- for -provisioning ensemble-remove -f child4 child3 wait- for -provisioning

      Running fabric:ensemble-remove on Windows fails with

      Error executing command: String index out of range: -1
      

      on the console and with this error in the logs

      2016-11-18 18:04:20,105 | ERROR | l Console Thread | Console                          | 38 - org.apache.karaf.shell.console - 2.4.0.redhat-621159 | Exception caught while executing command
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(String.java:1967)[:1.8.0_60]
      	at io.fabric8.commands.EnsembleRemoveAction.applyEnsembleConfiguration(EnsembleRemoveAction.java:121)
      	at io.fabric8.commands.EnsembleRemoveAction.doExecute(EnsembleRemoveAction.java:87)
      	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
      	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_60]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_60]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_60]
      	at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_60]
      	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)[19:org.apache.aries.proxy.impl:1.0.5]
      	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)[19:org.apache.aries.proxy.impl:1.0.5]
      	at io.fabric8.commands.$EnsembleRemove2055793643.execute(Unknown Source)[mvn:org.apache.aries.proxy/org.apache.aries.proxy.impl/1.0.5:]
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.karaf.shell.console.jline.Console.run(Console.java:197)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      	at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[38:org.apache.karaf.shell.console:2.4.0.redhat-621159]
      

              kearls@redhat.com Kevin Earls (Inactive)
              rhn-support-tmielke Torsten Mielke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: