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

It's possible to rollback a container to a non-existant profile version

XMLWordPrintable

    • % %

      I can across this working on ENTESB-5958 which describes a similar issue, but from Hawtio. If you do the following:

      version-create 2.0
      profile-create --version 2.0 v2Only
      container-create-child --profile v2Only --version 2.0 root v2Container
      container-rollback 1.0 v2Container

      The rollback is permitted even though there is no version 1.0 for the v2Only profile. I don't know all of the consequences here, but at least some state is broken, as shown by the profile-list command

      JBossFuse:karaf@root> profile-list
      Error executing command: Profile 'v2Only' does not exist in version: 1.0
      JBossFuse:karaf@root> log:display-exception
      java.lang.IllegalStateException: Profile 'v2Only' does not exist in version: 1.0
      at io.fabric8.api.gravia.IllegalStateAssertion.assertNotNull(IllegalStateAssertion.java:46)
      at io.fabric8.internal.VersionImpl.getRequiredProfile(VersionImpl.java:88)
      at io.fabric8.internal.ContainerImpl.getProfiles(ContainerImpl.java:239)
      at io.fabric8.service.FabricServiceImpl.getAssociatedContainers(FabricServiceImpl.java:307)
      at io.fabric8.commands.ProfileListAction.printProfiles(ProfileListAction.java:70)
      at io.fabric8.commands.ProfileListAction.doExecute(ProfileListAction.java:58)
      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_91]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_91]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_91]
      at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_91]
      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.$ProfileList636627673.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-630165]
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.karaf.shell.console.jline.Console.run(Console.java:197)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]
      at org.apache.karaf.shell.console.jline.DelayedStarted.run(DelayedStarted.java:79)[38:org.apache.karaf.shell.console:2.4.0.redhat-630165]

              Unassigned Unassigned
              kearls@redhat.com Kevin Earls (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: