aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Ross (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIES-1445) Bundles that are not direct dependencies of a subsystem can be removed while still in use
Date Fri, 05 Feb 2016 15:46:40 GMT

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

John Ross commented on ARIES-1445:
----------------------------------

S1 must be the subsystem that is uninstalled. This does not fail if S2 is the one uninstalled.

------------

When S1 is installed, bundle C is detected as an installable dependency, and the subsystem
properly receives a reference to the bundle. When S2 is installed, there are no installable
dependencies because bundles B and C are already there. Only bundle B is detected as a shared
dependency and becomes referenced by S2. When S1 is uninstalled, bundle C's reference count
goes to zero, and the bundle is uninstalled.

I still don't understand why S1 must be started before being uninstalled in order for this
to fail, however.

------------

Because if S1 is not started, bundle C is detected as a shared dependency during S2's installation
and becomes referenced by S2.

------------

When computing S2's dependencies after S1 has been started, the resolution map includes a
single entry for bundle A which has a single wire to bundle B. This results in bundles A and
B being referenced by S2 but not C. When computing S2's dependencies before S1 has been started,
the resolution map includes bundles A, B, and C. Thus all three become referenced by S2. The
difference in behavior is because the resolver will only return entries for resources that
were resolved as part of the resolution. When S1 is started, bundles B and C are resolved.
When S2's dependencies are subsequently computed during installation, bundle C does not appear
because it's a transitive dependency of S2, and bundle B was already resolved.

> Bundles that are not direct dependencies of a subsystem can be removed while still in
use
> -----------------------------------------------------------------------------------------
>
>                 Key: ARIES-1445
>                 URL: https://issues.apache.org/jira/browse/ARIES-1445
>             Project: Aries
>          Issue Type: Bug
>          Components: Subsystem
>    Affects Versions: subsystem-2.0.6, subsystem-2.0.8
>         Environment: karaf pax-exam
>            Reporter: Bas
>              Labels: test-patch
>         Attachments: UninstallFeatureRemovesReferencedBundle.java.patch
>
>
> Bundle A is a constituent of application subsystem S1
> Bundle A is a constituent of application subsystem S2
> Bundle A has a package import of b.package
> Bundle B exports b.package
> Bundle B imports c.package
> Bundle C exports c.package
> There is an obr repository with bundle b and c
> Bundle B and C are not constituents
> When installing S1 bundle B and C are added to the root subsystem to fullfill the requirements
of bundle A
> When installing S2 everything is still working.
> Start S1.
> Now we uninstall S1 and bundle C is removed. 
> refreshBundles
> Subsystem S2 won't start anymore because of that.
> The testcase uses different bundle ids.



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

Mime
View raw message