You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Aled Sage <al...@gmail.com> on 2014/07/30 12:05:10 UTC

Changing default app shutdown behaviour

Hi all,

I'd like to change the default behaviour for stopping apps on brooklyn 
shutdown.

Currently it is: if persistence is enabled, leave everything running; if 
persistence is disabled then only stop those apps started explicitly at 
the command line with `--app` (i.e. though subsequently launched from 
the catalog are not stopped). This means that their associated VMs are 
left running on brooklyn cntrl-c, unless one manually stops each 
application first.

There are a number of configurable options via the `--stopOnShutdown` 
command line option [1, 2]. I suggest we change the default to 
allIfNotPersisted. i.e. "stop all apps IF persistence is not enabled, 
otherwise leave all running".

This CLI option was added after 0.7.0-M1 release so there are no 
backwards compatibility issues.

Any objections or comments?

Aled

[1] 
https://github.com/apache/incubator-brooklyn/blob/master/usage/cli/src/main/java/brooklyn/cli/Main.java#L278-286 

[2] 
https://github.com/apache/incubator-brooklyn/blob/master/usage/launcher/src/main/java/brooklyn/launcher/config/StopWhichAppsOnShutdown.java 


Re: Changing default app shutdown behaviour

Posted by Sam Corbett <sa...@cloudsoftcorp.com>.
 Appreciate this is a few days old and might have been decided, but going
with the principle of least surprise I'd prefer to remain with the first
option of stopping all apps. I think the data-loss surprise is lesser to
the this-is-costing-me-money surprise and that anybody who lost truly
important data with the former might have availed themselves of Brooklyn's
configuration options before doing anything more than run a demo.

Sam

On 30/07/2014 14:18, Alex Heneveld wrote:


It is worth noting that either way there are drawbacks:

    * If we DO stop all apps, we risk stopping and potentially destroying
data of systems started by Brooklyn -- hurting QoS/reliability
    * If we DON'T stop all apps, we risk leaving things running that people
didn't want -- costing money

To me the second one is the lesser of the two evils.  If a `kill -9` is
done, or brooklyn is stopped while offline, then the second one will occur
in any case.  So I'm in favour of changing the default to "stop none on
shutdown".

We can work to address the problem of things accidentally left running with
the following:

    1) Recommend that people shut down Brooklyn via the GUI (where there
are options to shutdown all apps or no apps, currently buried in "help" but
could be promoted with the "server" tab I proposed in my other email)
    2) Run with persistence ON by default
    3) Include a GUI view of all locations and the Brooklyn-provisioned
machines there (including tagging those machines created by this instance
of Brooklyn and by other Brooklyn instances)

Best
Alex



On 30/07/2014 07:00, Andrea Turli wrote:

+1

Andrea
Il 30/lug/2014 12:05 "Aled Sage" <al...@gmail.com> <al...@gmail.com>
ha scritto:

Hi all,

I'd like to change the default behaviour for stopping apps on brooklyn
shutdown.

Currently it is: if persistence is enabled, leave everything running; if
persistence is disabled then only stop those apps started explicitly at the
command line with `--app` (i.e. though subsequently launched from the
catalog are not stopped). This means that their associated VMs are left
running on brooklyn cntrl-c, unless one manually stops each application
first.

There are a number of configurable options via the `--stopOnShutdown`
command line option [1, 2]. I suggest we change the default to
allIfNotPersisted. i.e. "stop all apps IF persistence is not enabled,
otherwise leave all running".

This CLI option was added after 0.7.0-M1 release so there are no backwards
compatibility issues.

Any objections or comments?

Aled

[1] https://github.com/apache/incubator-brooklyn/blob/
master/usage/cli/src/main/java/brooklyn/cli/Main.java#L278-286
[2] https://github.com/apache/incubator-brooklyn/blob/
master/usage/launcher/src/main/java/brooklyn/launcher/config/
StopWhichAppsOnShutdown.java

