/srv/irclogs.ubuntu.com/2018/04/20/#juju.txt

stubadmcleod_: 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 from02:46
admcleod_stub: how would i get the interface associated with the default route woth network get?03:07
stubadmcleod_: 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:10
stubI suspect it is the wrong question.03:11
admcleod_stub: i feel like thats a bit of a cop out03:11
stubI think you want the address bound to a particular network space, which is controlled by Juju03:12
stubSo you bind to the IP address that the operator configured, rather than whatever AWS or whatnot happened to set as the default route.03:12
stubhttps://jujucharms.com/docs/stable/developer-network-primitives#network-get03:13
admcleod_ill have a look tomorrow, thanks stub04:01
=== frankban|afk is now known as frankban
parlosGood Morning07:39
magicaltrouthello folks13:31
magicaltroutkjackal: or someone13:31
magicaltroutcan you deploy a local charm using libjuju and also attach resources to it it requires at install time?13:32
kjackalmagicaltrout: let me see...13:33
kjackalmagicaltrout: I see the https://github.com/juju/python-libjuju/blob/978f35cc4f19ba98af86ca73a387c9997ad6b24c/examples/localcharm.py localdeployment13:38
kjackalbut local resources are in the todo list: https://github.com/juju/python-libjuju/blob/978f35cc4f19ba98af86ca73a387c9997ad6b24c/juju/model.py#L107913:40
cory_fu@jamespage Minor ask on https://github.com/juju/layer-index/pull/21 and then I'll merge13:51
magicaltroutyou make me sad kjackal13:51
cory_fu@jamespage Sorry, I'm bad at copy-and-paste.  https://github.com/juju/layer-index/pull/2113:51
magicaltroutwe switch from amulet and still can't test stuff :)13:51
cory_fuOh wait, I got it right the first time.  heh.13:52
magicaltrouti found juju.application.attach with a raise noimplemented exception13:52
magicaltroutsad times13:52
jamespagecory_fu: done13:52
cory_fujamespage: Thanks13:52
cory_fujamespage: Merged.13:53
kjackalmagicaltrout: would it work if you juju attach resource from the command line13:53
cory_fu@jamespage How are you finding the Endpoint pattern vs the older RelationBase?  Any feedback?13:53
jamespagecory_fu: only half a day into that - was going to ask you to peek at my interface parts13:54
jamespagecory_fu: https://github.com/openstack-charmers/charm-interface-vault-kv13:54
jamespageI think I see the changes and I think I grokked the docs13:55
kjackalmagicaltrout: can you push your charms in to the edge channel and test it from there?13:55
cory_fujamespage: 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 ASAP13:57
jamespagecory_fu: I did some of the old style flags for compat with some of the relation state assessment code we have in other charms13:58
jamespagebut generally it was all fairly painless13:58
jamespagecory_fu: I did notice something a little odd - you always get a return value for endpoint_from_flag with new style interfaces13:58
jamespagethat may be intentional and I was able to deal with it with a is_flag_set as well13:59
cory_fujamespage: _get_first_value can be replaced with just using self.all_joined_units.received[key]13:59
cory_fujamespage: https://github.com/juju-solutions/charms.reactive/pull/173  ;)13:59
cory_fujamespage: 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 better14:00
jamespagecory_fu: https://review.openstack.org/#/c/563091/1/src/reactive/vault_handlers.py is the requires side handler implementation for that interface14:01
cory_fujamespage: You mean provides14:03
cory_fujamespage: 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-L4914:07
cory_fujamespage: 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-L6114:08
cory_fuYou might want to use "isolated is not None"14:08
cory_fujamespage: 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
cory_fuif you prefer.14:12
cory_fujamespage: And if there are even just a few fields, wrapping it in a simple FooRequest class makes it even easier14:13
cory_fujamespage: There've been a few changes against charm-helpers recently.  Wondering if we should cut a release of that soon.14:26
magicaltroutkjackal: if you deploy a local charm14:40
magicaltroutdoes/should juju attach still work like usual?14:40
cory_futinwood: We were talking yesterday about goal-state, and lo and behold, Juju 2.4-beta1 was updated today with it!14:42
cory_fuOh, I guess that was yesterday.14:43
cory_fuTalk about turn-around time. ;)14:44
rick_h_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 useful14:46
rick_h_cory_fu: would love if you're interested to help put together the demo stuff to highlight the feature14:46
tinwoodcory_fu, wow, that made it in.  Interesting.14:48
cory_furick_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
cory_furick_h_: But they actually need it to make the charm logic a lot cleaner and the charms work much more efficiently14:49
rick_h_cory_fu: right, I think the big thing will be boiling it down to a couple of the simplest cases to think of14:50
cory_furick_h_: yeah, charm status for relations is about the simplest case I can come up with and is pretty demo-able.14:51
jamespagecory_fu: I do mean provides yes ;)14:55
jamespagecory_fu: OK I see what you mean - refactoring a bit14:59
kjackalit should magicaltrout15:02
magicaltroutyeah there's something amazing going on with libjuju15:03
magicaltroutwhen you deploy a local charm on the commandline I can do juju resources <my-charm>15:04
magicaltroutand it lists my resources15:04
magicaltroutbut model.deply('/local/charm')15:04
magicaltroutlists no resources15:04
cory_fumagicaltrout: Yeah, I hit that a couple of weeks ago: https://github.com/juju/python-libjuju/issues/22315:07
cory_fumagicaltrout: There's an API call missing from Model.deploy to register the resources15:08
magicaltroutarse15:09
magicaltroutcheers cory_fu15:09
cory_fumagicaltrout: 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 response15:10
magicaltroutthanks cory_fu15:15
magicaltroutbought any new hats for summer?15:15
cory_fumagicaltrout: :)  I got one for xmas but it's a bit too big.  It's hard to find nice hat stores these days15:15
magicaltrouthttp://cdn.mutually.com/wp-content/uploads/2017/06/84900949.jpg15:17
magicaltroutI'll keep an eye out for you cory_fu !15:17
cory_fumagicaltrout: 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
cory_fuIt's also too big for that person's head.15:21
magicaltroutthanks cory_fu you just gave the office a chuckle ;)15:24
cory_fu:)15:24
=== frankban is now known as frankban|afk
sSeBBaSshi 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:16
xnoxi had broken my lxd, and now recovered. but the bootstrap node appears to have lost authentication with lxd18:25
xnoxsince the bootstrap container is generating18:25
xnoxApr 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+010018:25
xnoxis there a way to force juju to re-authenticate it self with lxd environment?18:25
xnoxi think i somehow need to reimport certificate.....18:38
xnoxbut i'm not sure which certificate juju in the bootstrap node is using18:38
xnoxi think https://jujucharms.com/docs/2.2/clouds-lxd-resources did the trick18:46
pmatulis_thank goodness for those docs19:26
balloonsNice!19:37
kwmonroe+1 pmatulis_ !!21:54
kwmonroeand +100 for backporting stable where it makes sense21:55

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!