You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2018/12/10 13:35:36 UTC

[feature-model] Removing features after installation

Hi,

I'm playing around with the feature model and I ran into the following
scenario:

1. Launch application with features A,B
2. I become wiser and realise I included too much in feature A, so now
I move some stuff from A into feature C. So now I launch with A' (A
without stuff moved to C) + B

At this point the bundles and configurations are those from feature A,
not from A'. I understand the technical reason - the framework has been
provisioned, bundles installed, etc.

My question is - is this something that can be seen in scope of the
feature model (launcher?) or is the recommendation to use other
mechanisms?

Thanks,

Robert


Re: [feature-model] Removing features after installation

Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Dec 10, 2018 at 3:01 PM Robert Munteanu <ro...@apache.org> wrote:
> ...I'm actually not using Sling :-) in this particular instance so I'm
> abusing the dev list for feature model discussions I guess...

ah, ok - no you're not abusing, the feature model is (for now) a Sling
module indeed!

-Bertrand

Re: [feature-model] Removing features after installation

Posted by David Bosschaert <da...@gmail.com>.
Hi Dominik,

On Tue, 11 Dec 2018 at 14:58, Dominik Süß <do...@gmail.com> wrote:

> Hi Karl,
> On Mon, Dec 10, 2018 at 3:15 PM Karl Pauls <ka...@gmail.com> wrote:
>
> > Yeah, fwiw, that was the underlying idea - there are no restarts
> > anymore. I guess we might want to consider emphasising this by making
> > it the default to clear the cache on restarts so that you always start
> > from a clean state.
> >
>
> I don't know if this really is the case. You might want to preprovision the
> immutable state and still stop & start without any state change.
> This does allow extremely quickly roling out clones of an immutable
> instance in a containerized environment.
>
>
For situations like this, would you not use Docker to build up your
pre-provisioned state. For example based on the Feature Model.
Then you keep that state in a docker image.
Subsequently you can start (and stop) Docker containers based on that image.

What would the Feature Model need to add for this?

Best regards,

David

Re: [feature-model] Removing features after installation

Posted by Dominik Süß <do...@gmail.com>.
Hi Karl,
On Mon, Dec 10, 2018 at 3:15 PM Karl Pauls <ka...@gmail.com> wrote:

> Yeah, fwiw, that was the underlying idea - there are no restarts
> anymore. I guess we might want to consider emphasising this by making
> it the default to clear the cache on restarts so that you always start
> from a clean state.
>

I don't know if this really is the case. You might want to preprovision the
immutable state and still stop & start without any state change.
This does allow extremely quickly roling out clones of an immutable
instance in a containerized environment.

Cheers
Dominik

Re: [feature-model] Removing features after installation

Posted by David Bosschaert <da...@gmail.com>.
On Mon, 10 Dec 2018 at 14:31, Robert Munteanu <ro...@apache.org> wrote:

> On Mon, 2018-12-10 at 15:15 +0100, Karl Pauls wrote:
> > ...
> > > > Would that cause trouble in your case? I tend to think that it
> > > > would
> > > > help people move to a devops mindset, where Sling instances are
> > > > throwaway.
> > ...
> > > But yes, I guess this is a valid reply, just drop everything (
> > > except
> > > persisted state ) and start over.
> >
> > Yeah, fwiw, that was the underlying idea - there are no restarts
> > anymore. I guess we might want to consider emphasising this by making
> > it the default to clear the cache on restarts so that you always
> > start
> > from a clean state.
>
> That could work, and we should consider if this should be the default
> or behind a feature flag. The reason for not making it the default is
> that people might mess around with their setup, e.g. create configs,
> stop bundles, and if the changes are not persisted between restarts it
> will be confusing and unpleasant.
>

AFAIK you need to delete the 'launcher' cache directory yourself to get a
clean sheet. I think it would make sense to do this via a command line
option.

Best,

David

Re: [feature-model] Removing features after installation

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2018-12-10 at 15:15 +0100, Karl Pauls wrote:
> ...
> > > Would that cause trouble in your case? I tend to think that it
> > > would
> > > help people move to a devops mindset, where Sling instances are
> > > throwaway.
> ...
> > But yes, I guess this is a valid reply, just drop everything (
> > except
> > persisted state ) and start over.
> 
> Yeah, fwiw, that was the underlying idea - there are no restarts
> anymore. I guess we might want to consider emphasising this by making
> it the default to clear the cache on restarts so that you always
> start
> from a clean state.

That could work, and we should consider if this should be the default
or behind a feature flag. The reason for not making it the default is
that people might mess around with their setup, e.g. create configs,
stop bundles, and if the changes are not persisted between restarts it
will be confusing and unpleasant.

Robert


Re: [feature-model] Removing features after installation

Posted by Karl Pauls <ka...@gmail.com>.
...
> > Would that cause trouble in your case? I tend to think that it would
> > help people move to a devops mindset, where Sling instances are
> > throwaway.
...
> But yes, I guess this is a valid reply, just drop everything ( except
> persisted state ) and start over.

Yeah, fwiw, that was the underlying idea - there are no restarts
anymore. I guess we might want to consider emphasising this by making
it the default to clear the cache on restarts so that you always start
from a clean state.

regards,

Karl

> Robert
>


-- 
Karl Pauls
karlpauls@gmail.com

Re: [feature-model] Removing features after installation

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2018-12-10 at 14:57 +0100, Bertrand Delacretaz wrote:
> Hi Robert,
> 
> On Mon, Dec 10, 2018 at 2:46 PM Robert Munteanu <ro...@apache.org>
> wrote:
> > ...is this something that can be seen in scope of the
> > feature model (launcher?) or is the recommendation to use other
> > mechanisms?...
> 
> I haven't been involved much with the feature model but in general I
> think we should move towards immutable instances - so once you have
> started a Sling instance for the first time, from a deployment's
> point
> of view its OSGi state is frozen and cannot be changed anymore.
> 
> Would that cause trouble in your case? I tend to think that it would
> help people move to a devops mindset, where Sling instances are
> throwaway.

I'm actually not using Sling :-) in this particular instance so I'm
abusing the dev list for feature model discussions I guess.

But yes, I guess this is a valid reply, just drop everything ( except
persisted state ) and start over.

Robert


Re: [feature-model] Removing features after installation

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Robert,

On Mon, Dec 10, 2018 at 2:46 PM Robert Munteanu <ro...@apache.org> wrote:
> ...is this something that can be seen in scope of the
> feature model (launcher?) or is the recommendation to use other
> mechanisms?...

I haven't been involved much with the feature model but in general I
think we should move towards immutable instances - so once you have
started a Sling instance for the first time, from a deployment's point
of view its OSGi state is frozen and cannot be changed anymore.

Would that cause trouble in your case? I tend to think that it would
help people move to a devops mindset, where Sling instances are
throwaway.

-Bertrand