karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: Failing to uninstall a feature marked as not required
Date Fri, 19 Jan 2018 07:35:39 GMT
That's the expected behavior.
The feature:install really means "require this feature" while uninstall
means "do not require this feature anymore".
The features management commands won't allow you to let Karaf in an
"unstable" state, so if you want to perform such operations, you'd have to
do that using the bundle commands instead.
Given this was a bit confusing, please raise a JIRA issue so that we can
improve the user interaction and display better error messages.

2018-01-17 21:11 GMT+01:00 paouelle <paouelle@gmail.com>:

> When trying to uninstall a feature that is installed, started, but not
> marked
> as required, we get an error.
>
> For example:
>
> admin@root()> feature:list| grep platform-api
> platform-api                                    │ 2.12.0.SNAPSHOT  │
> │ Started     │ platform-app-2.12.0-SNAPSHOT           │
> admin@root()> feature:uninstall platform-api
> Error executing command: Feature named 'platform-api/0.0.0' is not
> installed
> admin@root()> feature:uninstall platform-api/2.12.0.SNAPSHOT
> Error executing command: Feature named 'platform-api/2.12.0.SNAPSHOT' is
> not
> installed
>
> Even trying to uninstall this feature programmatically via the
> FeaturesService.uninstallFeature() fails with the same error. That is true
> even after verifying the feature is installed via
> FeaturesService.isInstalled() and after having the feature returned to us
> via FeaturesService.listInstalledFeatures().
>
> Digging through the code in the class FeaturesServiceImpl, you can see that
> it ends up checking the state.requirements table and if not defined in
> there, it later reports the feature is not installed. This table seems to
> be
> used to determine if a feature is required or not as per the implementation
> for FeaturesServiceImpl.isRequired() whereas
> FeaturesServiceImpl.isInstalled() checks the state.installedFeatures
> table.
>
> Is this a known bug or should I open a ticket?
>
> I was able to circumvent the problem by updating the requirements for the
> feature and after having done that, the uninstall goes through
> successfully.
>
> Regards,
>
> Patrick
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>



-- 
------------------------
Guillaume Nodet

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