/srv/irclogs.ubuntu.com/2017/03/21/#juju-dev.txt

=== thumper is now known as thumper-afk
axwwallyworld: I'm going to have to take off for a while after standup, gotta take my brother to the GP01:19
wallyworldno orrie01:19
wallyworldworries01:19
=== thumper-afk is now known as thumper
wallyworldhml: standup if you're free?01:31
menn0thumper: quick one pls? https://github.com/juju/juju/pull/712903:08
* thumper looks03:08
thumperapproved03:08
menn0thumper: cheers03:12
anastasiamacthumper: wallyworld: menn0: coming?03:31
menn0anastasiamac: yep03:32
wallyworldjam: if you had time later to talk about CMR, can you ping me?04:56
wallyworldaxw: you have time for a smallish review? https://github.com/juju/juju/pull/713007:52
axwwallyworld: sorry, ended up having to take my brother to the hospital ED, had to get a cast on his broken foot09:49
axwso today was a write off09:49
wallyworldaxw: hope he's ok! how did he break it?09:49
axwwallyworld: skateboarding09:50
wallyworldkids these days :-)09:50
ashipikahe should stick to cricket ;)09:50
axwwallyworld: yes... kids... this is my older brother :p09:50
wallyworldlol09:51
wallyworldstill younger than me09:51
ashipikaany of you core gents care to have a look at https://github.com/juju/juju/pull/7109 ?09:52
wallyworldsure09:52
ashipikawallyworld: thanks09:52
wallyworldashipika: there's an issue in that a new facade method is added to uniter facade without bumping the version to 410:04
wallyworldand the uniter client needs to check that the version it is talking to is 4 and faily gracefully if not10:04
wallyworldthere's a BestFacadeVersion method or similar that is used to see what facade version is available10:05
wallyworldthe client calls that and if it gets 3 back, it knows the new SLA method is not available10:05
wallyworlds/the client/the caller10:06
axwwallyworld: I'm going to be out a few hours tomorrow too. dentist for myself, then brother back to the GP. le sigh10:07
wallyworldaxw: no worries, whatever you need10:07
wallyworlddentist = wallet pain :-(10:07
ashipikawallyworld: ah, yes.. forgot about versions.. )10:08
wallyworldashipika: yeah, PITAi know10:09
ashipikawallyworld: well.. there's pain and there's the dentist :) i'll take core over the dentist..10:09
wallyworld:-)10:10
jamwallyworld: were there other CMR things, or just what you sent in the email?10:11
wallyworldjam: for now the email. was my lasy comment where i restated the semantics for network-get as per your thinking?10:12
wallyworldie in my reply10:13
jamwallyworld: yeah, context implies "what do you want for that machine" and no relation context is "what do I need for local configuration"10:13
tasdomaswallyworld, could I ask you to take a look at this PR as well: https://github.com/juju/juju/pull/7114 ?10:13
wallyworldjam: i really want to try and avoid using public addresses where possible and supported by the provider snd deployment etc, but it will be hard to do that without a lot more development10:14
wallyworldtasdomas: sure, ok10:14
wallyworldjam: also, we'll need to see if we can allow charms to work unchanged via unit-get; not sure if that's feasible yet. but i'd prefer not to invest a lot of time into making unit-get work with CMR if possible or if we can justify avoiding it and putting the effort into making the charms more modern and use network-get10:16
jamwallyworld: you're looking more for 'relation-get' to give an appropriate 'private-address' for the remote side10:17
jam'unit-get' is about local config10:17
wallyworldtasdomas: you already have 2 lgtms :-) did you still want me to look?10:17
jameg "mysql$ relation-get wordpress" should give the same thing as "wordpress: network-get mydb -r mysql"10:18
tasdomaswallyworld, well, if you could quickly glance over the PR, I'd really appreciate it10:19
wallyworldtasdomas: ok10:19
wallyworldjam: relation-get is for the whole relation databag, right. there in general won't be a "wordpress" key. it will be something like "private-address" from memory10:21
axwwallyworld: reviewed your PR10:21
wallyworldaxw: ty10:21
jamwallyworld: relation-get private-address is what they generally call10:22
jamprivate-address is the one bit of the data bag that Juju puts automatically10:22
wallyworldjam: right, that's my understanding also10:22
jam(more interesting is the call in the other direction, to be fair, but I started writing before thinking all that through)10:23
wallyworldjam: so the issue is juju doesn't really know explicitly what the charm wants to use "private-address" for10:23
wallyworldwhereas when it calls network-get we can make a more informed decision10:23
wallyworldas to "my local ddress" or "what i advertise"10:23
jamwallyworld: so *relation-get* is fairly clear, because it is asking for "give me the IP address of the other application"10:23
jamso that I can talk to it10:23
jamthe issue is that Wordpress and Mysql might actually coordinate on a different key10:24
jamlike say10:24
jamURL10:24
wallyworldright, like postgres does10:24
jamso we want 'network-get' (instead of unit-get) so that when MySQL populates the URL field10:24
wallyworldbut postgres would make that url by calling neywork-get10:24
jamit can give the context for what IP address it wants to put in there10:24
wallyworldexactly10:24
wallyworldthat's why i want to not use unit-get at all10:24
wallyworldand migrate the charms we care about10:25
jamwallyworld: my understanding is that most charms actually use 'relation-get private-address' over custom URLs10:25
jamI don't think I've advocated fixing unit-get10:25
jamjust 'relation-get private-address' and 'network-get'10:25
wallyworldmy issue with the former is we are still guessing a bot at the the purpose of why the charm wants to use private address rather than being explicit10:25
wallyworlduse of network-get ensures we don't guess anything10:26
wallyworldbut we can see how it plays out i guess10:26
wallyworldaxw: will comment - list vs find - list is used by model admin, it exposes connection count, charm name, other details. find is used to discover what endpoints are available. they both read from the same part of the model, hence shared code but different facade apis10:28
wallyworldtasdomas: sorry, got caught up, looking now10:28
jamwallyworld: again, we know that when Wordpress calls relation-get private-address for MySQL there isn't anything *Wordpress* could do but connect to MySQL10:29
jamwhich is different from "maybe I need to set a bind address for MySQL in the MySQL charm, or I need to give the public address because someone is calling me from outside my network"10:30
wallyworldjam: yeah, maybe i'm being overly paranoid about thinking there could be another reason10:30
wallyworldjam: the fun bit will be figuring out what to provide for that private-address value. eg for aws wirh models in same region etc, it can be the cloud local address. but for azure it will need to be the public address etc10:31
wallyworldand that then affects how the firewall ingress rules are done10:31
jamwallyworld: so IMO, whatever you would put in "network-get -r relation --primary-address" on one side would be what you would put in "private-address" to be seen from the other side10:31
jamif we started with CMR == public-address that would be a reasonable starting point given everything we've seen so far10:32
jamin fact, only in the very special "its all my account in AWS" is it possible to use private address10:32
jamcause otherwise its a "different network" even if they are both private, etc.10:32
rick_hjam: anything to chat over today?10:33
jamhi rick, I'll brt10:33
wallyworldjam:  true, but i was hoping to at least be able to reasonable short circuit where possible10:33
wallyworldbut yeah, public address would work, so long as a public address is available10:34
wallyworldnot always the case though10:34
wallyworldeg openstack10:34
wallyworldtasdomas: quick comment - the tables in the CLI output should no longer use CAPS for headers10:40
wallyworld"Title case" instead10:40
tasdomaswallyworld, ah, ok10:41
tasdomaswallyworld, thanks10:41
wallyworldnp10:41
wallyworldtasdomas: we made that change for 2.0 as per Mark's guideance10:41
wallyworldso best to change the budget commands also :-)10:41
tasdomaswallyworld, will do - thanks for the heads up10:44
wallyworldnp10:44
mupBug #1674655 opened: juju kill-container fails <juju-core:New> <https://launchpad.net/bugs/1674655>11:13
ashipikawallyworld: the current uniter facade version is v4.. having added that method, do i need to bump it up to v5?11:21
ashipikawallyworld: or just fail gracefuly if talking to v3..11:21
ashipikaor lower11:21
wallyworldashipika: the issue is that 2.0.x and 2.1.x will be using v4, right? a hacky way would be to make the api call and handle the NotImplemented error as an indication the api is not supported11:22
wallyworldCodeNotImplemented i think11:23
wallyworldthat would be less strictly correct bit still work11:23
wallyworldbumping to v5 shouldn't make much effor tthouhh11:23
perrito666just bump the version, is almost free11:23
wallyworldjust a few lines to register the facade11:23
wallyworldwe do that for the storage facade for example11:24
ashipikaack.. v5 then11:25
jamhi perrito66611:41
perrito666jam: hi11:41
mupBug #1674655 changed: juju kill-container fails <juju-core:Invalid> <https://launchpad.net/bugs/1674655>11:53
frankbanwallyworld, perrito666: do you remember what constraints can be applied to lxd and to kvm containers when creating a machine in juju?11:58
perrito666frankban: no11:58
wallyworldfrankban: for lxd at least, i don't think we do much. we may honour mem for kvm11:58
wallyworldnot 100% sure though11:59
frankbanwallyworld: my guess was mem and disk for both?11:59
frankbanI'll go with that11:59
wallyworldcould do, yeah, sounds plausible11:59
frankbanwallyworld: ty12:00
wallyworldfrankban: i just checked12:00
wallyworldmem, core, disk for kvm12:00
wallyworldcores12:00
frankbanwallyworld: ah cool thanks12:01
frankbancores12:01
wallyworldfrankban: and nothing that i can see for lxd12:01
frankbanwallyworld: ok the GUI will reflect that12:01
wallyworldfrankban: we do need to introduce max constraints for lxd so the contaners don't use all the memory for example12:02
wallyworldright now. constraints are min12:02
frankbanwallyworld: interesting, that will be a good challenge for UX12:03
wallyworldyes12:03
wallyworldwe're thinking of new, separate constraints. max-mem etc12:03
frankbanah, cool12:06
frankbanwallyworld: so, when using the lxd provider, do w esupport any constraints instead?12:06
frankbanwallyworld: for top level machines (lxd containers in that case)12:06
wallyworldfrankban: as far as i am aware, any lxd instance creted ignores constraints. the host machine on which the lxd container runs is a separate issue12:07
frankbanwallyworld: ok thanks12:08
frankbanwallyworld: last question, I know that the provider type for local models in juju2 is "lxd". was it "local" or "lxc" in juju1?12:09
wallyworldfrankban: local i think from memory12:09
frankbanwallyworld: I think I remember it was local yeah12:09
frankbanthanks12:09
wallyworldthat was a lot of wine ago12:09
ashipikawallyworld: had a discussion with mattyw.. and decided not to bump the facade version just because of one added method.. the api method will fail gracefully when talking to an older facade though12:19
ashipikawallyworld: otherwise we'll exceed maxInt too soon :)12:20
wallyworldashipika: it's only a couple of lines of code - more probbly to fail gracefully12:20
wallyworldliterally one register call12:20
wallyworldashipika: see apiserver/application/application.go12:22
wallyworldthe only other change is to call BestFacadeVersion in the caller12:23
ashipikawallyworld: thy will be done..12:25
wallyworldvers := root.BestFacadeVersion("Uniter")12:25
wallyworldty :-)12:25
wallyworldif vers < 5 {} else {}12:25
ashipikaBestAPIVersion or BestFacadeVersion?12:26
ashipikawallyworld: ^12:26
wallyworldashipika: i yse BestFacadeVersion12:27
wallyworldashipika: but12:27
wallyworldBestAPIVersion() can be used directly on the client12:27
wallyworldboth work12:27
wallyworldso if you already have the client created, BestAPIVersion12:28
wallyworldif you just have the api root, BestFacadeVersion12:28
mattywwallyworld, any ideas on the best way to test this?12:36
mattywwallyworld, doesn't look like there are any existing mocks we can use?12:36
wallyworldmattyw: you mean unit test or real world test? for unit test, there is a way but i forget, i can check12:37
ashipikawallyworld: unit test12:37
mattywwallyworld, unit test, we're trying to find examples, but looks like we might have to write the mocks ourselves12:37
wallyworldmattyw: i can't find any tests for existing things like this. we used to have a way. for this PR, i would ok it so long as the new stuff works12:39
ashipikawallyworld: it appears that if i create a uniter.State with api/base/testing.APICallerFunc.. the testing.APICallerFunc returns BestFacadeVersion 0..12:48
ashipikawallyworld: so a glitch in the testing.APICallerFunc allows me to test that12:48
wallyworldashipika: that could well be. i've not dug into that code in a while. if you have found a way then awesome12:49
ashipikawallyworld: fwereade has a todo on the BestFacadeVersion in the APICallerFunc.. but it has never been done.. long term backlog12:49
wallyworldyeah, we have a lot of tech debt12:49
perrito666jam: ?13:03
jamomw13:08
perrito666o my wod?13:09
ashipikawallyworld: pushed fixes for https://github.com/juju/juju/pull/7109 ..13:11
ashipikawallyworld: no i didn't13:12
wallyworldashipika: so no version bump?13:14
ashipikawallyworld: i.was.changing.the.wrong.branch.please.don't.ask.13:14
ashipikawallyworld: there.. i pushed.. this time the right branch13:17
wallyworldah, that's better13:17
anastasiamacjam: feature tst PR for 'get-config' and 'juju config' as discussed: https://github.com/juju/juju/pull/713213:18
wallyworldashipika: looks good with a rename suggestion. thanks for the extra work on the versioning13:24
perrito666ok, while my tests re-run on CI ill go run a couple of errands, bbl13:40
ashipikawallyworld: renamed.. thanks for all the help!13:40
jamanastasiamac: reviewd13:57
=== joedborg_ is now known as joedborg
=== tinwood_ is now known as tinwood
perrito666annyone in need of a review? this is THE time to ask17:54
=== frankban is now known as frankban|afk
mattywthumper, ping?20:14
thumpermattyw: hey, otp just now20:15
mattywthumper, no problem will you be around in about 45 minutes to talk model migration?20:15
mattywthumper, irc will be fine - unless you really want to see my face20:15
thumpermattyw: I have about 9 minutes now20:51
bdxhow's it going all?20:51
thumperwell... not everything is on fire20:52
bdxI'm wondering, how a new dependency is added to dependencies.tsv?20:52
bdxeehh ... good .. I guess20:52
bdxsorry20:52
bdxha20:52
rick_hthumper: is so full of happy thoughts20:53
rick_hthumper: bdx wants to play with newrelic and juju and is trying to see how to inject the newrelic bits20:54
rick_hthumper: any hints on how to add stuff is <320:54
thumperbdx: new library dependencies normally have to be approved by the tech board20:54
thumperbut how I add things is do write the code that uses the libraries20:54
thumperthen go `godeps ./... | grep 'newlibname'20:55
thumperthen add that line into the dependencies.tsv file in alphabetical order20:55
thumperthat way you don't override the whole file20:55
thumperbut just add new bits20:55
thumperbdx: make sense?20:59
bdxthumper: yes, perfect. thank you!21:00
bdxthumper: looking at the newrelic go apm agent installation instructions, "Import the github.com/newrelic/go-agent package in your application. Create a config and application in your main function or in an init block." - where would be the best place to place this in the juju codebase?21:01
bdxthumper: in here -> https://github.com/juju/juju/blob/staging/cmd/jujud/main.go#L39 ?21:01
thumperno21:01
thumperI'd keep all newrelic stuff isolated in the new relic provider21:01
bdxthumper: newrelic provider - what is this?21:02
thumperoh...21:02
thumperwhat is newrelic exactly?21:02
bdxthumper: its a monitoring/alerting platform21:03
bdxthumper: they have an apm product for go applications21:03
rick_hthumper: you should test out the free newrelic platform on your django app21:03
bdxI was trying to play around with seeing what types of metrics we can get for juju via the go agent21:03
rick_hthumper: <3 getting hints at slow queries, etc21:04
bdxthumper: (sorry about the acronyms) APM - appication performance monitor21:05
bdxhttp://imgur.com/ysLJimx21:06
thumperotp again...21:08
bdxthumper: speaking of acronyms ... otp?21:10
bdxone true pairing?21:12
bdxon the plane?21:13
bdx:)21:13
thumperon the phone21:18
niedbalskianastasiamac, thumper I can't locate the 1.25 backport of lp#161385521:38
=== balloons27 is now known as balloons
bdxquick question22:40
bdxis the jujud binary that runs on controllers the same jujud binary that runs on juju deployed machines?22:41
bdxI can't seem to identify any difference between the two ...22:43
menn0bdx: the controller machine agents, workload machine agents and unit agents all use the same jujud binary22:53
menn0bdx: the behaviour of the binary changes depending on the context22:53
menn0bdx: internally, it's the workers that run that change the behaviour the most22:54
bdxmenn0: thanks for that23:10
bdxthe context provided by what is in mongo?23:11
bdxmenn0: "it's the workers that run that change the behaviour the most" - does this mean that the workers (that exist in jujud) will run in the controller context, but not outside of that?23:13
menn0bdx: sorry, on a call. will get back to you.23:13
bdxmenn0: np23:13
rick_hthumper: sent you an email with details, test it running and added your ssh key so you can sshuttle to the network and view the grafana as it runs.23:32
* rick_h goes back to dishes23:32
stokachuim going to try and get a macOS version of conjure-up ready before the beta release on thursday23:54
stokachuis someone able to push juju 2.2 beta to brew?23:54

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