Karaf
  1. Karaf
  2. KARAF-697

features:list shows the features that failed installation as installed.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: karaf-core
    • Labels:
      None
    • Environment:

      Windows

      Description

      This was observed when attempting to install a feature that was intentionally broken. Upon installation of the feature, an unresolved constraint violation was generated, and osgi:list showed that none of the bundles inside of the broken feature had been installed. However, when running a features:list command, the feature was listed as installed.

      1. karaf-697.txt
        1 kB
        Michael Van Geertruy

        Activity

        Michael Van Geertruy created issue -
        Hide
        Michael Van Geertruy added a comment -

        This is the contents of the gimped features.xml file:
        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="foo-0.0.1">
        <feature resolver="(obr)" version="0.0.1" name="foo">
        <bundle>mvn:org.springframework/spring-web/3.0.5.RELEASE</bundle>
        <bundle>mvn:org.springframework/spring-webmvc/3.0.5.RELEASE</bundle>
        </feature>
        </features>

        Again, it was intentionally created to test this issue.

        This creates an unresolved constraint violation which results in all of the bundles in this feature being uninstalled.

        The issue is in the finally block of the FeaturesServiceImpl.jar's installFeatures() method. The finally block sets the callListeners(new FeatureEvent(f, FeatureEvent.EventType.FeatureInstalled, false)); This results in the featurews being listed as installed on features:list for all features that are installed regardless of the success of that installation.

        Show
        Michael Van Geertruy added a comment - This is the contents of the gimped features.xml file: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="foo-0.0.1"> <feature resolver="(obr)" version="0.0.1" name="foo"> <bundle>mvn:org.springframework/spring-web/3.0.5.RELEASE</bundle> <bundle>mvn:org.springframework/spring-webmvc/3.0.5.RELEASE</bundle> </feature> </features> Again, it was intentionally created to test this issue. This creates an unresolved constraint violation which results in all of the bundles in this feature being uninstalled. The issue is in the finally block of the FeaturesServiceImpl.jar's installFeatures() method. The finally block sets the callListeners(new FeatureEvent(f, FeatureEvent.EventType.FeatureInstalled, false)); This results in the featurews being listed as installed on features:list for all features that are installed regardless of the success of that installation.
        Hide
        Michael Van Geertruy added a comment -

        This patch includes the changes referenced by the comments.

        Show
        Michael Van Geertruy added a comment - This patch includes the changes referenced by the comments.
        Michael Van Geertruy made changes -
        Field Original Value New Value
        Attachment karaf-697.txt [ 12484946 ]
        Jean-Baptiste Onofré made changes -
        Assignee Jean-Baptiste Onofré [ jbonofre ]
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Jean-Baptiste Onofré made changes -
        Fix Version/s 2.2.3 [ 12316685 ]
        Fix Version/s 3.0.1 [ 12316945 ]
        Component/s runtime [ 12313724 ]
        Hide
        Jean-Baptiste Onofré added a comment -

        First, I try to reproduce the issue on both 2.2.x and trunk (I'm surprised that this issue has not been reported before).

        Show
        Jean-Baptiste Onofré added a comment - First, I try to reproduce the issue on both 2.2.x and trunk (I'm surprised that this issue has not been reported before).
        Hide
        Jean-Baptiste Onofré added a comment -

        There is no problem on karaf-2.2.X: the feature is not installed if the installation failed.

        I reproduced the issue on the trunk.

        Show
        Jean-Baptiste Onofré added a comment - There is no problem on karaf-2.2.X: the feature is not installed if the installation failed. I reproduced the issue on the trunk.
        Jean-Baptiste Onofré made changes -
        Fix Version/s 2.2.3 [ 12316685 ]
        Hide
        Jean-Baptiste Onofré added a comment -

        Fixed on trunk: revision 1142954.

        Show
        Jean-Baptiste Onofré added a comment - Fixed on trunk: revision 1142954.
        Jean-Baptiste Onofré made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Andreas Pieber made changes -
        Fix Version/s 3.0.0 [ 12316040 ]
        Fix Version/s 3.0.1 [ 12316945 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2d 18h 29m 1 Jean-Baptiste Onofré 04/Jul/11 18:55
        In Progress In Progress Resolved Resolved
        16h 9m 1 Jean-Baptiste Onofré 05/Jul/11 11:05

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Michael Van Geertruy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development