Weekly Development Summary

2017-07-27 Thread Menno Smits
Hi everyone, It's time for another update on what the Juju team has been up to. There's been lots of great progress. Here are the highlights... *Cross Model Relations* It is now possible to establish relations between controllers! Here's a basic example of how this looks on the command line: $

Re: Is a set state called multiple times?

2017-07-27 Thread fengxia
Now thinking of it, I just realized that this concept of True state executing repeatedly is actually a good thing. In many cases, there is a need to query external resource for its status. This is often implemented as a polling loop. So in charm, I can implement it as @when("prep") def

Re: Is a set state called multiple times?

2017-07-27 Thread Cory Johns
fengxia, It's probably more enlightening to think of them as "flags" rather than states. (Indeed, the next release of charms.reactive will deprecate calling them states and will provide set_flag, remove_flag, etc. functions instead.) On Thu, Jul 27, 2017 at 3:29 PM, fengxia

Re: Is a set state called multiple times?

2017-07-27 Thread Cory Johns
On Thu, Jul 27, 2017 at 12:29 PM, Tilman Baumann < tilman.baum...@canonical.com> wrote: > Problems with interfaces: > - *.connected state gets dropped when one unit leaves. Not when the > last one leaves. > If this is happening, then it's because the particular interface layer is doing

Re: Is a set state called multiple times?

2017-07-27 Thread fengxia
Alex, Thank you for the detailed explanations and examples. After reading Tilman's and Cory's replies, I think the confusion is at continuous evaluation (thus execution) of a True state. So a pair of @when and @when_not will result in one of them being executed over and over despite adding a

Re: Is a set state called multiple times?

2017-07-27 Thread fengxia
Tilman, This is quite interesting, and I think that's exactly what confused me -- I took @when as event handler, and expected to be executed only on False->True transition, but not being continuously executed if I don't "remove_state" inside itself. On 07/27/2017 12:29 PM, Tilman Baumann

Re: juju bug (?) when allocating floating ips to machines

2017-07-27 Thread Heather Lanigan
Hi Patrizio, Judging by the code in develop, we do not check the tenant_id when choosing a FIP. There is an attempt to ensure the FIP is in the provided external network, if specified. So that may be another work around. Please file a bug. I'm wondering if there are more places the provider

Re: Application of Membership for Charmers

2017-07-27 Thread Billy Olsen
Thanks Tim, Alex, David, Jorge, James and the rest of the charmers! On Thu, Jul 27, 2017 at 10:07 AM Tim Van Steenburgh < tim.van.steenbu...@canonical.com> wrote: > +1 and approved, thanks Billy. > > On Fri, Jul 21, 2017 at 8:41 AM, Billy Olsen > wrote: > >> Hello

Re: Application of Membership for Charmers

2017-07-27 Thread Tim Van Steenburgh
+1 and approved, thanks Billy. On Fri, Jul 21, 2017 at 8:41 AM, Billy Olsen wrote: > Hello Charmers, > > My name is Billy Olsen and I've been a long time contributor to the > OpenStack Charms, going back 3 years now. I'm currently a core member of > the OpenStack

Re: Is a set state called multiple times?

2017-07-27 Thread Tilman Baumann
The confusion comes from the expectations that states are somehow events and @when decorators are event handlers. @when are predicates on states. When predicates are true the decorated code is executed at every hook invocation. If you want to trigger on edges (state changes) you need to build

Re: CephFS Backend for Hadoop

2017-07-27 Thread James Beedy
Dmitrii, Many thanks for your insight here. ~James On Wed, Jul 26, 2017 at 11:34 PM, Patrizio Bassi wrote: > > 2017-07-26 9:17 GMT+02:00 Mark Shuttleworth : > >> On 26/07/17 07:14, Patrizio Bassi wrote: >> >> Deploying hadoop via juju in an openstack

Re: Is a set state called multiple times?

2017-07-27 Thread Cory Johns
It does seem that the current behavior of re-evaluating handlers despite none of their flags (states) having changed is confusing, particularly for new users, and we are planning on changing this behavior. Unfortunately, there are some charms that have come to rely on the current behavior, so we

juju bug (?) when allocating floating ips to machines

2017-07-27 Thread Patrizio Bassi
Hi all i'm using juju 2.1.2.1 (i didn't upgrade to 2.2 yet, that's why i didn't open a bug on launchpad) with openstack as cloud provider. When i use as credentials an Admin user (but a specific tenant) i have issues with floating ip assignment: the admin user can see all the floating ips in the

Re: Is a set state called multiple times?

2017-07-27 Thread Alex Kavanagh
Hi On Thu, Jul 27, 2017 at 2:37 AM, fengxia wrote: > Hi Juju, > > Once I set a state, set_state("here"), I want to make sure its @when will > only be executed ONCE (when "here" from False->True). > > So my thought is to remove_state("here") in its @when("here") code block. >

Re: CephFS Backend for Hadoop

2017-07-27 Thread Patrizio Bassi
2017-07-26 9:17 GMT+02:00 Mark Shuttleworth : > On 26/07/17 07:14, Patrizio Bassi wrote: > > Deploying hadoop via juju in an openstack tenant requires a separate model > (as far as i could design it). > So we may use the new juju 2.2 cross model relation to relate the hadoop >