[02:46] admcleod_: You fall back to network_get. With no relation, your charm has decisions to make since it may have several IP addresses and egress ranges to choose from [03:07] stub: how would i get the interface associated with the default route woth network get? [03:10] admcleod_: You would use the Python stdlib or something from pypi. That question has nothing to do with Juju, so no point asking Juju for an answer. [03:11] I suspect it is the wrong question. [03:11] stub: i feel like thats a bit of a cop out [03:12] I think you want the address bound to a particular network space, which is controlled by Juju [03:12] So you bind to the IP address that the operator configured, rather than whatever AWS or whatnot happened to set as the default route. [03:13] https://jujucharms.com/docs/stable/developer-network-primitives#network-get [04:01] ill have a look tomorrow, thanks stub === frankban|afk is now known as frankban [07:39] Good Morning [13:31] hello folks [13:31] kjackal: or someone [13:32] can you deploy a local charm using libjuju and also attach resources to it it requires at install time? [13:33] magicaltrout: let me see... [13:38] magicaltrout: I see the https://github.com/juju/python-libjuju/blob/978f35cc4f19ba98af86ca73a387c9997ad6b24c/examples/localcharm.py localdeployment [13:40] but local resources are in the todo list: https://github.com/juju/python-libjuju/blob/978f35cc4f19ba98af86ca73a387c9997ad6b24c/juju/model.py#L1079 [13:51] @jamespage Minor ask on https://github.com/juju/layer-index/pull/21 and then I'll merge [13:51] you make me sad kjackal [13:51] @jamespage Sorry, I'm bad at copy-and-paste. https://github.com/juju/layer-index/pull/21 [13:51] we switch from amulet and still can't test stuff :) [13:52] Oh wait, I got it right the first time. heh. [13:52] i found juju.application.attach with a raise noimplemented exception [13:52] sad times [13:52] cory_fu: done [13:52] jamespage: Thanks [13:53] jamespage: Merged. [13:53] magicaltrout: would it work if you juju attach resource from the command line [13:53] @jamespage How are you finding the Endpoint pattern vs the older RelationBase? Any feedback? [13:54] cory_fu: only half a day into that - was going to ask you to peek at my interface parts [13:54] cory_fu: https://github.com/openstack-charmers/charm-interface-vault-kv [13:55] I think I see the changes and I think I grokked the docs [13:55] magicaltrout: can you push your charms in to the edge channel and test it from there? [13:57] jamespage: At first glance, it looks good, though I do notice you're going to hit https://github.com/juju-solutions/charms.reactive/pull/168 but hopefully I can get a release out with a fix for that ASAP [13:58] cory_fu: I did some of the old style flags for compat with some of the relation state assessment code we have in other charms [13:58] but generally it was all fairly painless [13:58] cory_fu: I did notice something a little odd - you always get a return value for endpoint_from_flag with new style interfaces [13:59] that may be intentional and I was able to deal with it with a is_flag_set as well [13:59] jamespage: _get_first_value can be replaced with just using self.all_joined_units.received[key] [13:59] jamespage: https://github.com/juju-solutions/charms.reactive/pull/173 ;) [14:00] jamespage: As stub said, I can see it going either way, but I think it makes more sense to match the existing behavior. But I do think that is_flag_set is more explicit and thus better [14:01] cory_fu: https://review.openstack.org/#/c/563091/1/src/reactive/vault_handlers.py is the requires side handler implementation for that interface [14:03] jamespage: You mean provides [14:07] jamespage: Do you really want to publish the info for every unit across every relation: https://github.com/openstack-charmers/charm-interface-vault-kv/blob/master/provides.py#L46-L49 [14:08] jamespage: Also, this check is going to fail if the requiring charm sends isolated=False: https://github.com/openstack-charmers/charm-interface-vault-kv/blob/master/provides.py#L60-L61 [14:08] You might want to use "isolated is not None" [14:12] jamespage: One pattern I have started to use is to have one of the values in the list of requests be an abstract (at least from the charm's perspective) "request ID" that the interface layer can translate back to relation and unit, if needed. And as long as the ID is abstract from the charm's perspective, it could easily just be the unit object itself (which has a back reference to its relation), or some serialization of the relation ID + unit ID, [14:12] if you prefer. [14:13] jamespage: And if there are even just a few fields, wrapping it in a simple FooRequest class makes it even easier [14:26] jamespage: There've been a few changes against charm-helpers recently. Wondering if we should cut a release of that soon. [14:40] kjackal: if you deploy a local charm [14:40] does/should juju attach still work like usual? [14:42] tinwood: We were talking yesterday about goal-state, and lo and behold, Juju 2.4-beta1 was updated today with it! [14:43] Oh, I guess that was yesterday. [14:44] Talk about turn-around time. ;) [14:46] cory_fu: I was just talking with core about finding some examples to put together a blog/juju show and such around how to use it and why it's useful [14:46] cory_fu: would love if you're interested to help put together the demo stuff to highlight the feature [14:48] cory_fu, wow, that made it in. Interesting. [14:49] rick_h_: stub and tinwood have good real-world examples. A simpler, but also a bit more trivial, example would just be showing how you can get more accurate charm status for the period between when relations were added vs when the hook fires in Juju. [14:49] rick_h_: But they actually need it to make the charm logic a lot cleaner and the charms work much more efficiently [14:50] cory_fu: right, I think the big thing will be boiling it down to a couple of the simplest cases to think of [14:51] rick_h_: yeah, charm status for relations is about the simplest case I can come up with and is pretty demo-able. [14:55] cory_fu: I do mean provides yes ;) [14:59] cory_fu: OK I see what you mean - refactoring a bit [15:02] it should magicaltrout [15:03] yeah there's something amazing going on with libjuju [15:04] when you deploy a local charm on the commandline I can do juju resources [15:04] and it lists my resources [15:04] but model.deply('/local/charm') [15:04] lists no resources [15:07] magicaltrout: Yeah, I hit that a couple of weeks ago: https://github.com/juju/python-libjuju/issues/223 [15:08] magicaltrout: There's an API call missing from Model.deploy to register the resources [15:09] arse [15:09] cheers cory_fu [15:10] magicaltrout: Should be an easy fix, though I'm probably not going to have time to work on it for a couple of weeks. I'm a little confused as to why the controller doesn't register them automatically, since it clearly knows about them from the CharmInfo response [15:15] thanks cory_fu [15:15] bought any new hats for summer? [15:15] magicaltrout: :) I got one for xmas but it's a bit too big. It's hard to find nice hat stores these days [15:17] http://cdn.mutually.com/wp-content/uploads/2017/06/84900949.jpg [15:17] I'll keep an eye out for you cory_fu ! [15:21] magicaltrout: lol. I'm compelled to point out that that's not a fedora (it's a trilby), but I don't imagine that helps my case. ;) [15:21] It's also too big for that person's head. [15:24] thanks cory_fu you just gave the office a chuckle ;) [15:24] :) === frankban is now known as frankban|afk [18:16] hi guys, need some help, i'm trying to conjure-up kubernetes, in an already bootstrapped controller on an custom model, with another user than the default admin, and I keep receiving a credentials not found error message :( [18:25] i had broken my lxd, and now recovered. but the bootstrap node appears to have lost authentication with lxd [18:25] since the bootstrap container is generating [18:25] Apr 20 19:25:09 sochi lxd[3165]: ip=10.71.156.2:46084 lvl=warn msg="rejecting request from untrusted client" t=2018-04-20T19:25:09+0100 [18:25] is there a way to force juju to re-authenticate it self with lxd environment? [18:38] i think i somehow need to reimport certificate..... [18:38] but i'm not sure which certificate juju in the bootstrap node is using [18:46] i think https://jujucharms.com/docs/2.2/clouds-lxd-resources did the trick [19:26] thank goodness for those docs [19:37] Nice! [21:54] +1 pmatulis_ !! [21:55] and +100 for backporting stable where it makes sense