You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "richard stone (JIRA)" <ji...@apache.org> on 2009/10/02 06:22:23 UTC

[jira] Created: (FELIX-1682) The newly installed bundles for a feature should be uninstalled when feature install failed

The newly installed bundles for a feature should be uninstalled when feature install failed
-------------------------------------------------------------------------------------------

                 Key: FELIX-1682
                 URL: https://issues.apache.org/jira/browse/FELIX-1682
             Project: Felix
          Issue Type: Improvement
          Components: Karaf
            Reporter: richard stone
            Priority: Minor
             Fix For: karaf-1.2.0


Start Karaf 1.1.0 snapshot, type "features:install webconsole", at first, it will throw an exception "can not get org.apache.felix.karaf.webconsole.admin-1.1.0-SNAPSHOT.jar", run "osgi:list", you can see some bundles listed in this feature(like org.apache.felix.metatype) are installed. My point is if the feature install failed then the newly installed bundles should be uninstalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1682) The newly installed bundles for a feature should be uninstalled when feature install failed

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764718#action_12764718 ] 

Guillaume Nodet commented on FELIX-1682:
----------------------------------------

Yeah, I do understand that in this case, this is not really expected.
My goal was the following:  let's say a bundle A has been installed by the user, maybe through a feature installation.  The user later manually stopped this bundle.  Now, if you install bundle B that depends on bundle A somehow, what should happen to bundle A ?
Given the user explicitely stopped it, i don't think we should start it.  That's the way fileinstall now works.

But I'll fix that by making sure we start all bundles that have not been persistently stopped.

> The newly installed bundles for a feature should be uninstalled when feature install failed
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1682
>                 URL: https://issues.apache.org/jira/browse/FELIX-1682
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>            Reporter: richard stone
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: karaf-1.0.2
>
>         Attachments: Felix-1682.patch
>
>
> Start Karaf 1.1.0 snapshot, type "features:install webconsole", at first, it will throw an exception "can not get org.apache.felix.karaf.webconsole.admin-1.1.0-SNAPSHOT.jar", run "osgi:list", you can see some bundles listed in this feature(like org.apache.felix.metatype) are installed. My point is if the feature install failed then the newly installed bundles should be uninstalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-1682) The newly installed bundles for a feature should be uninstalled when feature install failed

Posted by "richard stone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

richard stone reopened FELIX-1682:
----------------------------------


Good, your fix is more general.

I did a test,  got a very small issue

1) run "feature:install -n webconsole", make it fail to get org.apache.felix.karaf.webconsole.admin, so you will find the following 5 bundles are resolved but not started, this is fine.
[  50] [Resolved   ] [            ] [   60] geronimo-servlet_2.5_spec (1.1.2)
[  51] [Resolved   ] [            ] [   60] Apache ServiceMix Bundles: jetty-6.1.14 (6.1.14.1)
[  52] [Resolved   ] [            ] [   60] OPS4J Pax Web - Web Container (0.6.0)
[  53] [Resolved   ] [            ] [   60] Apache Felix Metatype Service (1.0.2)
[  54] [Resolved   ] [            ] [   60] Apache Felix Web Management Console(1.2.10)  

2) run "feature:install -n webconsole" again, this time we make everything ok, but you will find the above 5 bundles are still not started, this is not what we expected:
[  50] [Resolved   ] [            ] [   60] geronimo-servlet_2.5_spec (1.1.2)
[  51] [Resolved   ] [            ] [   60] Apache ServiceMix Bundles: jetty-6.1.14 (6.1.14.1)
[  52] [Resolved   ] [            ] [   60] OPS4J Pax Web - Web Container (0.6.0)
[  53] [Resolved   ] [            ] [   60] Apache Felix Metatype Service (1.0.2)
[  54] [Resolved   ] [            ] [   60] Apache Felix Web Management Console(1.2.10)  
[  55] [Active     ] [Created     ] [   60] Apache Felix Karaf :: Web Console :: Admin Plugin (1.1.0.SNAPSHOT)
[  56] [Active     ] [Created     ] [   60] Apache Felix Karaf :: Web Console :: Features Plugin (1.1.0.SNAPSHOT)
[  57] [Active     ] [Created     ] [   60] Apache Felix Karaf :: Web Console :: Gogo Plugin (1.1.0.SNAPSHOT)


> The newly installed bundles for a feature should be uninstalled when feature install failed
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1682
>                 URL: https://issues.apache.org/jira/browse/FELIX-1682
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>            Reporter: richard stone
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: karaf-1.0.2
>
>         Attachments: Felix-1682.patch
>
>
> Start Karaf 1.1.0 snapshot, type "features:install webconsole", at first, it will throw an exception "can not get org.apache.felix.karaf.webconsole.admin-1.1.0-SNAPSHOT.jar", run "osgi:list", you can see some bundles listed in this feature(like org.apache.felix.metatype) are installed. My point is if the feature install failed then the newly installed bundles should be uninstalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-1682) The newly installed bundles for a feature should be uninstalled when feature install failed

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved FELIX-1682.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: karaf-1.2.0)
                   karaf-1.0.2
         Assignee: Guillaume Nodet

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	karaf/features/command/src/main/java/org/apache/felix/karaf/features/command/InstallFeatureCommand.java
	M	karaf/features/core/src/main/java/org/apache/felix/karaf/features/FeaturesService.java
	M	karaf/features/core/src/main/java/org/apache/felix/karaf/features/internal/FeaturesServiceImpl.java
Committed r824313

I'm sorry I did no see you patch before committing my fix.
My patch is more general and add an option to the command to be able to not clean bundles (this can be useful when debugging a feature so that you don't have to manually install all the bundles).  My patch also rollback dependant features installation upon failures.

> The newly installed bundles for a feature should be uninstalled when feature install failed
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1682
>                 URL: https://issues.apache.org/jira/browse/FELIX-1682
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>            Reporter: richard stone
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: karaf-1.0.2
>
>         Attachments: Felix-1682.patch
>
>
> Start Karaf 1.1.0 snapshot, type "features:install webconsole", at first, it will throw an exception "can not get org.apache.felix.karaf.webconsole.admin-1.1.0-SNAPSHOT.jar", run "osgi:list", you can see some bundles listed in this feature(like org.apache.felix.metatype) are installed. My point is if the feature install failed then the newly installed bundles should be uninstalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-1682) The newly installed bundles for a feature should be uninstalled when feature install failed

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved FELIX-1682.
------------------------------------

    Resolution: Fixed

Committed r824529

The above fix contains a small part related to this issue, which is to force a start of all bundles in case of failures (so that those bundles are flagged as persistently started).

> The newly installed bundles for a feature should be uninstalled when feature install failed
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1682
>                 URL: https://issues.apache.org/jira/browse/FELIX-1682
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>            Reporter: richard stone
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: karaf-1.0.2
>
>         Attachments: Felix-1682.patch
>
>
> Start Karaf 1.1.0 snapshot, type "features:install webconsole", at first, it will throw an exception "can not get org.apache.felix.karaf.webconsole.admin-1.1.0-SNAPSHOT.jar", run "osgi:list", you can see some bundles listed in this feature(like org.apache.felix.metatype) are installed. My point is if the feature install failed then the newly installed bundles should be uninstalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-1682) The newly installed bundles for a feature should be uninstalled when feature install failed

Posted by "richard stone (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

richard stone closed FELIX-1682.
--------------------------------


Good job!

> The newly installed bundles for a feature should be uninstalled when feature install failed
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1682
>                 URL: https://issues.apache.org/jira/browse/FELIX-1682
>             Project: Felix
>          Issue Type: Improvement
>          Components: Karaf
>            Reporter: richard stone
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: karaf-1.0.2
>
>         Attachments: Felix-1682.patch
>
>
> Start Karaf 1.1.0 snapshot, type "features:install webconsole", at first, it will throw an exception "can not get org.apache.felix.karaf.webconsole.admin-1.1.0-SNAPSHOT.jar", run "osgi:list", you can see some bundles listed in this feature(like org.apache.felix.metatype) are installed. My point is if the feature install failed then the newly installed bundles should be uninstalled.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.