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

profile-download causes issues when anything but version 1 is available

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.2.1
    • None
    • Fabric8 v1
    • None
    • % %

      While working with profile-download to force a refresh on a profile for a customer, we encountered the following error;

      2015-06-24 16:21:53,476 | ERROR | agent-1-thread-1 | DeploymentAgent                  | .fabric8.agent.DeploymentAgent$2  255 | 4 - org.ops4j.pax.logging.pax-logging-api - 1.7.2 | Unable to update agent
      io.fabric8.agent.utils.MultiException: Error while downloading artifacts
              at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader.await(AgentUtils.java:314)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentBuilder.download(DeploymentBuilder.java:160)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:503)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:252)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_51]
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_51]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_51]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_51]
              at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
      Caused by: java.util.zip.ZipException: zip file is empty
              at java.util.zip.ZipFile.open(Native Method)[:1.7.0_51]
              at java.util.zip.ZipFile.<init>(ZipFile.java:215)[:1.7.0_51]
              at java.util.zip.ZipFile.<init>(ZipFile.java:145)[:1.7.0_51]
              at java.util.jar.JarFile.<init>(JarFile.java:153)[:1.7.0_51]
              at java.util.jar.JarFile.<init>(JarFile.java:117)[:1.7.0_51]
              at org.fusesource.common.util.Manifests.getManifest(Manifests.java:43)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentBuilder.getAttributes(DeploymentBuilder.java:468)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentBuilder.manageResource(DeploymentBuilder.java:439)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentBuilder.access$300(DeploymentBuilder.java:88)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.DeploymentBuilder$2.downloaded(DeploymentBuilder.java:406)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader.onDownloaded(AgentUtils.java:289)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader$1.operationComplete(AgentUtils.java:255)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader$1.operationComplete(AgentUtils.java:252)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
              at io.fabric8.agent.download.DefaultFuture.notifyListener(DefaultFuture.java:342)[60:io.fabric8.fabric-agent:1.0.0.redhat-379]
      
      

      I've been able to re-create this problem with the following steps:

      1. Create a fabric
      2. Create a child container:
      fabric:container-create-child root myBroker

      3. JBossFuse:karaf@root> fabric:profile-download -f --profile example-mq
      Downloaded 60 file(s) to /Users/sjavurek/Fuse/JBossFuse/6.1/jboss-fuse-6.1.0.redhat-379/system

      4. container-add-profile myBroker example-mq

      Much to my surprise this all worked correctly until, I tried to create a new version:

      5. JBossFuse:karaf@root> version-create 2.0
      Created version: 2.0 as copy of: 1.0

      JBossFuse:karaf@root> container-upgrade 2.0 root
      Upgraded container root from version 1.0 to 2.0
      JBossFuse:karaf@root> container-list
      [id] [version] [connected] [profiles] [provision status]
      root* 2.0 true fabric, fabric-ensemble-0000-1, jboss-fuse-full error - io.fabric8.agent.utils.MultiException: Error while downloading artifacts

      I also bumped the child up and it is in the same state. Interestingly I'm unable to rollback the container:.

      container-rollback 1.0 myBroker

      Looking into my system folder, I now see a number of artifacts for each activemq component:

      bluebird:system sjavurek$ cd org/apache/activemq/activemq-osgi/5.9.0.redhat-61
      5.9.0.redhat-610379/ 5.9.0.redhat-610394/ 5.9.0.redhat-611412/ 5.9.0.redhat-611419/ 5.9.0.redhat-611423/

      Restoring the directory didn't help much. I will leave it there for now but suffice to say this command is problematic when using container versioning.

            pantinor@redhat.com Paolo Antinori
            rhn-support-sjavurek Susan Javurek
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: