karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: Uninstall bundle and package dependency
Date Fri, 09 Jan 2015 09:55:48 GMT
Looks like we got an issue with the refresh command, though it seems to be
the other way round, compared to the issue we had with Karaf 3.0.x.

regards, Achim


2015-01-09 10:50 GMT+01:00 Giuseppe Gerla <giuseppe.gerla@gmail.com>:

> Thanks Achim
> if I do a global refresh bundle 88 goes in not resolved state.
>
> The same behavior if I use web console. Using "Refresh packages" button
> from specific bundle page don't update the bundle state. If I use the
> "Refresh packages" button from the /system/console/bundles page all works
> fine.
>
> I'd like to investigate what happen if I update a single bundle using
> "Install/Update" functionality of webconsole.
>
>
> Thanks
> Regards
> Giuseppe
>
>
> 2015-01-09 9:46 GMT+01:00 Achim Nierbeck <bcanhome@googlemail.com>:
>
> > Hi Giuseppe,
> >
> > this is rather strange that it works with features, but not with the
> > refresh command.
> > OTH we had an issue with it till Karaf 3.0.2, if you just do a refresh
> > (without the id)
> > it doesn't refresh the complete container as it's supposed to.
> > Did you refresh the explicit bundle, or just call bundle:refresh?
> >
> > regards, Achim
> >
> >
> > 2015-01-08 22:04 GMT+01:00 Giuseppe Gerla <giuseppe.gerla@gmail.com>:
> >
> > > Hi Achim
> > > thanks for your answers.
> > > The problem is that after refresh 88, bundle is still in Active state.
> > >
> > > I don't see bundle 87 in the list of bundles installed, but there is
> > still
> > > the data/cache/bundle87 folder. This folder disappears when I close
> karaf
> > > with shutdown command.
> > >
> > > I make also another test. I create a feature for "Sample Dependency
> > Bundle"
> > > and another for "Sample Dependent Bundle" that install also the other
> > > feature.
> > > In this case if I uninstall the "Sample Dependency Bundle" feature
> Karaf
> > > remove the bundle from cache folder and refresh correctly the state of
> > > "Sample Dependent Bundle" in not resolved.
> > >
> > >
> > > Regards
> > > Giuseppe
> > >
> > >
> > > 2015-01-08 20:27 GMT+01:00 Achim Nierbeck <bcanhome@googlemail.com>:
> > >
> > > > Hi,
> > > >
> > > > actually I didn't look at it until now.
> > > > I think there might be some sort of race on that actual procedure
> > there.
> > > > How about retrying with the following scenario.
> > > >
> > > > Install 87
> > > > Install 88
> > > >
> > > > uninstall 87
> > > > refresh 88, should be in non-resolved state after that
> > > >
> > > > install 89
> > > > refresh 88, after that it should be wired to 89 again.
> > > >
> > > > regards, Achim
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > 2015-01-08 18:49 GMT+01:00 Cristiano Costantini <
> > > > cristiano.costantini@gmail.com>:
> > > >
> > > > > Hi Achim,
> > > > >
> > > > > if you look at the file attached to Giuseppe's message, even if you
> > > > refresh
> > > > > to bundle 88 ( karaf@root> refresh 88 ) the bundle still resolves
> > the
> > > > > package import on the old and uninstalled bundle 87 instead of
> bundle
> > > 89
> > > > > (anyhow please note that bundle 89  is the same bundle, uninstalled
> > and
> > > > > installed again, the Jar is not recompiled).
> > > > >
> > > > > Shouldn't bundle 88 start using imports from bundle 89 after the
> > > explicit
> > > > > refresh?
> > > > >
> > > > > Thank you and regards,
> > > > > Cristiano
> > > > >
> > > > >
> > > > >
> > > > > Il giorno Thu Jan 08 2015 at 18:18:21 Achim Nierbeck <
> > > > > bcanhome@googlemail.com> ha scritto:
> > > > >
> > > > > Hi,
> > > > > >
> > > > > > this is the desired behavior as per OSGi - Spec. Until you do
a
> > > refresh
> > > > > of
> > > > > > bundle 88 it will keep the references to the uninstalled bundle.
> > > > > > The deploy folder is watched by the FileInstaller, which does
> call
> > a
> > > > > > refresh on the framework after the install/uninstall of bundles.
> > > > > >
> > > > > > regards, Achim
> > > > > >
> > > > > >
> > > > > > 2015-01-08 18:10 GMT+01:00 Giuseppe Gerla <
> > giuseppe.gerla@gmail.com
> > > >:
> > > > > >
> > > > > > > Hi all
> > > > > > > I see a strange behavior about bundles life cycle management
i
> > > Karaf.
> > > > > > > I have a bundle "Sample Dependent" that depends from a
bundles
> > > > "Sample
> > > > > > > Dependency". I install both bundle in karaf and they go
in
> > Started
> > > > > state.
> > > > > > > Suppose that "Sample Dependency" has id 87 and "Sample
> Dependent"
> > > has
> > > > > id
> > > > > > 88.
> > > > > > > If I digit
> > > > > > >
> > > > > > > uninstall 87
> > > > > > >
> > > > > > > I would expect that bundle 88 will go in Installed (not
> resolved)
> > > > > state.
> > > > > > > Instead the bundle "Sample Dependent" remains in Started.
> > > > > > > Also if I do refresh or update, the bundle remain in Started.
> > > > > > > If I restart karaf I see that the bundle "Sample Dependent"
is
> > not
> > > > > > > resolved.
> > > > > > >
> > > > > > > In the file system folder /data/cache I see that bundle
87
> > relative
> > > > > > folder
> > > > > > > is not deleted until karaf is running. This explain the
> behavior.
> > > > > > >
> > > > > > > My question is: is this the desired behavior? Or the desired
> > > behavior
> > > > > is
> > > > > > > what I expected?
> > > > > > >
> > > > > > >
> > > > > > > N.B. if I use the deploy folder, after removing the bundle
> > "Sample
> > > > > > > Dependency" the bundle "Sample Dependent" goes in Installed
> > state.
> > > > > > >
> > > > > > >
> > > > > > > Regards
> > > > > > > Giuseppe
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Apache Member
> > > > > > Apache Karaf <http://karaf.apache.org/> Committer &
PMC
> > > > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> > > > Committer
> > > > > &
> > > > > > Project Lead
> > > > > > blog <http://notizblog.nierbeck.de/>
> > > > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > > > > >
> > > > > > Software Architect / Project Manager / Scrum Master
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Apache Member
> > > > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > > > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> > Committer
> > > &
> > > > Project Lead
> > > > blog <http://notizblog.nierbeck.de/>
> > > > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> > > >
> > > > Software Architect / Project Manager / Scrum Master
> > > >
> > >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> &
> > Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message