/srv/irclogs.ubuntu.com/2017/05/10/#juju.txt

xavpaiceI'm just about to do a mgopurge of a site running 2.1, and hear rumor that we don't need to stop the state server beforehand - is that the case?00:52
xavpaiceh00pz, first thing to do is request the ability to change the name of a charm for a running application without redeploying the application00:53
h00pzxavpaice, yah im already building my own bundle, next step, make charm names smaller cuz00:55
xavpaiceat least you can deploy apps with any name you like00:57
* xavpaice was pointed at https://github.com/juju/juju/wiki/MgoPurgeTool which has everything I might need00:58
erik_lonroth3When I'm setting states "set_state('foo.bar') ... am I also required to remove that state when I'm done with it? As I understand it, a "state" is something that otherwise is persistent for the charm until its removed?07:30
kjackalGood morning Juju world!08:11
kjackalerik_lonroth3: Yes, "foo.bar" is more like a flag that you can raise and lower. It is not automaticaly unset, it is not en event08:12
kjackalHi rick_h, I heard you showed some interest in the Instana charm PoC. https://jujucharms.com/u/instana-charms/instana/  and https://instana.atlassian.net/wiki/pages/viewpage.action?pageId=1563037608:44
kjackalThis charm is just a PoC that Instana can iterate on. If you want to fill up some slot in the some upcomming juju show, I can help.08:45
erik_lonroth3kjackal: thanx08:52
erik_lonroth3Also, I'm trying to understand how to differentiate between hooks and states. Its kind of hard to get a good grasp about how it works.08:54
erik_lonroth3I've understood that hooks are run by juju as part of some kind of cycke. Byt which are those and how can I access states from different components etc. there are alot of questions and I can't really get my head around the reactive framework08:55
kjackalerik_lonroth3: Since you are using the reactive framework you should really not use hooks.09:14
erik_lonroth3I know, but I'm perplexed about which states exists, and how I can use them etc. For example. How would I find out which states a different charm is in?09:15
erik_lonroth3... is states.09:16
erik_lonroth3or09:16
kjackalerik_lonroth3: The way I understand it is that hooks are essentialy executable files under the /hooks dir. Juju will call these hooks at the right time throuout the lifecycle of the infrastructure09:16
erik_lonroth3I have  understood that "hooks" are run aswell as setting reactive states.09:16
erik_lonroth3juju seems to do both things.09:17
kjackalerik_lonroth3: reactive takes over the hooks and from then on you are programming the lifecycle of your infrastructure using states09:17
erik_lonroth3I'm looking for the equivalent to "d_relation_joined" state.09:17
erik_lonroth3db_relation_joined09:17
erik_lonroth3Yes, I understand that part. But all the hooks that exists - do they have a corresponding state?09:18
kjackalNo, hooks and states are seperate. Let me give you an example09:19
erik_lonroth3getting coffee09:19
erik_lonroth3=)09:19
erik_lonroth3back09:20
kjackalYou have two charms. MariaDb and and Media wiki. THese two charms use the mysql interface09:21
kjackalif you go to http://interfaces.juju.solutions/ and look for the mysql interface you can end to the git repo09:21
kjackalHere it is: https://github.com/johnsca/juju-relation-mysql09:22
kjackalInterfaces is the only place where hooks and states are mixed. This gives you an understanding how these two work together09:23
erik_lonroth3I'll take a look09:23
kjackalHave a look here: https://github.com/johnsca/juju-relation-mysql/blob/master/provides.py#L2609:23
erik_lonroth3I'm trying to write a charm that uses a postgresql database. I haven't got it to work yet since I'm struggeling understanding how to use the interfaces, states etc.09:24
kjackalThe joined method of the interface will be called when the @hook('{provides:mysql}-relation-joined') is triggered09:24
=== vds_ is now known as vds
kjackalthe join method of the interface will set the state conversation.set_state('{relation_name}.database.requested')09:24
erik_lonroth3let me read.09:25
erik_lonroth3I'll look and come back. Thanx alot for helping me!09:25
kjackalHere is the example code to be used for pgsql interface: http://interface-pgsql.readthedocs.io/en/stable/requires.html#example-usage09:26
kjackalerik_lonroth3: hope it is uptodate ^09:27
ZiclazyPower: just did a quick "real test" : I stopped the VPN between FR (which have kubernetes-master machine and some kube-dns pods) <-> US (some kube-dns pods also) and on FR, all resolving through kube-dns are OK, for US however, resolving works sometime, sometime not... (I think it works when the kube-dns service throw a resolving demand to a kube-dns pod @US, and don't work if it throw to FR kube-dns pods)09:42
Zicso, in my case, it's a bit a disaster :(09:42
Zic2 points of presence are tied together09:42
Zicdon't know if something exist for this kind of case except the kube-fed09:43
kjackalHi Zic from a high level perspective your setup better fits to federation09:47
Zicyup, I'm waiting it on CDK, I know it's already planned very soon :)09:48
Zicbut for now, I don't know what can I do to mitigate this effect :/09:48
kjackalZic: kubefed 1.6.2 is already snapped and we are working on lighting up this scenario but we are not there yet09:48
magicaltroutwork faster!09:49
Zichuhu09:49
kjackalstop interupting me magicaltrout lol09:49
Zicand my tests was pointed to kube-dns, actually I think I have the same problem with all K8s services: the're not updated with the remaining pods on US09:52
Zicthey all continue to forward to FR+US instead of just US, as the master located in France cannot send the update information, afaik09:52
Zickjackal: do you know if converting an existing CDK cluster to a "one of" kube-fed CDK clusters will be possible?09:54
Zicor do I need to restart from scratch and build a new CDK with kube-fed clusters?09:54
Zic(rephrasing my question: do you know if such a scenario is planed to be supported in the future Juju scenario of kube-fed)09:54
ZicCDK classic cluster -> CDK clusters, part of a Federation with a new CDK cluster09:55
kjackalZic converting a cluster is a resonable ask. We are looking at what is the most frictionless path.09:57
Zickjackal: in fact, I will let the FR cluster as it is, and deploy a new one, with a full controll-plane at US10:03
Zicthen linking them through a Federation10:03
Zicanyway, for what can I done, I'm thinking about two completely separate cluster in waiting of kube-fed, it's maybe a better way10:03
Zics/done/do/10:04
rick_hkjackal: ty, I'll see thanks. I was looking through recently updated charms in the store and ran across it and thought it was cool11:07
lazyPowerZic:  i'm not sure i follow12:49
lazyPowerZic: help me understand the conundrum with the US DNS scenario12:49
lazyPowerZic: ahhhh, i think i'm understanding. As these two clusters are feeding from the same etcd backend, you're getting dns entries that point to services in BOTH clusters12:50
lazyPowerZic: is that consistent with your findings?12:50
lazyPowererik_lonroth3: are you moving forward now with a better understanding of states?12:53
lazyPowermagicaltrout: you scallywag :P12:53
erik_lonroth3I'm going to work more on it later today as I had to do another thing just nu.12:53
erik_lonroth3now12:54
magicaltroutjust telling kjackal to do some work for a change!12:54
lazyPowererik_lonroth3: ok. When you progress into looking at that deeper dont hesitate to ping either myself or kjackal. I've done a fair amount of charm training and relationships + states are arguably one of the harder concepts to grasp because it touches both the old-world of hook based programming, and the new world of state based programming.12:55
magicaltroutnooooooooooooooooooooooooooooooooooooooooooooooooooooo12:55
magicaltroutnot hooks ;'(12:55
lazyPowermagicaltrout: you have to deal with hooks to set the proper states :)12:55
lazyPowerand you know this12:55
erik_lonroth3Yes, I think thats what confuses me alot. Also read that the old "hook" framework will go away, which makes me hesitant to even use "hooks" in my code.12:55
* magicaltrout pretends hooks don't exist. Its worked well so far12:55
lazyPoweras far as i know we're not removing the hooks. Thats still a baseline juju primitive12:56
magicaltroutkjackal is quite primitive12:56
lazyPowererik_lonroth3: and disregard magicaltrout, someone yanked his chain this morning...12:56
magicaltroutits 2pm12:56
lazyPowerits 8am in KC MO12:57
lazyPowertime zones are not a thing12:57
magicaltroutyou're trying to tell me kjackal isn''t primitive?12:57
magicaltrouthmm12:57
magicaltroutmaybe primal then12:57
lazyPowerwell thats debateable12:57
lazyPoweri'll cede to that12:57
magicaltrouthehe12:57
lazyPowersomething something greek geeks something something ;)12:57
kjackalLOL!!! You people are crazy!12:59
lazyPower:D13:01
ZiclazyPower: yup, FR have all the controlplane (kubernetes-master, etcd, easyrsa, kubeapilb) + kubernetew-worker, US just have kubernetes-worker13:11
Zicif the VPN go offline between FR and US, Kubernetes services components is buggy, as they continue to forward some request to FR pods from US13:12
Zic(which cannot, as VPN is dead)13:12
ZicI think there is no local system at kubernetes-worker which check if all pods of a service is alive, it's only the master & etcd which have the info13:13
lazyPowerZic: yeah, thats not something we can directly support today without making modifications to upstream13:17
lazyPowerthe expectation there woudl be to run a control plane with independent etcd backends per cluster, and use federation13:18
lazyPoweryou're on teh right path with the analysis this morning13:18
lazyPowersorry I didn't catch that before, i clearly had not devoted enough braincells to the question when it was originally posed13:18
ZicI think I will do some GeoDNS magic which said "if VPN goes down, switch US traffic to FR" in waiting kube-fed as part of CDK :)13:19
Zicit's not the best way, but it can mitigate this issue13:19
ZiclazyPower: as I questioned kjackal this morning, do you plan converting an existing CDK cluster to be part of Federation cluster in the next Juju scenario with kube-fed? or should I plan a new cluster(s) to switch to the fed model?13:22
lazyPowerZic:  you would need to redeploy the US cluster as its bound to the current FR control plane13:23
lazyPoweryou might be able to just unrelate and deploy a new CP and then relate to the new CP13:23
lazyPowerbut tahts not something I have tested personally.13:23
lazyPowerand i hesitate to say its a good idea to mix stale state with new state.13:24
ZiclazyPower: the US cluster is just AWS instances, no problem to respawn from scratch here :)13:24
Zic(it's more the FR part, which is a composition of VMware and physical servers)13:24
Zicif I can just juju delete-machine all US, then deploy a new CDK cluster to US and tied it to FR via kube-fed, it will be cool :)13:25
rick_hReminder: Juju show at 2pm EST today!13:29
lazyPowerZic: thats the integration path i would propose. We can certainly work with you to test teh feature when its in alpha state to ensure it covers your needs14:09
lazyPowerkjackal: I'm going to cc you on this as we have a stakeholder for the feature now14:09
SimonKLBhey folks! im currentinly in the process of writing a charm to support more advanced forms of configuration which is currently not possible (in a nice way) when only using the normal charm config14:19
SimonKLBi would love to use subordinate charms for this but, from what i can see, those are restricted in that they are not removable14:19
SimonKLBwhat is the exact reason for this and would it be possible to make them more flexible in the future?14:20
lazyPowerping rick_h ^14:20
lazyPowerrick_h: i know this was a topic we've visited in the past but I do forget the reasons why they are so tightly coupled.14:21
kklimondaI've had to increase timeout on lxd waitready (and lxd upstart service file) -- right now it's 600 seconds. I /believe/ that service was hitting this timeout and some containers were not starting randomly, but I'm not 100% sure (could be a placebo for all I know) - is this something that someone else have ever seen?14:24
lazyPowerkklimonda: not in my experience but i'm sure there's hardware factors at play there14:27
lazyPowerfor example i tend to put my lxd machines on ssd's backed by either btrfs or zfs for fast cloning14:27
rick_hlazyPower: SimonKLB it's the case of hulk smashing. We can't promise they remove and leave the state like they started. It's like hulk-smashing. It's not promised in the model tbh14:33
SimonKLBrick_h: how is it different from a poorly written stop hook in a normal charm? i could see how a normal charm could leave the model in a mess as well if you dont clean everything up properly?14:35
SimonKLBor what makes the subordinate more invasive in that regard?14:35
rick_hSimonKLB: because that's put into a container or on a machine that when torn down goes away14:37
rick_hSimonKLB: I admit it's not a perfect system. There's room for improvement. However, it's a bit tough to promise the model is good and solid in some situations and subordinates are one of those.14:38
SimonKLBrick_h: are there any differences between co-locating two charms on the same machine and subordinate charms?14:39
rick_hSimonKLB: right, but we strongly suggest folks don't hulk smash for the same reason14:39
rick_hSimonKLB: and push using lxd containers and the like14:39
SimonKLBrick_h: so right now i do `juju deploy X` and `juju deploy Y --to [machine with X]` which works fine, the reason i would like to use subordinates is that you wouldnt have to know the location of X and if you add another unit of X, Y would automatically get installed there as well14:41
rick_hSimonKLB: definitely and agree that it's what they're for14:41
rick_hSimonKLB: but they carry some extra though on how clean things will be if you're adding/removing them14:42
SimonKLBif the only reason for not making stop available for subordinates is that it could leave a mess behind, i dont see why co-locating multiple charms on the same machine is allowed either?14:42
SimonKLBor am i missing something?14:42
rick_hSimonKLB: it's allowed but not recommended. Almost all bundles in the store don't do it. It's not "good practice"14:42
rick_hit's like installing your application and the db on the same machine14:43
rick_hsure, you want to do it for testing/etc14:43
rick_hbut it's not helping with best practices14:43
rick_hSimonKLB: so subordinates can do it, but they're not ideal in that they don't remove cleanly and juju shows that.14:43
rick_hSimonKLB: like I said, it's the history. I'm not saying it can't be made better14:43
rick_hSimonKLB: basically I'm just telling you how it got to where it is.14:43
SimonKLBrick_h: yea i see why it's a bad habit of co-locating stuff like that, but im sure there are going to be cases where deploying an extra machine would be unecessary, especially for "add-on charms" like this14:45
SimonKLBadd-on charms, that you want to be able to add _and_ remove that is14:46
rick_hSimonKLB: and so we fully support it in subordinates. Please use them. We do all the time for things like the landscape client, nagios, etc.14:46
SimonKLBwait, so removing subordinates is possible?14:46
rick_hSimonKLB: no, you can add them and setup add-on charms.14:47
rick_hSimonKLB: but if you want to remove and change that thing you need to rebuild it with a new deploy14:47
rick_hSimonKLB: by all means, file a bug (there might be one) and we can look at improving things14:47
SimonKLBrick_h: that would be for juju core?14:47
rick_hSimonKLB: sure thing. https://launchpad.net/juju14:48
SimonKLBrick_h: would it be best to propose a new type of charm-type or should i push for stop hooks in subordinates?14:48
SimonKLBim worried that trying to get stop hooks in subordinates would have a lot of pushback since that could break a lot of the current setups14:49
rick_hSimonKLB: improving subordinates to act like a full application sounds like a starting piont14:49
rick_hSimonKLB: basically I'd focus on the pain point.14:49
rick_hSimonKLB: e.g. why is the lack of removing them causing you issues14:49
SimonKLBrick_h: alright, ill give it a shot! :) thanks14:49
rick_hSimonKLB: np, thanks for the feedback!14:50
bdxsome grumbling going on at a kubernetes workshop about how their workshop doesn't work on ubuntu, but it works on windows ..... https://github.com/apprenda/kubernetes-workshop15:39
bdxand osx15:43
bdxwhat haters15:43
rick_hbdx: any hint as to what's broken?16:05
bdxrick_h: I'm inquiring16:12
bdxrick_h: looks like some compiled "provisioning" bins16:13
rick_hbdx: yes looking at their stuff its all compiled so not immediately obvious why they'd hit.16:14
bdxhttp://imgur.com/a/awIAW16:14
lazyPowerSimonKLB: rick_h - i can say that during my pilot of the dex charm - i opted for snap packaging as my delivery format and being able to snap remove and have an atomic operation that just wiped it out from the machine was a pleasant experience.16:31
lazyPower(hours later)16:31
bdxrick_h: I've spotted some things that would cause the docker file to fail on ubuntu16:34
bdxhttps://github.com/apprenda/kubernetes-workshop/blob/master/DockerFiles/web/Dockerfile#L616:35
bdxhttp://paste.ubuntu.com/24549762/16:35
bdxxenial at least ... I think nginx in trusty still has an nginx conf there16:36
bdxnot sure if that RUN cmd failing would bork the whole dockerfile or not16:37
bdxnah, the conf doesn't exist in /etc/nginx/conf.d in trusty either16:38
bdxI bet there are some other small gotchas like that16:38
bdxbut I guess thats different then the workshop actually running on ubuntu16:47
SimonKLBlazyPower: yea if there was some kind of payload i would probably just integrate it into the charm, but in the case of the charm im currently building it's more about using juju stuff such as interfaces, actions and the config16:59
=== ejat_ is now known as ejat
rick_h20min to juju show #12!17:41
=== frankban is now known as frankban|afk
rick_hhttps://www.youtube.com/watch?v=oJukQzROo-Q to watch17:47
rick_hhttps://hangouts.google.com/hangouts/_/jurpmjck7ffwhpi2coqxwpl4aye to participate and get your camera/mic working17:47
tychicusrick_h: thanks17:48
rick_hhatch: jrwren lazyPower kwmonroe ^17:50
rick_hbdx: magicaltrout as well if you're feeling chatty today ^17:51
rick_hhatch: you coming today?17:59
bdxthat "accounts" page is awesome!18:13
bdxthat will be a great place to track ssh keys too18:14
bdxwhen ssh keys become user sensitive18:14
zeestratrick_h: How many more beta/rc's are you aiming for 2.2?18:16
rick_hzeestrat: I'm honestly not sure. I definitely think there's at least one more beta coming18:32
Merlijn_SDamn, we have to push more of our charms, we do have a reactive non-subordinate jupyter charm, but it's not in the store for the moment..18:35
rick_hMerlijn_S: doh!18:39
rick_hMerlijn_S: well I might know an italian professor interested in checking it out :)18:40
Merlijn_Shaha, I'll contact him. It's also heavily used by my colleagues for teaching18:41
rick_hMerlijn_S: yea, it seems perfectly awesome for that. I wonder if we could pull off some sort of juju/charmschool with it18:42
Merlijn_Sit also has an auto-generated xkcd password (to stop students from cheating ;)) maybe less relevant for charm schools :)18:43
rick_hlol18:43
rick_hhave to love open source ops, the great features you get baked in!18:43
lazyPowerMerlijn_S: I have some updates for che incoming18:45
Merlijn_SAwesome!18:46
lazyPoweris whats in tengu-team's master the latest effort or is there more i've not gotten?18:46
rick_hMerlijn_S: I was going to do a blog post around this charm, if you guys push yours up I'd appreciate it so I can compare and maybe adjust the focus there a bit18:46
Merlijn_S@rick_h https://jujucharms.com/u/tengu-team/jupyter-notebook/018:46
rick_hMerlijn_S: hah, that's some fast service! :)18:46
* lazyPower notes charm push vs lp push... the day we finally got to party in real time18:47
Merlijn_S@lazyPower master is the latest, I haven't touched it in a while18:47
lazyPowerMerlijn_S: ack. I have s'more ideas but i'm light on time to contribute them. I will however fix the immutable config since 5.9.1 has some serious UI/UX improvements <318:47
* rick_h notes Merlijn_S might not have set perms since he can't see it18:47
Merlijn_S@rick_h can you see it now?18:56
rick_hMerlijn_S: bingo ty much!18:56
Merlijn_S@lazyPower I would really like to have the charm always install the latest, but Che is changing so fast that they break the charm quickly..19:00
lazyPowerwell tbh it works with the nightlies19:00
lazyPowerbut i'm not exactly using your stack anymore because everything i push to github is initially owned by you19:01
lazyPowerhttps://github.com/juju-solutions/layer-dex/commits/master19:01
lazyPowerall that boilerplate credit :D19:02
Merlijn_SOw, that's an issue :)19:03
Merlijn_SAny idea how to fix this?19:03
lazyPowerThe only thing i can figure is to omit the .git from that boilerplate19:03
lazyPowermake the end user initialize the repository19:04
lazyPowerthat or just own all the boilerplate coming from teh che charm and enjoy having bloating GH stats19:04
lazyPowereither way is fine :) i'm just on a quest to really figure out how this is put together so its more useful when i'm on my chromium book19:04
Merlijn_SIt's been a while since I looked at it, but from what I can remember, che insists on it being a git repo. Che pulls that from github during project creation19:04
lazyPowerah, that makes sense19:05
lazyPoweri've started initializing a blank stack and go from there19:05
lazyPowerthe workspace snapshots seem to do a good enough job of perserving state that i'm not redoing config management everytime i spin up the container19:05
Merlijn_SPS: I've been working on documentation for getting started with developing for-and-in JaaS: https://ibcnservices.github.io/tengu-docs/use/eclipse-che.html19:05
lazyPowerkick butt! That's a nice start19:06
Merlijn_Susers can start charming on JaaS without ever leaving their browser19:06
lazyPowerrick_h: ^19:06
rick_hMerlijn_S: very cool. Will look it over.19:06
Merlijn_SWould be nice if we could have a way for che to import the credentials of the model/user that deployed che19:07
Merlijn_SThe "controller" relationship might come in handy here19:07
lazyPowernow you're cookin19:07
lazyPowerthat's what i'm talkin bout19:07
rick_hMerlijn_S: heads up some docs changes will be going live hopefully tomorrow https://github.com/juju/docs/pull/182619:08
rick_hMerlijn_S: yea the representing a controller as an application will be awesome.19:09
Merlijn_S@lazyPower: you were the one that talked about connecting the openvpn charm to an SDN-type thing right?19:12
lazyPoweryep19:12
Merlijn_SWe're running into an issue with the openvpn charm where it doesn't correctly push the routes to the GCE network, because each GCE VPS is in a 255.255.255.255 subnet.19:13
lazyPowerhmmm19:14
lazyPoweris it how openvpn is configuring itself? like is it hard coded to 255.255.255.0?19:14
Merlijn_SSo we're looking for a way to tell the VPN charm what networks are attached to the server. If we create a relationship that allows another charm to tell the vpn charm what networks it is attached to, is that something you could use to connect an SDN to the charm?19:14
Merlijn_SThe charm triest to figure out what networks it's connected to based on the output from the puppet `facter` tool19:15
Merlijn_Sbut that fails on GCE because each GCE VPS thinks it's the only server connected to that network. GCE does some funky trickery with the default gateway or smth to make it work19:16
lazyPowerMerlijn_S: i think so. I can try to strawman something between openvpn and flannel when i'm not up to my eyeballs in kubernetes features19:17
lazyPowermaybe a friday lab19:17
lazyPowerthe basic bit would be adding the route to openvpn incoming from flannel, and then making sure that route is connected and its subnet is accounted for19:18
lazyPowerthe rest should be automagic19:18
Merlijn_SHm, so would you need anything from the openvpn side? What would that relationship look like?19:19
lazyPowerit should only need to pass its network configuration over19:22
lazyPowersuch as cidr19:22
lazyPowerthe rest we can probe from route19:22
kwmonroehey petevg, wadda you make of this?  http://paste.ubuntu.com/24550557/ -- i def have bt-0.12.0 on the system and verified this commit is in place:  https://github.com/juju-solutions/bundletester/commit/96f323abd81c537b99612a8fab3cf2fcf41170f519:28
petevgkwmonroe: That's bad.19:30
petevgkwmonroe: that var should just default to a falsey value (that's the default behavior of the argparser lib)19:40
petevg... I have no idea why it wouldn't be doing so.19:41
petevgkwmonroe: are you calling bundletester from a cli, or are you invoking it in some other way?19:41
kwmonroepetevg: it's cwr that's calling bt, sorry i didn't show the invocation before:  http://paste.ubuntu.com/24550619/19:42
petevgkmwonroe: that's the problem. cloud weather report runs the tester class of bundletester directly, but it doesn't bother to setup the args.19:47
petevgkwmonroe: two solutions:19:47
petevg1) Make cloud weather report exercise bundletester's arg parser (not great).19:48
petevg2) Pass in "no-matrix" explicitly when invoking bundletester from cloud weather report.19:48
petevg... or "no_matrix". I think that the dash has been converted to an underscore by the time we invoke the tester.19:48
kwmonroeack petevg, i'll give option 2 a whirl shortly19:50
petevgCool. thx, kwmonroe.19:50
Merlijn_S@rick_h I have some more feedback on the getting started page. Where can I put that?19:53
rick_hMerlijn_S: shoot me an email and I'll work it into next doc updates I've got going on.19:54
rick_hMerlijn_S: or pr or pastebin or whatever works for you19:54
Merlijn_Saight, I'll send you an email19:54
Budgie^Smorewow I almost fell asleep watching a docker intro video!19:56

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