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

Felix File Install property (felix.fileinstall.active.level) is not working

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.2.9, 2.3.0
    • Fix Version/s: None
    • Component/s: karaf-core
    • Labels:
      None

      Description

      We are having 3 bundles and we want to deploy bundle1 and bundle 2 as part of boot feature and bundle 3 via file install(deploy folder).
      We want to maintain the deployment order in such a way that bundle as part of boot feature deployed first and then bundle from deploy folder is deployed.
      For example:
      1st)Bundle2
      2nd)Bundle1
      3rd)Bundle3

      In order to maintain this behavior we have set the following property in org.apache.felix.fileinstall-deploy.cfg

      felix.fileinstall.active.level =84

      This level is way higher than the Bundle1(Level:75) & Bundle2(Level:60) level

      But we are not able to achieve the required behavior after launching the karaf with clean cache.

      The bundles are getting deployed in the following order.
      1)Bundle2
      2)Bundle3
      3)Bundle1

      When I restart the karaf(without cleaning cache) then bundles are getting deployed in the right order.
      1)Bundle2
      2)Bundle1
      3)Bundle3

      It look like that "felix.fileinstall.active.level" is not applied properly.

      1. try.zip
        7 kB
        Shrish Srivastava
      2. Bundle3-0.0.1-SNAPSHOT.jar
        4 kB
        Shrish Srivastava
      3. org.apache.felix.fileinstall-deploy.cfg
        1 kB
        Shrish Srivastava

        Issue Links

          Activity

          Hide
          zhencaiwang Zhencai Wang added a comment -

          I think this is simply an issue in FileInstall component. According to the description of "felix.fileinstall.active.level" in http://felix.apache.org/site/apache-felix-file-install.html:

          "felix.fileinstall.active.level: FileInstall won't scan for files unless the active framework start level is greater than this value"

          FileInstall should not install any bundles in deploy folder until the framework start level is greater than specified value.

          Show
          zhencaiwang Zhencai Wang added a comment - I think this is simply an issue in FileInstall component. According to the description of "felix.fileinstall.active.level" in http://felix.apache.org/site/apache-felix-file-install.html: "felix.fileinstall.active.level: FileInstall won't scan for files unless the active framework start level is greater than this value" FileInstall should not install any bundles in deploy folder until the framework start level is greater than specified value.
          Hide
          jbonofre Jean-Baptiste Onofré added a comment -

          I gonna work on KARAF-2339 this afternoon.

          Show
          jbonofre Jean-Baptiste Onofré added a comment - I gonna work on KARAF-2339 this afternoon.
          Hide
          gnt Guillaume Nodet added a comment -

          The felix fileinstall active level only control the start level under which fileinstall won't do anything.
          In all cases, you need to remember that the start level has nothing to do with the deployment order, as the start level of a bundle affects when a bundle is started, not deployed.

          At deployment time, if the framework start level is higher than the bundle start level, the bundle will be started when installed. Once the process is synchronous, it should be possible to ensure that bundles are deployed while the framework is still at a low start level (they should be deployed at the same start level than the features service bundle, provided blueprint is configured synchronously).

          I've raise KARAF-2339 to better control the deployment of the boot features and it will certainly help in your case. For fileinstall, the deployment is always asynchronous, so can only be controlled in a way to delay the installation of bundles via fileinstall.

          Show
          gnt Guillaume Nodet added a comment - The felix fileinstall active level only control the start level under which fileinstall won't do anything. In all cases, you need to remember that the start level has nothing to do with the deployment order, as the start level of a bundle affects when a bundle is started, not deployed. At deployment time, if the framework start level is higher than the bundle start level, the bundle will be started when installed. Once the process is synchronous, it should be possible to ensure that bundles are deployed while the framework is still at a low start level (they should be deployed at the same start level than the features service bundle, provided blueprint is configured synchronously). I've raise KARAF-2339 to better control the deployment of the boot features and it will certainly help in your case. For fileinstall, the deployment is always asynchronous, so can only be controlled in a way to delay the installation of bundles via fileinstall.
          Hide
          edwardost Edward Ost added a comment -

          Despite the good detail in the description, it is not really a question of the relative start order of bundle 1 versus bundle 2, etc. While those may or may not be bugs, those bugs are covered in other JIRA issues. The issue is that all of the bundles should not be starting until the felix.fileinstall.active.level (e.g. 84 in this case) is reached. Can we enhance the example to show that when these bundles other deployed relative to other bundles which may be specified in the start.properties so that we can ascertain whether these other bundles are started in the correct relation to the active.level property. This will demonstrate more clearly the bug.

          Show
          edwardost Edward Ost added a comment - Despite the good detail in the description, it is not really a question of the relative start order of bundle 1 versus bundle 2, etc. While those may or may not be bugs, those bugs are covered in other JIRA issues. The issue is that all of the bundles should not be starting until the felix.fileinstall.active.level (e.g. 84 in this case) is reached. Can we enhance the example to show that when these bundles other deployed relative to other bundles which may be specified in the start.properties so that we can ascertain whether these other bundles are started in the correct relation to the active.level property. This will demonstrate more clearly the bug.
          Hide
          gnt Guillaume Nodet added a comment -

          What's your use case for trying to order things in a so fine grained way ?
          Start order should only be used as a way to optimize things, but bundles should not rely on it, because bundles can be stopped or started at any time and they should handle those use cases correctly.

          Show
          gnt Guillaume Nodet added a comment - What's your use case for trying to order things in a so fine grained way ? Start order should only be used as a way to optimize things, but bundles should not rely on it, because bundles can be stopped or started at any time and they should handle those use cases correctly.

            People

            • Assignee:
              jbonofre Jean-Baptiste Onofré
              Reporter:
              shrishs Shrish Srivastava
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development