/srv/irclogs.ubuntu.com/2018/06/13/#juju.txt

wallyworldbabbageclunk: here's that refactor PR https://github.com/juju/juju/pull/881502:25
babbageclunkwallyworld: yeah, looking03:35
babbageclunk(Weird, I don't know why I didn't get a notification about that)03:36
wallyworldbabbageclunk: awesome. will be some work ahead but i think i have line of sight to removing IAASModel/CAASModel03:36
wallyworldwe'll see how it goes03:36
anastasiamac_wallyworld: babbageclunk (or anyone else keen), PATL https://github.com/juju/juju/pull/8816 - invalidate credential call back when coming from bootstrap04:11
wallyworldok04:11
wallyworldanastasiamac_: lgtm assuming it's been tested live04:16
babbageclunkwallyworld: reviewed! I complained about naming a bit, ping if you want to discuss.04:51
wallyworldok, ty, looking04:51
wallyworldbabbageclunk: i specifically avoided the parent interface containing all 3 - that was the point of the split. i needed to be able to pass in something providing filesystem but not volume04:53
wallyworldor did i not understand?04:53
=== andrew is now known as axw
babbageclunkwallyworld: the parent interface would have 3 methods, one each returning the new interfaces.04:55
babbageclunkwallyworld: (or nil, if this model doesn't support that interface)04:55
wallyworldhmmm. that essentially is what we have now with model.IAASModel() and model.CAASModel() and is what i was trying toget away from04:56
babbageclunkwell, instead you'd call model.FilesystemAccess()04:56
wallyworldthe IAASModel() and CAASModel() methods return err, not just nil thouhj04:56
wallyworldi'll take a look to see if it works nicely04:57
babbageclunkwell, you could do that too. This just matched what you had already (checking for nil for that argument).04:57
wallyworldi was trying to avoid the existing pattern04:58
wallyworldit seems more idiomatic to pass in things satisfying smaller interfaces04:58
wallyworldi guess it's just the constructor you want changed04:59
wallyworldthe api struct would still have 3 attributes representing the smaller interfaces05:00
wallyworldassuming i understand correctly you point05:00
babbageclunkYeah, I think so05:00
wallyworldok, i'll dive in and see. i'll just do a bit more work on the followup PR first05:01
wallyworldwill probably push changes tomorrow, we see how i go05:01
babbageclunkI mean, it matches what you're doing in functions like StorageAttachmentInfo or ClassifyDetachedStorage05:01
babbageclunkok05:01
wallyworldyeah, it's messy, thanks for helping em untabgle it05:02
wallyworldit will still be a mess even when i'm done05:02
wallyworldthe state vs model stuff is still in so many places05:02
babbageclunkwallyworld: yeah, it's definitely still not going to be super-elegant05:18
wallyworldgot to start somewhere right05:18
=== frankban|afk is now known as frankban
=== elox_ is now known as elox
BlackDexhow do i add a local charm to the bundle, i can't find it any more, and i forgot howto ;)08:09
BlackDexis it just "charm: /path/to/local/charm" ?08:13
zeestratBlackDex: Yeah, last I checked it's just a path. Not sure if it's only relative or not though.09:43
BlackDexi will see that at that time09:56
BlackDexthx :)09:56
rick_h_BlackDex: starts with a .11:53
BlackDexso relative then12:01
BlackDexthx rick_h_12:01
KingJIf I set a http-proxy and a https-proxy, do I also need to set an apt-http-proxy and apt-https-proxy or will Juju use the proxies defined by http-proxy and https-proxy?12:12
BlackDexKingJ: You need to set all12:16
BlackDexapt-* are set in the /etc/apt/* special files12:17
BlackDexhttps-* are set as environment values12:17
BlackDexif applications support that they will try to use it12:17
BlackDexmost python apps do12:17
KingJAhhh right, that explains why I have a few units with apt issues then - I thought just setting the general proxy would be enough.12:18
rick_h_KingJ: right, because many folks will run mirrors/etc for apt that won't follow the normal http rules for traffic12:18
KingJI've just set the apt-* proxies in my model config - will the machines/units pick that up automatically?12:18
BlackDexkeep in mind that it will then traffic everything over the proxy12:18
rick_h_KingJ: so it's the cost of flexibility tbh12:18
rick_h_BlackDex: you trying out 2.4 rc yet?12:18
BlackDexif you have a local network which you do not want to be proxied12:18
BlackDexyou need to set that12:18
BlackDexrick_h_: no, not yet12:19
BlackDexbut i like the new stuff in it :)12:19
KingJI'm looking to proxy all http(s) traffic, but not any other traffic.12:19
BlackDexi know that if you set the proxy, and deploy something like openstack, even the openstack services will use the proxy, even when they are on the same subnet12:20
BlackDexbest is to exclude the local network or some special IP's if that is the case12:20
KingJAh... that would be problematic. I'll set no-proxy to the local network then.12:21
BlackDexyou can add those exceptions to the "no-proxy" setting of the model12:21
* rick_h_ is looking for 2.4 rc feedback so starts bugging folks bdx magicaltrout zeestrat TheAbsentOne 12:21
BlackDexi don't know if using a CIDR works these day's12:21
BlackDexelse you need to add every IP in the subnet ;)12:21
BlackDexrick_h_: if i have some spare time (and i do not have much) i will try maas 2.4 my self :)12:23
rick_h_BlackDex: :) cool. we're going to have another rc2 for a bug in the oracle provider but I want to start panning folks for feedback before we go final.12:24
TheAbsentOnerick_h_: unfortunately I won't be much of a help as I'm not even allowed to try it out, I don't even have access to my controllers12:24
* rick_h_ would rather catch any issues in rc and fix vs having to spin the .1 in a hurry12:24
rick_h_TheAbsentOne: on JAAS?12:24
rick_h_TheAbsentOne: or some other reason you don't have access?12:25
KingJBlackDex: When I set these values in the model config, will Juju push it out to the machines automatically? Or do I need to do something extra to ensure that the machine is reconfigured with the appropriate config?12:25
rick_h_KingJ: Juju will handle it12:25
BlackDexhmm12:25
BlackDexah greate12:25
TheAbsentOneI don't even know how they installed juju, all I know my machines are managed by a vmware-cluster and I (my user) have 2 models as my plaground :P12:25
rick_h_TheAbsentOne: oh, I see12:25
BlackDexit didn't do that when the models where first introduced if i'm correct12:25
TheAbsentOneI'm busy with a repo that might interest you too though rick_h_12:26
BlackDexatleast i had some issues then12:26
rick_h_BlackDex: hmmm, let's say that I'd expect Juju to and if it doesn't please file a bug :)12:26
BlackDexhaha12:26
BlackDexi haven't checked it latley12:26
BlackDexsame goes for the cidr in the no-proxy12:27
BlackDexi created a script which will create a bootstrap config which will add all the ip's of a subnet i enter12:27
rick_h_BlackDex: so I do know there's updates around that in 2.4 specifically for the issue you mention12:27
BlackDexelse it was to much work12:27
KingJRight, http(s)-proxy set back to default, apt-http(s)-proxy set, and no-proxy set to a CIDR... let's see how this goes :)12:27
rick_h_BlackDex: so there's new proxy values that the charms can selectively use or not use vs setting the main system ones for all traffic and having to manage no-proxy for large groups of IPs12:28
BlackDexKingJ: when you `juju ssh X` and execute `env` you should see the proxy settings12:28
KingJ/etc/apt/apt.conf.d/95-juju-proxy-settings seems to have picked up the settings12:28
KingJenv isn't showing any proxy settings12:29
BlackDexalso check if the proxy is set in the /etc/apt/preferences.d if i'm correct12:29
BlackDexoke cool12:29
KingJ/etc/apt/preferences.d/ is empty12:29
BlackDexconf.d it is yea12:29
BlackDexdid you logged in after the changes12:29
BlackDexor whas it an old connection?12:29
KingJNew connection... I think. It was an LXC container so I just exited and re-ran lxc exec12:30
BlackDexhmm12:30
BlackDexdon't know if it works like that12:30
BlackDexi think you need to `juju ssh application/0` to it12:31
KingJAh right, let me try that then12:31
KingJHrm, connected in that way, ran env and it's hanging. Hmm.12:32
BlackDexhanging?12:33
BlackDexon env :s12:33
KingJYeah, not quite what i'd expect heh12:33
KingJAh hold on, I think i've spotted something odd that could be causing issues at a lower level - MASS DHCP assigned this LXC container a .254 address, that's probably not going to play too well with things.12:34
BlackDex;)12:35
KingJRight now that's corrected in MAAS, probably easiest to tear down the model and recreate :)12:39
BlackDexKingJ: you can provide the model config during the add-model command12:39
BlackDexwhich includes all the config you want like http-* apt-* and no-proxy stuff12:40
KingJCan I put the model config in a yaml file and run juju add-model model.yaml ?12:40
BlackDexyea12:45
BlackDexKingJ: https://docs.jujucharms.com/2.3/en/models-config12:45
BlackDexit is stated over there12:46
KingJPerfect, let's try this...12:46
BlackDexjust simple "http-proxy: http:maas:8000"12:47
BlackDexwithout the " ofcourse12:47
KingJSilly question, what key would I use to set the model name?12:47
rick_h_KingJ: you have to do that at add-model time12:48
KingJAh right, so juju add-model name, then juju model-config file.yaml12:48
BlackDexno key12:48
rick_h_KingJ: right12:48
BlackDex`juju add model --config myconfig.yaml default`12:48
rick_h_or I think add-model takes a --config12:48
rick_h_yea12:48
BlackDexwhere default is the model name12:48
BlackDexno special stuff you need to do in the yaml regarding the model-name12:49
BlackDexonly the settings with each setting on a new line12:49
KingJExcellent, that all seemed to work12:49
KingJOk, time to deploy the bundle again. Thanks for all your help so far :)12:53
BlackDexyw :)12:53
BlackDexgoodluck12:53
BlackDexif  you are using juju 2.3 you can use the --dry-run now :)12:54
BlackDexVery nice12:54
BlackDexit filters some basic errors out of it12:54
BlackDexnot all, like bad config options of the charms12:54
BlackDexmistyped etc..12:54
rick_h_BlackDex: cool, glad to hear you're using that and finding it useful12:54
KingJAh yeah, that would have been a good idea, but I think the bundle should be OK now - i've made enough revisions to it over the past few days heh. I'm on 2.4-rc1 at the moment because of a bionic related issue.12:55
BlackDexah!12:55
BlackDexthat would explain some issues then i had with 2.3.x and bionic12:56
BlackDexdidn;t look any further12:56
BlackDexno time ;)12:56
BlackDexused xenial again12:56
BlackDexi normally want to wait for the .1 release anyway12:56
BlackDexrick_h_: Yea, i really like it12:56
BlackDexnow it needs to be extended to check if all the config options are valid ;)12:57
rick_h_KingJ: cool, let me know if you hit any 2.4 issues.12:57
KingJhttps://bugs.launchpad.net/juju/+bug/1764317 is the one I ran in to on 2.3.x and made me jump on to 2.4-beta. This is a new greenfield environment, albeit lab, so I wanted to jump on to the latest and greatest.12:57
mupBug #1764317: bionic LXD containers on bionic hosts get incorrect /etc/resolve.conf files <bionic> <cdo-qa> <cdo-qa-blocker> <foundations-engine> <kvm> <lxd> <network> <uosci> <juju:Fix Committed by ecjones> <juju 2.3:Fix Released by ecjones> <https://launchpad.net/bugs/1764317>12:57
BlackDexKingJ: yea netplan is a bit to new for my tast12:58
BlackDexdidn't expected it to be in a LTS release12:59
KingJI think it was in 17.10, but it's still quite a big change. I like it conceptually but still a few rough edges around.12:59
BlackDexi had some issues with netplan and bonding12:59
KingJBlackDex: This bug? https://bugs.launchpad.net/maas/+bug/177466612:59
mupBug #1774666: Bond interfaces stuck at 1500 MTU on Bionic <cdo-qa> <foundations-engine> <mtu> <netplan> <cloud-init:Fix Committed by chad.smith> <MAAS:Invalid> <cloud-init (Ubuntu):Confirmed> <netplan.io (Ubuntu):Confirmed> <cloud-init (Ubuntu Xenial):New> <netplan.io (Ubuntu Xenial):Invalid>12:59
mup<cloud-init (Ubuntu Artful):New> <netplan.io (Ubuntu Artful):Invalid> <cloud-init (Ubuntu Bionic):New> <netplan.io (Ubuntu Bionic):Invalid> <cloud-init (Ubuntu Cosmic):Confirmed> <netplan.io (Ubuntu Cosmic):Confirmed> <https://launchpad.net/bugs/1774666>12:59
BlackDexno, not that one, but that is nasty also13:00
BlackDexit didn't connect13:00
BlackDexor it didn't created the LACP bonding the right way13:00
KingJHuh interesting, i've not had any problems with the bond formation itself (using 802.3ad) but the MTU issue is affecting me, but it's not a blocker at least just slightly less optimal.13:01
stickupkidrick_h_: here are the QA steps for the PR https://github.com/juju/juju/pull/881813:38
rick_h_stickupkid: cool ty, I'm going to try a slightly different tact and see if it works and if so share how that might be made a little easier13:38
stickupkidrick_h_: it assumes you don't already have a tmp folder in your $HOME dir13:39
rick_h_stickupkid: k, lol at using the charm as the resource to itself :)13:39
stickupkidrick_h_: easiest way without forking the world!13:40
rick_h_stickupkid: made me smile13:40
MrOldest2hello13:43
u0_a274hi13:48
u0_a274hello13:48
u0_a274come on13:48
rick_h_having fun?13:50
u0_a274hi13:53
zeestratrick_h_: got a rough eta when y'all want cut a ga? I'd love to kick the tires but got some pto coming up.14:11
BlackDexhmm, how do i upgrade a local charm?14:48
BlackDexdo i need to create a new folder, or can i overwrite the current and just tell juju to upgrade the charm?14:48
BlackDexi probably need to update the revision then i think?14:49
zeestratBlackDex: Can overwrite but is probably good hygiene to do a clean build. Juju should bump the revision automatically when upgrading locally.15:36
BlackDexclean build ?15:45
* BlackDex whistles ;)15:45
BlackDexi'm currently just doing dirty hacks to get vmware working with a charm directly instead of manully hacking the configs afterwards with ansible or `juju run` scripts15:46
BlackDexmodified the nova-compute charm15:47
TheAbsentOneis relate the new word for add-relation? :O15:55
=== frankban is now known as frankban|afk
rick_h_BlackDex: just reuse the current space and use the path on the upgrade command.16:04
rick_h_TheAbsentOne: a nicer alias heh16:05
TheAbsentOneit's kinda romantic xD16:05
TheAbsentOnerick_h_: if you would have time want to browse through these folders: https://github.com/Ciberth/gdb-use-case/tree/master/mininimalexamples16:08
TheAbsentOneYour detective eye will immediately see if something is wrong, I haven't tested/deployed them yet I will in a bit normally16:08
rick_h_TheAbsentOne: run charm proof on each?16:09
TheAbsentOneI will as soon as I'm on a ubuntu machine x)16:09
BlackDexrick_h_: it works16:09
BlackDexi can now deploy/upgrade my nova-compute-vmware charm16:10
rick_h_BlackDex: sweet16:10
TheAbsentOnerick_h_: you know by any chance an example charm using mongo?16:10
TheAbsentOnesome sort of webapp or something16:10
BlackDexi really need to get more into the charms16:10
rick_h_TheAbsentOne: hmm...not really. There was the old mongodb cluster bundle16:10
BlackDexlike pushing them to the charm-store etc..16:10
rick_h_So mongonwith itself16:10
BlackDexif i want16:10
TheAbsentOnehmm16:11
rick_h_BlackDex: yea handy even if you just use for yourself16:11
BlackDexindeed :)16:11
BlackDexlocal is nice, but git/launchpad/store is better16:11
TheAbsentOneand I was surprised that the mongodb database interface layer wasn't on the layer-index, this one: https://github.com/tengu-team/interface-mongodb-database16:11
BlackDexnow i have to check if it all works ofcourse and that openstack is able to use vmware, but that is the next step16:13
=== markthomas_ is now known as markthomas
kwmonroeTheAbsentOne: you can query the store for charms that use mongo -- https://jujucharms.com/q/?requires=mongodb.  here's how telegraf uses mongo: https://git.launchpad.net/telegraf-charm/tree/reactive/telegraf.py#n386 and here's something similar for graylog: https://git.launchpad.net/graylog-charm/tree/reactive/graylog.py#n46516:35
TheAbsentOnegonna try this one out in a few hours kwmonroe: https://github.com/Ciberth/gdb-use-case/blob/master/mininimalexamples/mongo/mongo-proxy/reactive/mongo-proxy.py#L2616:37
TheAbsentOneshould work right? :/16:37
kwmonroeyup TheAbsentOne, that'll work, but note that your request_mongodb function will fire every time a hook runs.  iow, you'll render that mongo template at least every 5 minutes (when update-status runs).16:40
kwmonroeTheAbsentOne: to prevent that, consider adjusting the decorator to "when(mongodb.connected); when_not(template.rendered); blah blah blah; set_flag(template.rendered)"16:41
TheAbsentOnehmm that's not good xD how would I solve that in a clean way setting up a flag and a when_not?16:42
TheAbsentOneow lol xD16:42
kwmonroeyou got it :)16:42
TheAbsentOneawesome!16:42
kwmonroealso, i said it will run on every hook invocation -- i meant it will run with every hook as long as mongodb.connected is set.  but you already knew that :)16:42
TheAbsentOnethx for saying that though, I didn't think about that at all16:42
TheAbsentOneI hope the collection might be of use to others too x)16:43
kwmonroefo sho16:44
kwmonroeTheAbsentOne: you might also consider the case where mongodb is connected, but the connection string changes (perhaps a new mongo cluster member arrives and the address changes, or perhaps the port changes).  in that case, you may want to check for that in your request_mongodb function and only render if the mongodb relation data has changed... graylog does that here: https://git.launchpad.net/graylog-charm/tree/reactive/16:45
kwmonroegraylog.py#n472 <-- see it returns if the data hasn't changed since the initial invocation.16:45
kwmonroeTheAbsentOne: one other thing -- the tengu-team interface isn't in the layer index because therey's already a mongodb interface that points to https://github.com/cloud-green/juju-relation-mongodb.  so when you include interface:mongodb in your layer.yaml, you'll get that one.16:47
TheAbsentOnecorrect but as I understood the tengu team interface was meant as a proxy between mongodb interface and another one16:48
TheAbsentOnehowever I'm not sure about the changing connection string16:48
TheAbsentOneif it changes my function wont run right? So what use is that check16:48
TheAbsentOneif I add a when_not(template.rendered) flag that is16:49
kwmonroeright TheAbsentOne -- i was just saying there's 2 ways of handling that render function.  either do it once and set a flag + a when_not so the function doesn't execute again, or leave it the way it is and return if ! data_changed.16:50
TheAbsentOneahn I understand my bad, I'll go with the flag I think it's more clear and it is more "reactive" programming16:51
kwmonroethe latter is more robust because it'll handle the case of a changed connection string.  the former means you'd be making an assertion that you never want to re-render that template as long as it's be done once.16:51
TheAbsentOnekwmonroe: if you have time would you mind checking my mysql folder too? It uses both the mysql-root and mysql-shared interface. I would love to hear your thoughts. Same remark about the rendering function I need to add a when_not16:52
kwmonroeyup, will do TheAbsentOne16:52
TheAbsentOnethat's true too hmm since it's just minimal example I'll stick to the flags but I will add a note I think16:52
TheAbsentOnefirst some cooking x)16:52
kwmonroe+116:52
rick_h_zeestrat: sorry, missed your question. We're waiting for feedback atm. RC's are promised to be able to upgrade to final17:27
rick_h_zeestrat: we've got one oracle bug that'll cause us to do a rc2 this week I think?17:28
rick_h_zeestrat: and hopefully get some positive feedback and feel good calling it final17:28
magicaltroutkev i'm gonna get my chaps going on hadoop storage in a week or so21:14
magicaltroutbefore i do so, anything i need to know in advance other than "currently we don't support it"21:14
magicaltroutkwmonroe21:15
kwmonroemagicaltrout: first thing i think is probably top priority... don't expect my irc client to highlight "kev".21:15
magicaltrouti know21:15
rick_h_LoL21:16
magicaltroutnot sure why i did that21:16
magicaltroutcan you change your nick?21:16
magicaltroutthats the easy fix21:16
rick_h_magicaltrout: has a pet name for kwmonroe :p21:16
magicaltroutwhen the lovely kevin comes up in discussion in the office21:16
magicaltroutits usually kev21:16
magicaltroutI apologise21:17
magicaltroutwhen people refer to me, its usually dickhead, so to be honest you're a step above21:17
rick_h_Well we tech types do hate tying long variable names21:17
kwmonroemag, second thing i would start with is right here: https://github.com/juju-solutions/layer-apache-bigtop-base/blob/master/lib/charms/layer/apache_bigtop_base.py#L612.  we hard code hadoop_storage_dirs to those.  i feel like this would be a great place to replace with a "@when storage attached, hadoop_data_dirs = hookenv.storage_get(location)"21:18
magicaltroutcool will do21:19
magicaltrout < kwmonroe> mag, second thing i would start with is right here: https://github.com/juju-solutions/layer-apache-bigtop-base/blob/master/lib/charms/layer/apache_bigtop_base.py#L612.  we hard code21:19
magicaltrout                  hadoop_storage_dirs to those.  i feel like this would be a great place to replace with a "@when storage attached, hadoop_data_dirs = hookenv.storage_get(location)"21:19
magicaltroutmeh21:19
kwmonroeyes yes, you have mastered the act of middle clicking your mouse21:19
kwmonroenow on to hdfs storage!21:19
magicaltroutsad times21:20
kwmonroe:)21:20
kwmonroemagicaltrout: feel free to schedule a hangout when you're ready -- i have some ideas that cory_fu and bdx have helped mull over.21:23
magicaltroutis that prior to or post embarking on storage kwmonroe ?21:24
kwmonroemagicaltrout: you mean cory_fu bdx and myself having ideas?  that's pre-embarking.  we had a meeting about what it would look like.  at its simplest, the charms that cared (namenode / datanode) would define 2 storage bits in their metadata.yaml -- data1 and data2.  the operator would attach relevant storage to those charms and we would use that location in lieu of that hard coded part in layer-apache-bigtop-base.21:32
admcleod'big data' ?21:32
kwmonroeban admcleod21:32
* admcleod flee21:33
kwmonroehmph, not working21:33
magicaltroutsomeones gotta do data21:33
magicaltroutits not all openstack :P21:33
kwmonroemagicaltrout: that approach assumes a fixed set of storage in metadata.yaml -- and that's not ideal.  what if i wanted 5 disks instead of just 2?  what if i wanted a pre-configured mdraid device?  what if i wanted xyz?21:34
magicaltroutyeah makes sense21:34
kwmonroeso it has flaws, but it gets us *at least* what we have now with the ability to provision storage outside of "mkdir -p /data/1 /data/2", which is all we do now.21:34
magicaltroutdon't see the problem with that :P21:35
magicaltrouti'm moving house this week and next, but it'd be good to get a call with me, you and my 2 interns soon to be full time employees i hope, so they can look really scared and we can talk storage21:36
magicaltroutare you around the week of the 25th?21:36
kwmonroeyup, i'll iron a tie for maximum professionalism21:37
kwmonroethat gives me 2 weeks to learn how to tie a tie21:38
magicaltroutcool, i'll see what days they're around and ship over some rough ideas, i can tell you thursday is out cause it appears england will be losing to belgium in the world cup that night ;)21:39
wallyworldvino_: here is where the charm (zip) uploads are processed https://github.com/juju/juju/blob/develop/apiserver/charms.go#L20523:55
wallyworldand here is where we do the processing to update the charm doc in state https://github.com/juju/juju/blob/develop/apiserver/charms.go#L39023:57
vino_wallyworld: ok i will have a look.23:57
wallyworldin those places we look inside the zip to to get the metadata etc, so can extract version as well23:57
wallyworldand use that to update the charm doc23:58
vino_ok. nothing has to be done at client side.23:58

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