Uploaded image for project: 'Fabric8'
  1. Fabric8
  2. FABRIC-1186

incorrect property resolver causes Fabric completely unusable

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.3.0.redhat-61
    • Fix Version/s: 1.2.0 Final
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      1. install Jboss fuse 6.1
      2. run the container
      3. log in to it and create a fabric with fabric:create
      4. log in to hawtio localhost:8181
      5. go in to wiki tab
      6. modify an existing profile like example/camel/cxf by adding ruda.out.destination.temporaryName=${file:onlyname}.tmp in io.fabric8.examples.camel.cxf.properties
      7. go back to runtime tab and create another container let's call it test-container
      8. assign the modified cxf camel example profile to test-container
      9. nothing happen apart from this entry in the log of the test-container:

        Stack Trace:
        io.fabric8.api.FabricException: Missing Placeholder Resolvers: file
        at io.fabric8.service.FabricServiceImpl.substituteConfigurations(FabricServiceImpl.java:1025)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at io.fabric8.internal.ProfileOverlayImpl.getConfigurations(ProfileOverlayImpl.java:358)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at io.fabric8.internal.ProfileOverlayImpl.getContainerConfiguration(ProfileOverlayImpl.java:121)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at io.fabric8.internal.ProfileImpl.getContainerConfigList(ProfileImpl.java:149)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at io.fabric8.internal.ProfileOverlayImpl.getRepositories(ProfileOverlayImpl.java:106)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at io.fabric8.features.FabricFeaturesServiceImpl.listInstalledRepositories(FabricFeaturesServiceImpl.java:327)[io.fabric8:fabric-features-service:1.0.0.redhat-379]
        at io.fabric8.features.FabricFeaturesServiceImpl.run(FabricFeaturesServiceImpl.java:93)[io.fabric8:fabric-features-service:1.0.0.redhat-379]
        at io.fabric8.service.AbstractDataStore.doRunCallbacks(AbstractDataStore.java:222)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at io.fabric8.service.AbstractDataStore$1.run(AbstractDataStore.java:210)[io.fabric8:fabric-core:1.0.0.redhat-379]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_65]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_65]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_65]
        

      10. also if you try to click on the container name hwatio will hang.
      Show
      install Jboss fuse 6.1 run the container log in to it and create a fabric with fabric:create log in to hawtio localhost:8181 go in to wiki tab modify an existing profile like example/camel/cxf by adding ruda.out.destination.temporaryName=${ file:onlyname }.tmp in io.fabric8.examples.camel.cxf.properties go back to runtime tab and create another container let's call it test-container assign the modified cxf camel example profile to test-container nothing happen apart from this entry in the log of the test-container: Stack Trace: io.fabric8.api.FabricException: Missing Placeholder Resolvers: file at io.fabric8.service.FabricServiceImpl.substituteConfigurations(FabricServiceImpl.java:1025)[io.fabric8:fabric-core:1.0.0.redhat-379] at io.fabric8.internal.ProfileOverlayImpl.getConfigurations(ProfileOverlayImpl.java:358)[io.fabric8:fabric-core:1.0.0.redhat-379] at io.fabric8.internal.ProfileOverlayImpl.getContainerConfiguration(ProfileOverlayImpl.java:121)[io.fabric8:fabric-core:1.0.0.redhat-379] at io.fabric8.internal.ProfileImpl.getContainerConfigList(ProfileImpl.java:149)[io.fabric8:fabric-core:1.0.0.redhat-379] at io.fabric8.internal.ProfileOverlayImpl.getRepositories(ProfileOverlayImpl.java:106)[io.fabric8:fabric-core:1.0.0.redhat-379] at io.fabric8.features.FabricFeaturesServiceImpl.listInstalledRepositories(FabricFeaturesServiceImpl.java:327)[io.fabric8:fabric-features-service:1.0.0.redhat-379] at io.fabric8.features.FabricFeaturesServiceImpl.run(FabricFeaturesServiceImpl.java:93)[io.fabric8:fabric-features-service:1.0.0.redhat-379] at io.fabric8.service.AbstractDataStore.doRunCallbacks(AbstractDataStore.java:222)[io.fabric8:fabric-core:1.0.0.redhat-379] at io.fabric8.service.AbstractDataStore$1.run(AbstractDataStore.java:210)[io.fabric8:fabric-core:1.0.0.redhat-379] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_65] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_65] at java.lang.Thread.run(Thread.java:745)[:1.7.0_65] also if you try to click on the container name hwatio will hang.

      Description

      If I created a profile with a property that uses incorrect property resolver, for instance ${file:inputFile}, once I try to apply this profile to a newly created child container, it will cause the command line console completely unusable.

      Before applying the faulty profile to the "child" container:

      JBossFuse:karaf@root> container-list 
      [id]                           [version] [connected] [profiles]                                         [provision status]
      root*                          1.0       true        fabric, fabric-ensemble-0000-1, jboss-fuse-full    success
        child                       1.0       true        default                        success
      

      After applying the profile to the "child" container:

      JBossFuse:karaf@root> container-list 
      [id]                           [version] [connected] [profiles]                                         [provision status]
      root*                          1.0       true        fabric, fabric-ensemble-0000-1, jboss-fuse-full    success
      Error executing command: Missing Placeholder Resolvers: file
      

      From hawtio, I can still browse the root container, but any operation on the "child" container will just hang.

      It is not only limited to unsupported property resolver. If I use a supported property resolver but the property placeholder does not exist, for instance, ${container:test}, it will have the same effect as the unsupported property resolver ${file:xxx}. But I will get a slightly different error:

      JBossFuse:karaf@root> container-list 
      [id]                           [version] [connected] [profiles]                                         [provision status]
      root*                          1.0       true        fabric, fabric-ensemble-0000-1, jboss-fuse-full    success
      Error executing command: java.lang.NullPointerException
      

      We should be more fault tolerant for this type of user error rather than just let the fabric command line console to be completely unusable.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sonicaaaa Paolo Antinori
                Reporter:
                joe.luo Joe Luo
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: