karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-4668) Inconsistent cluster status for a bundle which cannot be started
Date Wed, 07 Sep 2016 16:59:20 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15471135#comment-15471135
] 

Jean-Baptiste Onofré commented on KARAF-4668:
---------------------------------------------

The issue is more about the {{-s}} option. Actually, the bundle event handler doesn't care
about the local bundle status when he receives the event: it uses the type contained in the
event.

So, basically, the fix is to check the status of the bundle after local installation by the
event handler, and then update the cluster state if needed.

> Inconsistent cluster status for a bundle which cannot be started
> ----------------------------------------------------------------
>
>                 Key: KARAF-4668
>                 URL: https://issues.apache.org/jira/browse/KARAF-4668
>             Project: Karaf
>          Issue Type: Bug
>          Components: cellar-bundle
>    Affects Versions: cellar-4.0.1
>            Reporter: Sergiy Shyrkov
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: cellar-4.0.2
>
>
> Test scenario:
> 1) Karaf 4.0.5 installation with Cellar 4.0.1
> 2) In the console I do an installation with start of the commons-digester bundle:
> {code}
> cluster:bundle-install -s default mvn:commons-digester/commons-digester/1.8.1
> {code}
> 3) In the log I see the error reported by the BundleEventHandler when the commons-digester
bundle is started (because of missing dependencies):
> {code}
> 2016-08-25 20:19:03,432 | ERROR | ool-120-thread-6 | BundleEventHandler             
 | 55 - org.apache.karaf.cellar.bundle - 4.0.1 | CELLAR BUNDLE: failed to install bundle [org.apache.commons.digester,
1.8.1]/org.osgi.framework.BundleException: Unable to resolve org.apache.commons.digester [223](R
223.0): missing requirement [org.apache.commons.digester [223](R 223.0)] osgi.wiring.package;
(osgi.wiring.package=org.apache.commons.beanutils) Unresolved requirements: [[org.apache.commons.digester
[223](R 223.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.commons.beanutils)].
> {code}
> 4) The cluster status of the bundle is set to "Active" (when checking via "cluster:bundle-list
default"), where as the local status is "Installed" (via "bundle:list").
> The cluster state can be "corrected" by calling "cluster:sync" afterwards.
> Would it be possible to improve the error handling or at least cluster status handling
(in the BundleEventHandler.handle() we now only have the catch and log for exceptions)?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message