Re: Changing default app shutdown behaviour

Posted by Alex Heneveld <al...@cloudsoftcorp.com>.
It is worth noting that either way there are drawbacks:

     * If we DO stop all apps, we risk stopping and potentially 
destroying data of systems started by Brooklyn -- hurting QoS/reliability
     * If we DON'T stop all apps, we risk leaving things running that 
people didn't want -- costing money

To me the second one is the lesser of the two evils.  If a `kill -9` is 
done, or brooklyn is stopped while offline, then the second one will 
occur in any case.  So I'm in favour of changing the default to "stop 
none on shutdown".

We can work to address the problem of things accidentally left running 
with the following:

     1) Recommend that people shut down Brooklyn via the GUI (where 
there are options to shutdown all apps or no apps, currently buried in 
"help" but could be promoted with the "server" tab I proposed in my 
other email)
     2) Run with persistence ON by default
     3) Include a GUI view of all locations and the Brooklyn-provisioned 
machines there (including tagging those machines created by this 
instance of Brooklyn and by other Brooklyn instances)

Best
Alex



On 30/07/2014 07:00, Andrea Turli wrote:
> +1
>
> Andrea
> Il 30/lug/2014 12:05 "Aled Sage" <al...@gmail.com> ha scritto:
>
>> Hi all,
>>
>> I'd like to change the default behaviour for stopping apps on brooklyn
>> shutdown.
>>
>> Currently it is: if persistence is enabled, leave everything running; if
>> persistence is disabled then only stop those apps started explicitly at the
>> command line with `--app` (i.e. though subsequently launched from the
>> catalog are not stopped). This means that their associated VMs are left
>> running on brooklyn cntrl-c, unless one manually stops each application
>> first.
>>
>> There are a number of configurable options via the `--stopOnShutdown`
>> command line option [1, 2]. I suggest we change the default to
>> allIfNotPersisted. i.e. "stop all apps IF persistence is not enabled,
>> otherwise leave all running".
>>
>> This CLI option was added after 0.7.0-M1 release so there are no backwards
>> compatibility issues.
>>
>> Any objections or comments?
>>
>> Aled
>>
>> [1] https://github.com/apache/incubator-brooklyn/blob/
>> master/usage/cli/src/main/java/brooklyn/cli/Main.java#L278-286
>> [2] https://github.com/apache/incubator-brooklyn/blob/
>> master/usage/launcher/src/main/java/brooklyn/launcher/config/
>> StopWhichAppsOnShutdown.java
>>


Re: Changing default app shutdown behaviour

Posted by Andrea Turli <an...@cloudsoftcorp.com>.
+1

Andrea
Il 30/lug/2014 12:05 "Aled Sage" <al...@gmail.com> ha scritto:

> Hi all,
>
> I'd like to change the default behaviour for stopping apps on brooklyn
> shutdown.
>
> Currently it is: if persistence is enabled, leave everything running; if
> persistence is disabled then only stop those apps started explicitly at the
> command line with `--app` (i.e. though subsequently launched from the
> catalog are not stopped). This means that their associated VMs are left
> running on brooklyn cntrl-c, unless one manually stops each application
> first.
>
> There are a number of configurable options via the `--stopOnShutdown`
> command line option [1, 2]. I suggest we change the default to
> allIfNotPersisted. i.e. "stop all apps IF persistence is not enabled,
> otherwise leave all running".
>
> This CLI option was added after 0.7.0-M1 release so there are no backwards
> compatibility issues.
>
> Any objections or comments?
>
> Aled
>
> [1] https://github.com/apache/incubator-brooklyn/blob/
> master/usage/cli/src/main/java/brooklyn/cli/Main.java#L278-286
> [2] https://github.com/apache/incubator-brooklyn/blob/
> master/usage/launcher/src/main/java/brooklyn/launcher/config/
> StopWhichAppsOnShutdown.java
>