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

* vino here00:17
=== cassiocassio_ is now known as cassiocassio
=== seyeongkim_ is now known as seyeongkim
=== markthomas_ is now known as markthomas
=== lonroth_scania_ is now known as lonroth_scania
=== WillMoogle_ is now known as WillMoogle
=== jamespage_ is now known as jamespage
=== hazmat_ is now known as hazmat
thumperjam: mostly lost ya04:11
jamthumper: yeah, was just coming around to ping you. will be right back04:11
veebersugh, can someone better versed in find/xargs tell me what I'm doing wrong? I just want the file name sans .py etc: "find . -name "assess_*.py" -print0 |  xargs -0I{} -n1 echo $(basename {} .py)"04:31
anastasiamaccan I plz get a review of   https://github.com/juju/juju/pull/8659?05:25
jammanadart: I've started looking at 8656, any chance you could look at 8660 ?06:41
jamanastasiamac: looking. though "similar PR" to what? can you link the PR it is similar to?06:42
anastasiamacjam: where r u seeing similar?06:43
anastasiamacjam: i don't understand what  r asking, i think...06:43
jamanastasiamac: in your PR description you say: "Similar PR to ensure"06:47
jambut I don't know what it is similar to06:47
jamanastasiamac: anyway, code reviewed mostly LGTM06:48
anastasiamacjam: my PR description says "simple"06:48
anastasiamacr u sure u r reading the same PR? :D06:48
jamanastasiamac: maybe I need glasses. :)06:52
jambut I swear I read it multiple times06:52
anastasiamacjam: must b one of these days \o/ thnx for looking :D06:53
manadartjam: Yep.06:58
jammanadart: just finishing up lunch, sorry I'm late08:33
rts-sanderhey I'm getting on update-series: "ERROR updating the application series is not supported by this API server"09:03
rts-sandereven though juju --version gives "2.3.7-xenial-amd64"09:03
rts-sanderwhich should be a feature of 2.3: https://jujucharms.com/docs/2.3/howto-updateseries09:03
rts-sanderso what am I doing wrong?09:04
rts-sanderguess I'm going to have to go with juju remove-application, and add it again with the correct series which is regrettable09:11
anastasiamacrts-sander: juju --version gives u a client version09:19
anastasiamacrts-sander: to get juju controller version, u'd need to run 'juju status'09:20
anastasiamacthat'll give u an "API server" version09:20
rts-sanderanastasiamac, ah now I'm getting 2.2.609:28
rts-sanderthere ya go09:29
manadartjam: Approved 8660 with one comment.09:48
jammanadart: thanks. removing hasPriority and changing the pretty function to print it out.10:37
manadartjam: What is point of the "juju/" prefixed alias?11:22
jammanadart: so that we are authoritative about what image we're pointing at. And also so people can change it and know that they aren't changing what "ubuntu/xenial" is, just that we are deciding what to use for juju11:41
jamthat said, the official name is actually ubuntu/xenial/amd64 IIRC11:41
jamballoons: for standup stuff. I've been reviewing manadart's patch for LXD. I'll probably still finish that up tonight. And then I've managed to get "juju remove-machine" working when you only have 2 machines left.12:19
jamand we did the Architecture review.12:19
jamand a bit of oracle review12:19
jammanadart: ^^ gabriel has pushed up the changes we asked for, so likely its ready to $$merge$$ the next one.12:20
manadartjam: I will look.12:20
manadartjam: BTW, The image *is* cached when you use CreateContainerFromImage, but without intervention it does not have the juju alias.12:24
manadartSo it gets picked up thereafter, but to get the local target,  you still need to use the remote server with the alias.12:24
manadartI am working a change now to copy the image and add the alias (rather like before).12:25
rick_h_kwmonroe: ping if you get a sec14:18
rick_h_anyone know on my k8s cluster doing the proxy and going to the /ui gets me a list of api endpoints vs the dashboard.14:27
rick_h_it was working, but not messed with it in a while. Did an upgrade on it today and so not sure what I might have borked14:28
erik_lonrothHello, anyone aware of whats happening with lxd cloudimages for bionic ?14:42
erik_lonrothhttp://paste.ubuntu.com/p/XBZ8GHCgJB/14:42
erik_lonrothI've tried to bootstrap a local lxd juju controller and fail every time14:43
pmatulis_erik_lonroth, why is it trying to look for Bionic? and why are you calling the controller lxd-xenial if you are expecting Bionic?14:50
erik_lonrothI'm sorry about the syntax. I've tried other commands and on our xenial node which was working perfectly yesterday14:51
erik_lonroth"juju bootstrap localhost" -> gives the same errors14:51
erik_lonrothCould this be somehow related to the mechanism (whatever it is) that points to like "current" or something else suddenly starting to point towards something that is neweer than before bionic release date ?14:52
pmatulis_erik_lonroth, what version of Juju are you running on the client?14:53
erik_lonrothI'm not at my workplace anymore so I can't check.14:53
erik_lonrothBut I know Its from ubuntu 16.04.414:54
pmatulis_erik_lonroth, do you use snaps or apt?14:54
erik_lonrothstandard "apt install juju"14:54
erik_lonrothI'm happy to file a bug report tomorrow, but I think you should be aware.14:55
pmatulis_ok, that will get you 2.3.7 if you installed within the last 48 hours14:58
pmatulis_which is the latest stable14:58
kwmonroerick_h_: what does your dashboard url look like?  also, what does "kubectl get po -n kube-system" say about the dashboard (if anything)?15:49
TheAbsentOnewhat is currently the right way to put information on a relation with the reactive framework? I don't find a relation-set function or anything in the api. Do I need hookenv.config and config['key'] = value or is there a better approach?16:10
pmatulis_erik_lonroth, fwiw, i just created a xenial LXD controller on my xenial client (running 2.3.7). all with 'juju bootstrap --no-gui localhost lxd'16:11
magicaltrouthttps://github.com/johnsca/juju-relation-mysql i borrow cory_fu_ 's mysql relation as my pattern for most stuff16:12
magicaltroutmostly cause he documents things much better than i do :)16:12
pmatulis_erik_lonroth, but --no-gui prolly doesn't matter16:12
magicaltroutactually on that note, cory_fu_ can you tell me what the new endpoints pattern is all about?16:13
TheAbsentOneyeah I find myself always looking back at that repo too magicaltrout hmm, I'll guess I'll just try it out later today16:14
kwmonroemagicaltrout: Endpoints are the evolution of the previous RelationBase16:14
TheAbsentOneI see, so relationbase is depricated as well kwmonroe ?16:15
kwmonroemagicaltrout: so if you previously had an interface provide/require subclass of RelationBase, you would switch that to Endpoint16:15
kwmonroeTheAbsentOne: endpoints are back compat with relationbase (at least for now -- not sure about the roadmap there)16:16
kwmonroemagicaltrout: endpoints are nice when writing reactive handlers for a couple reasons.. you don't have to worry about param ordering for the handler, eg, @when foo, bar; def handle(bar, foo).  you just always get the endpoint with endpoint_from_flag('foo').16:17
TheAbsentOneI see, another quick question. I'm still a bit confused on how the connection_string() function in the juju-relation-mysql works as it is described in the requires file and not the provides file16:18
TheAbsentOneThese are two different classes o.O16:18
kwmonroebetter endpoint docs than i could describe are here: https://charmsreactive.readthedocs.io/en/latest/charms.reactive.relations.html#charms.reactive.endpoints.Endpoint16:19
kwmonroeTheAbsentOne: you'll have 2 sides of juju-relation-mysql.  the provider is the mysql charm itself (which doesn't exist in a reactive form today, so don't go looking for it).  if it did exist, that charm would handle a client joining the relation by creating a new database and calling  provide_database (https://github.com/johnsca/juju-relation-mysql/blob/master/provides.py#L51).16:25
kwmonroeTheAbsentOne: the *consumer* of juju-relation-mysql would use the requires.py bits and would be something like wordpress, which needs to know what db mysql has created for it.16:27
kwmonroeTheAbsentOne: so in the consuming charm, you would have something like "@when mysql.available; def configure_db(); db = endpoint_from_flag('mysql.available'); conn_string = db.connection_string()16:28
TheAbsentOneOwkey I see so I completely had it the other way around, thanks a lot for that clarification kwmonroe !16:29
kwmonroenp16:29
TheAbsentOneso if you use reactive framework you will never create a provides.py? kwmonroe16:29
kwmonroenot quite TheAbsentOne -- if you are creating an interface layer (https://jujucharms.com/docs/devel/developer-layers-interfaces) you will always create the provides.py and requires.py.  if you are creating a reactive charm that uses an interface, the provider (mysql) will call the interface provides.py methods to effectively do "relation-set" and the consumer (wordpress) will call the interface requires.py methods to "16:33
kwmonroerelation-get" the stuff sent by the provider.16:33
TheAbsentOnekwmonroe allright, I will chew a bit on that and come back to you thanks man16:36
kwmonroeTheAbsentOne: sounds good.  the takeaway is that provides.py and requires.py are 2 sides of an interface that can be used by charms whether they're reactive or not.  the Endpoint class simply makes it easier to work with (ahem, react to) the data that's getting passed around.16:44
=== frankban_ is now known as frankban|afk
bdxkwmonroe: I was able to get a strawman working with hadoop <-> cephfs17:49
kwmonroenoice!17:50
bdxkwmonroe: my guys are dead set on using for the hadoop that will run in our openstack17:50
bdxI don't think its the worst idea17:50
bdxeither way, I'm going to be working on charming the bits over the next few17:50
kwmonroe"I don't think its the worst idea" <-- well there's a glowing recommendation if i ever heard one17:51
bdx:)17:51
rick_h_kwmonroe: howdy, so kube-system says kubernetes-dashboard-5bd6f767c7-5d7rc            1/1       Running            0          3h18:10
rick_h_kwmonroe: url is just the 127.0.0.1:8001/ui18:11
rick_h_and gets me https://www.irccloud.com/pastebin/RGCPnRZ2/18:11
kwmonroerick_h_: try replacing /ui with /api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy18:13
kwmonroethe latter is way easier to remember18:13
rick_h_kwmonroe: hmm, ok that worked18:14
kwmonroemy work here is done18:14
kwmonroesend bitcoins18:15
* rick_h_ now ponders wtf18:15
kwmonroerick_h_: see https://github.com/kubernetes/dashboard, NOTE:18:15
kwmonroeThe shortcut http://localhost:8001/ui is deprecated. Use the full proxy URL shown above.18:15
rick_h_well, that makes me sad for the world18:16
kwmonroerick_h_: how did you know to go to /ui?  i thought 'kubectl cluster-info' would show you the new url nowadays18:16
rick_h_kwmonroe: because the readme says so?18:16
kwmonroewhen you're paid by the character, you don't want /ui18:16
rick_h_To reach the Kubernetes dashboard, visit18:17
rick_h_http://localhost:8001/ui18:17
kwmonroeahhh rick_h_, fair enough.. if our readmes are borked, that's on us.  would you please file an issue at https://github.com/juju-solutions/bundle-canonical-kubernetes/issues18:17
kwmonroeyou can keep your bitcoins... for now.18:17
rick_h_kwmonroe: I liked the readme version better18:18
kwmonroelol18:18
kwmonroeif only readmes made it so18:18
rick_h_and when I did try the cluster-info I felt like that failed for some reason. /me goes to look wtf18:18
rick_h_ah, that's right, that doesn't use the proxy url so you get "message: "services "https:kubernetes-dashboard:" is forbidden: User "system:anonymous" cannot get services/proxy in the namespace "kube-system"","18:18
rick_h_so you have to mix the two, use the localhost domain, but the rest of the url so you can get to it18:19
kwmonroeyeah, duh.18:19
cory_fu_magicaltrout, kwmonroe, TheAbsentOne: Sorry, I was on my chromebook which doesn't give me notifications for pings and I missed that whole convo.  Sounds like kwmonroe explained things well, though I haven't finished getting caught up.18:53
kwmonroecory_fu_: please correct as needed.  i tried to summon your voice in my head with everything i typed, but still good to get it straight from the horse.18:55
cory_fu_magicaltrout, kwmonroe, TheAbsentOne: One thing I did want to clarify that kwmonroe said is that you can use endpoint_from_flag with RelationBase style relations as well.  Honestly, charm authors shouldn't care how interface layers are implemented, so they will always be compatible.  But yeah, you can now just have no-arg handlers and always use endpoint_from_flag (or relation_from_flag if you like that better, but it's deprecated and the18:55
cory_fu_terminology of the former is more precise)18:55
cory_fu_The main benefit of Endpoints vs RelationBase is that you don't have to worry about scopes or conversations or any of that mess.  You always just iterate over self.relations[*].units and access unit.received (or received_raw for older interfaces), or you can use self.all_joined_units.received if you don't care which unit the data comes from.18:57
cory_fu_Or iterate over self.all_joined_units, etc.  There are several convenience views to hopefully make whatever use-case as natural as possible18:58
kwmonroeoh yeah cory_fu_!  i told magicaltrout that there were a couple reaons why endpoints were better, but only mentioned how nice it is to have no-arg handlers.  the other was for sure the paving over of scope/convos.  in fact, i'll always believe you pioneered this pattern so i would stop asking you if my interface was global or unit.19:01
cory_fu_If you're familiar with the RelationBase pattern, using self.all_joined_units.recieved is analogous to scope=GLOBAL, using self.relations[*].joined_units.received is analogous to scope=SERVICE, and iterating over self.all_joined_units or iterating over self.relations[*].joined_units is like scope=UNIT.  Something like that19:03
cory_fu_Switching to Endpoints from RelationBase should hopefully be pretty painless, and mostly just involve getting rid of the confusing bits in favor of using those more explicit collections19:04
TheAbsentOnecory_fu_: thanks for bringing it up. It's still a maze for me but I hope I will get there. I talked yesterday with magicaltrout about my project btw: if you are interested and you have the time to look at it, I would love some recommendations on how to approach it all: https://www.dropbox.com/s/adiyp4qqkx4wg3i/Charm%20prototypingv0.pdf?dl=019:04
cory_fu_kwmonroe: Oh!  Another big thing is you no longer need @hook at all, which also makes them work with upgrades from non-reactive charms to reactive, where RelationBase failed miserably19:05
TheAbsentOneYou know what I kinda miss in the whole reactive pattern + writing charms. A "state of the art" example that or roadmap. I hope to document my project in such a way, hopefully it can be used as some sort of tutorial or something19:05
kwmonroeTheAbsentOne: if you do that, rick_h_ will feature you on the juju show and probably send you bitcoins.19:06
TheAbsentOneHaha xD no need for that as long as I end up with a working thing I would be the happiest guy on earth19:07
TheAbsentOnekwmonroe cory_fu_ the juju show is every 2 weeks right? You guys know by heart if there was a show about libjuju?19:29
kwmonroeTheAbsentOne: yup, every 2 weeks.  i don't recall libjuju being featured off hand, but maybe rick_h_ or cory_fu_ would remember.19:32
cory_fu_kwmonroe, TheAbsentOne: I know we've talked about it in the past, but I don't recall in what depth, nor exactly when it was.19:33
TheAbsentOneThat's ok!19:34
cory_fu_TheAbsentOne: Looking over your PDF, making a generic database interface protocol is a really good idea but I think if you can create the interface, ideally you would want to update the individual database charms to support it directly rather than requiring a proxy charm to relay the relation data.19:39
cory_fu_Also, there's something to be said for the inherent typing that the different interface protocols provide... Not every application will realistically work with just any DB, especially for ones as different as MongoDB is from relational DBs19:40
TheAbsentOnecory_fu_ thanks for looking into it! Hmm I kinda don't want to edit existing charms + I really want to have the option to have multiple charms to connect to 1 and the same database.19:40
cory_fu_Sure, I can see that.  Updating the existing charms can be intimidating, and there's nothing wrong with having a proxy charm as a first step, but I just wanted to say that getting the charms updated would be the ideal end-goal, to me.19:41
TheAbsentOnecory_fu_ correct but my "proxy charm" should find out from data on the relation what specific service should be used19:41
TheAbsentOneah I see gotcha19:41
cory_fu_TheAbsentOne: One of the benefits of modelling software in Juju is that it's easy* to look at the model diagram and see what applications have relationships and thus dependencies on which other applications.  The abstraction layer of the proxy charm seems appealing, but you end up not knowing what applications are actually using mysql, postresql, mongo, etc. which can make it harder to reason about load, usage patterns, security, etc.19:44
cory_fu_*: for some definitions of "easy"  ;)19:44
TheAbsentOnecory_fu_: my goal of the "generic-database" charm is based on 3 things: 1 that he can determine what service needs to be used by the consumer charm, 2 that he acts as a proxy to relay information from existing charms to consumer charm and 3 if a new consumer comes in and wants to use it all he needs to do is add a relation and all information is already there19:44
TheAbsentOneThat is a really good remark there, and I realised I was trying things with juju that it wasn't really designed for when theorycrafting19:46
TheAbsentOneThen again the focus I have is to create a charm that "stupid users without operational knowledge" can use without being bothered by different technologies, their setup and their connectionstrings19:47
cory_fu_TheAbsentOne: But don't let me naysay your idea. :)  What you're proposing is certainly possible and I know there are cases where it would make operational management easier.  You should just also keep in mind what your trade-offs are.  :)19:47
TheAbsentOneI will keep you posted cory_fu_ and probably ask for in depth technical questions as I'm really a noob when it comes to writing python code for the charms and interfaces x) I appreciate your thoughts!19:48
cory_fu_TheAbsentOne: kwmonroe and I started going down a similar thought route with the big data charms at one point, starting to come up with ideas about service discovery and a central hub for big data components.19:48
cory_fu_TheAbsentOne: Happy to help, any time19:49
cory_fu_TheAbsentOne: Regarding your questions toward the end, it's definitely a good idea to keep interface layers as simple as possible.  Really, the interface layer should just be there to provide a structured API over top of the data that goes over the wire and give you room to change that data if needed without breaking the API19:51
TheAbsentOneI see, that's pretty close in terms of approach/goal. I hope to get a working proof of concept real soon (although it will seem really inefficient without libjuju as all supported database services need to be up and running)19:52
TheAbsentOnethat's good to hear, I guess that's the first step to properly work on the interface layer ;) I'll let you review it real soon cory_fu_19:52
TheAbsentOneand all others here ofcourse19:52
cory_fu_TheAbsentOne: As for removing relations from within charms, it's definitely not possible without essentially providing the charm with credentials for Juju and using something like libjuju to drive it.  You're essentially describing an operator charm (an autoscaler would be another example), which is possible but again requires giving your charm access to the Juju controller that it doesn't get out of the box19:52
cory_fu_TheAbsentOne: The beta version of Juju now has a concept of granting "trust" to give a charm access to cloud credentials to talk directly to the cloud API.  The logical next step would be something similar to allow the charm to talk to the Juju API.  The Juju GUI would be a good candidate for that, along with things like autoscalers and your charm19:54
TheAbsentOneYep that's what I thought and found when browsing the docs and stuff, so I hope to look at libjuju but that's on another whole new level19:54
TheAbsentOnethat would be really interesting19:55
TheAbsentOnecory_fu_: Is libjuju hard to use and is such an operator charm hard to write on top of an existing charm?19:56
TheAbsentOneso in other words if I have a charm that does my stuff pretty good could I use libjuju and add that functionality?19:57
arosalesHappy 18.04 release day :-)19:57
cory_fu_TheAbsentOne: Well, I'm probably a bad one to ask, as I work on libjuju quite a bit, so it doesn't seem too hard to me.  ;)  But it does use the async pattern, which can be confusing if you're not familiar with it.19:57
cory_fu_arosales!  o/19:57
TheAbsentOneWelp good to know I will just ping you a lot if I reach that point x) thanks again cory_fu_19:58
arosaleswaves to cory_fu_19:58
TheAbsentOnebig day arosales ! ^^19:59
cory_fu_TheAbsentOne: In general, though, I don't think libjuju is terribly hard to use.  The examples/ directory has some good examples, such as this one: https://github.com/juju/python-libjuju/blob/master/examples/credential.py20:00
arosalesTheAbsentOne: indeed, LTS! :-)20:01
cory_fu_TheAbsentOne: And the docs have examples for adding and removing relations: https://pythonlibjuju.readthedocs.io/en/latest/narrative/application.html#adding-and-removing-relations20:01
TheAbsentOnecory_fu_: great, I will bookmark these and I pray I will use them in the near future x)20:03
kwmonroeTheAbsentOne: i find it better to open tabs for required links without bookmarking them.  that forces you to read them before you browser crashes (assuming you don't have a tab resumer -- best to disable that in this case)20:06
kwmonroe;)20:06
magicaltrouti've had D and Julia tabs open in my firefox browser since i was in DC in january20:07
magicaltroutit keeps crashing20:07
magicaltroutand they keep coming back20:07
kwmonroeahoy arosales!  i assume you're bionic as ever.20:07
TheAbsentOnehaha I'll keep that one in mind kwmonroe xD20:08
kwmonroeyeah magicaltrout, these new fangled browser innovations are fueling my procrastination20:08
kwmonroe"tab suspended since Nov 2016"... i'm sure i'll get there soon.20:08
arosalesThere are tooo many jokes, mostly not in a good taste, for Bionic Beaver20:08
arosalesGreat Suspender!20:09
kwmonroei learned it from watching you arosales.  never before had i seen 700 tabs open until i watched you present.  i thought "no way that browser stays up", then i learned of your suspenders.20:10
kwmonroebeen not reading things ever since20:10
arosalesGlad I had such a positive effect on your procrastination20:11
magicaltroutdon't get him procrastinating more...20:12
arosalesmagicaltrout: all you need to do is fuel him with cheap beer20:14
arosalesmagicaltrout: that _does_ have diminishing returns though20:14
magicaltrouti know... gone are the days when you used to take us to nice joints arosales ... all i've got left is kev and cheap beer ;)20:15
arosaleslol, always good to see folks put kwmonroe and cheap beer in the same sentence20:15
magicaltroutand thats tricky cause cory_fu_ still refuses to drink beer...20:15
arosalesmagicaltrout: we will have to make our own conference featuring unicorn tears for beer20:16
magicaltroutsounds like an excellent plan20:16
arosalesoh cory_fu_ you have to fuel with top shelf bourbon20:16
magicaltrouti know20:17
magicaltroutone day it'll bankrupt me20:17
cory_fu_lol20:17
magicaltrouti told him i'll supply him hats to offset the lack of affordable bourbon20:17
arosalesonly fedoras20:17
magicaltroutyeah20:18
magicaltroutposh git20:18
veebersMorning all o/20:33
thumpermorning20:38
magicaltroutcan we have a straw poll herer21:16
magicaltrout-r21:16
magicaltrouthere's more wrong me or marco21:16
magicaltroutcan't type21:16
magicaltroutwho's more wrong21:16
magicaltrouthttps://github.com/marcoceppi/charm-mysql/issues/25#issuecomment-38479123621:16
magicaltrouthttps://jujucharms.com/mysql/5821:16
magicaltroutoh he seems to suggest the fix is in candidate not the zesty support21:19
magicaltroutmakes a bit more sense21:19
TheAbsentOneWelp i'm off to bed, talk to you all in a few hours!21:34
wallyworldvino: standup?23:18

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