/srv/irclogs.ubuntu.com/2014/05/21/#juju-dev.txt

davecheneybugs, so many bugs00:05
bachi bigjools00:40
bigjoolso/00:40
bigjoolsOTP00:40
bacnp, just saying hello00:40
bigjoolshello bac :)00:40
bodie_I need some guidance here: http://bazaar.launchpad.net/~binary132/juju-core/charm-actions/view/head:/charm/actions.go01:05
bodie_this bit in particular (line 58): actionsSpec.ActionSpecs[name].Params = map[string]interface{}{}01:05
bodie_I'm trying to initialize the Params member with an empty interface (I've also tried make( map[string]interface{} ) with the same results but it's giving me the following error:01:06
davecheneylooking for a review on this01:07
davecheneyhttps://github.com/juju/errgo/pull/601:07
davecheneywallyworld_: nate, jimmiebtlr_01:07
bodie_cannot assign to actionsSpec.ActionSpecs[name].Params01:07
davecheneyno, jam01:07
bodie_presumably because Params is an uninitialized map01:07
davecheneybodie_: i don't think reflect is necessary01:08
bodie_you can do equality on a potentially nested map without reflect?01:08
davecheneyif actionSpec.ActionSpec[name].Params == nil { actionSpec.ActionSpec[name].Params = make(map[string]interface{})01:08
wallyworld_davecheney: lgtm, i like it01:08
davecheney}01:08
bodie_I tried that, but it gives me the same error01:09
bodie_it doesn't want me to assign values to that member... I'm not seeing why01:09
davecheneybecause maps are not addressible01:09
davecheneybodie_: why do you need to initalise that map01:10
davecheneyline 60 will work fine with the zero value01:10
bodie_well, I don't necessarily need to.  what's happening is that I'm expecting an empty map in my test but getting nil01:10
bodie_which got me thinking01:10
davecheneyvar actionsSpec *Actions01:11
davecheneyif err := goyaml.Unmarshal(data, &actionsSpec); err != nil {01:11
bodie_perhaps if the "params" key has no values, it should be defined as an empty value, rather than nil, that way it can be handled without nil checks01:11
davecheney^ ???01:11
bodie_what's the question01:11
davecheneyyour passing **Action to Unmarshal01:11
davecheneyshouldn't this be01:11
bodie_one moment sorry01:11
davecheneyvar actionSpec Actions01:11
bodie_i'll be back01:11
davecheneygoyaml.Unmarshal(date &actionSpec)01:12
bodie_okay, looking01:15
bodie_child just awoke suddenly...01:15
bodie_mh01:16
bodie_hm*01:16
axwwallyworld_: hey. are you on mgz's box?01:18
wallyworld_no01:18
axwk01:18
davecheneywallyworld_: follow up for ya https://code.launchpad.net/~dave-cheney/juju-core/178-update-errgo-and-loggo-dependencies/+merge/22034001:19
wallyworld_rightio01:19
wallyworld_land that sucker01:21
axwwallyworld_: are you looking at the bzr error, or should I?01:21
wallyworld_axw: i haven't looked yet01:22
wallyworld_it did happen after my branch landed01:22
axwhrm ok01:23
wallyworld_but off hand i can't see the causal link01:23
axwI wonder if it's due to the bzr config not being found in $HOME01:23
wallyworld_leave it and doing another one if you want, likr the new mongo failure01:23
axwok01:23
wallyworld_maybe01:23
wallyworld_axw: but it does pass here locally01:23
axwI see01:23
wallyworld_so could be pythin version related according to curtis01:23
bodie_davecheney, seems weird that it would work even though I had the error you pointed out01:25
bodie_anyway, corrected that but it's still giving me the same thing01:25
bodie_with make as well as the way I had it01:26
wallyworld_axw: it does seem that in CI, that ensure admin user stuff is happy now01:27
axwhooray01:27
wallyworld_but of course we have the new failures :-(01:27
axwthese last couple have been a massive PITA01:27
axwyeah01:27
davecheneyfaaaaaaaaaaaaaaark01:27
davecheneyhttps://code.launchpad.net/~dave-cheney/juju-core/178-update-errgo-and-loggo-dependencies/+merge/22034001:27
davecheneythis is really gettig me down01:27
axwnever ending01:27
wallyworld_yep :-(01:27
davecheneybodie_: can you paste the error01:27
davecheneyplease01:27
bodie_sure thing01:28
bodie_cannot assign to actionsSpec.ActionSpecs[name].Params01:28
davecheneybodie_: i need the code, the line number and the error01:28
axwdavecheney: I think that means the bot needs manually updating01:28
wallyworld_davecheney: i'm not a git expert so have no idea wtf that error means01:28
davecheneywallyworld_: what axw said01:29
axwwallyworld_: godeps -u doesn't actually pull new revs01:29
davecheneyaxw: nope, because godeps creates disconneted heads01:29
wallyworld_so godeps needs fixing?01:29
davecheneywhich is a git word for, i dunno, branches that have no upstream01:29
davecheneywallyworld_: yup01:29
wallyworld_i can manually update the bot01:29
davecheneywallyworld_: thanks01:29
wallyworld_davecheney: can you file a bug for the godeps thing?01:30
bodie_davecheney, charm/actions.go:58: cannot assign to actionsSpec.ActionSpecs[name].Params01:30
bodie_http://bazaar.launchpad.net/~binary132/juju-core/charm-actions/view/head:/charm/actions.go01:30
bodie_same error if I use a composite literal of map[string]interface{}01:32
bodie_er... append {}01:33
davecheneybodie_: ok01:34
davecheneysorry01:34
davecheneythere are two things going on01:34
davecheney1. map values may not be assignable01:34
davecheneybut01:34
davecheney2. you probaly don't need to do all that defensive coding01:34
* davecheney reads the code01:34
wallyworld_bot fixed, tests running01:34
davecheneywallyworld_: got another one for you https://code.launchpad.net/~dave-cheney/juju-core/179-remove-thirdparty-pbkdf2-dependency/+merge/22034101:35
wallyworld_ok01:35
bodie_I don't necessarily want to assign anything except an empty but non-nil value01:35
bodie_just so I don't have people stumbling on nil param sets if the action doesn't take any parameters01:36
bodie_I had a devil of a time trying to figure this out earlier01:36
bodie_but, I guess I can leave it nil -- I just don't want inability to be what prevents me from doing it right01:36
bodie_frustrating01:36
davecheneybodie_: leave it as nil01:37
davecheneybodie_: i'm really not sure about all the use of reflect in that file01:38
davecheneyit shouldn't be necessary01:38
davecheneyin fact, why won't that struct just unmarshall directly ?01:39
davecheneybodie_: dont you just need to add some `yaml:...` tags to the ActionSpec struct01:39
davecheneyand it should unmarshal directly01:39
davecheneywithout having to do it by hand01:39
davecheneyi'm clearly missing something01:40
bodie_I'm probably not fully understanding the difference between what you're suggesting and what I have here -- I'm not certain I can do it justice, but I've been over it with William several times and he thought it important to leave room for metadata that we specify, in addition to a more flexible Params map per action which only need conform to JSON-Schema01:42
davecheneybodie_: can you show me a sample actions.yaml file01:43
bodie_the deep equality was because the compiler complained about the use of normal equality, and it seemed sensible since there could be nested maps01:43
bodie_yeah, there's an example in my mr... let's see01:43
bodie_https://codereview.appspot.com/9454004401:44
davecheneybodie_: it feels like you are fighting the language01:44
bodie_perhaps a bit :)01:44
davecheneyand you'll loose, 'cos its really stubourn01:44
davecheneyso i'd like to help find a better way to do what you want to do, rather than help you win a small battle with the compiler01:44
bodie_that usually means I'm not properly understanding the way it wants me to do things :)01:44
davecheneyso looking at that definition01:45
davecheneyyou wnt to do somethign like01:45
davecheneytype ActionSpec struct { Description string ; Params map[string]interface{} }01:46
davecheneyactionSpecs := make(map[string]ActionSpec)01:47
davecheneygoyaml.Unmarshal(r, &actionSpecs)01:47
davecheneythat should be pretty close01:47
davecheneythen you'll need to go through the params of each ActionSpec to do the json validation01:48
davecheneybut that should be a separate function01:48
* davecheney doesn't even know what json validatoin means01:48
davecheneyit sounds like an oxymoron01:48
bodie_json-schema is a subset of json which has to conform to a spec01:48
bodie_it's to define the format of json objects which will be passed as the arguments to the action01:48
bodie_invalid params will be rejected01:49
bodie_and you can just check it against the JsonSchemaDoc to validate the parameters01:49
bodie_this is the argument in favor of this01:49
davecheneysure01:49
davecheneybut that doens't need to be wedded to the yaml decoding process01:50
bodie_so, we're ensuring that this yaml matches the format we need for json-schema, since charm coders like yaml, or something01:50
davecheneyit should just be a function that takes a map[string]interface{} and returns an error01:50
wallyworld_arosales: did you end up meeting with the joyent folks? or is that yet to happen? i don't think i need to be there - hopefully the pull requests are self explanatory01:50
bodie_I think the goyaml.Unmarshal bit is making the map, but I could be wrong01:52
bodie_davecheney, we're just making sure at the time of unmarshaling that it's valid01:59
bodie_the jsonschema bit just checks that, does nothing with the result01:59
bodie_then, I'm going through each action in the list, making sure it has an OK name, and then checking to make sure its params do02:07
bodie_that's really all02:07
bodie_if the params map is nil, I'm trying to make it empty instead02:07
* davecheney twiddles thumbs waiting for the bot02:21
axwjam: you put up a branch fixing this issue before, right? but it didn't get proposed for trunk? #132079402:40
_mup_Bug #1320794: After bootstrapping an OpenStack environment, juju tries to connect to the internal IP <addressability> <landscape> <openstack-provider> <juju-core:Triaged> <https://launchpad.net/bugs/1320794>02:40
arosaleswallyworld: I haven't meet with them yet, but I think they are working on the pull requests04:46
wallyworldarosales: great, thanks, let me know if i can do anything04:47
arosaleswallyworld: np will do04:47
jamaxw: IIRC we put one together that made it so we didn't use networks marked MachineLocal, however, it is possible the auto-detection in Openstack is wrong.04:54
jamI don't think I did the fix04:54
axwjam: ok. thought you did something for ODS04:58
axwmaybe that was it04:58
jamaxw: ah the ODS thing was attached to a bug but never proposed because it didn't have any tests.04:58
jamaxw: that was https://bugs.launchpad.net/juju-core/+bug/130876704:59
_mup_Bug #1308767: juju client is not using the floating ip to connect to the state server <addressability> <juju-core:Triaged> <https://launchpad.net/bugs/1308767>04:59
jamit does have a branch associated, but without tests or someone at least trying it in the wild, I wasn't confident about it.05:00
jamyou're welcome to pick it up and finish it off05:00
jamit *seems* correct to me05:00
axwjam: thanks, that's what I was thinking about. I will take a look after my current work05:00
wallyworldjam: do you have any idea what might cause "bzr add" to crash hard and print out "(PC=0x4143E6)"05:05
jamwallyworld: that looks like a stack trace, which would sound like a C sort of extension, which *sounds* like a plugin.05:06
jamtry "bzr add --no-plugins" ?05:06
jamwell s/stack trace/core dump/05:06
wallyworldjam: this is on jenkins, in some of the tests05:06
wallyworldbug 132128205:07
_mup_Bug #1321282: PANIC: branch_test in trusty <ppc64el> <regression> <test-failure> <juju-core:Triaged> <https://launchpad.net/bugs/1321282>05:07
wallyworldi guess we could modify the tests05:07
wallyworldto add the --no-plugins arg05:07
jamwallyworld: so the PC=... stuff is Go05:07
jamnot bzr05:07
wallyworldi could have msiread the source code. it looked like when the cmd.exec failed it printed the failing cmd line and then the stdout05:08
wallyworldi'll look closer05:08
jamwallyworld: output is a []byte, so maybe it is giving the array rather than the string content?05:09
wallyworldseems strange that it's just the bzr commands, hence my suspicion based on no facts that bzr might be involved05:09
wallyworldcould be yeah05:09
jamwallyworld: my guess is that the failure is actually that bzr isn't present05:09
jamnote that we aren't checking "err"05:09
jamwhich could be saying "ENOENT"05:09
wallyworldyeah, true05:10
wallyworldi'll modify  the test to give better output05:10
wallyworldi haven't really looked that closely05:10
davecheneydoes anyone know anything about a Tagger interface ?05:42
davecheneyfor things that have, uh, a tag ?05:42
fwereadedavecheney, I think all state entities have one05:52
fwereadedavecheney, the tag is the definitely-unambiguous identifier we use over the API05:53
fwereadedavecheney, ie unit-mysql-3, machine-7-lxc-1, service-blah, relation-some-horrible-mess05:53
fwereadedavecheney, except we don't always use it over the API, and sometimes for no explicable reason someone allows them to leak into the UI05:54
davecheneyfwereade: there is no state.Tagger interface definition05:54
davecheneynm, i just made one up05:54
davecheneyfwereade: i can easily move that definition into the state package for better feng shui05:56
fwereadedavecheney, heh, it's state.Entity06:37
davecheneyfwereade: right06:46
davecheneywill fix06:46
davecheneyor I can fix in a followup06:46
TheMuemorning07:31
dimiternhey TheMue07:51
axwwallyworld: FYI, bzr tests are barfing on my laptop07:53
wallyworldoh great :-(07:53
axwwallyworld: I can take that next if you're not on top of it07:53
wallyworldaxw: i've been caught up with other stuff o haven't yet got root cause sussed out. i'll take another look and we can discuss at standup07:54
wallyworldbug 1321009 is pretty important07:55
axwwallyworld: sure07:55
axwwallyworld: is that what you're looking at now?07:55
axwwallyworld: or I should take a look?07:55
wallyworldnah, gccgo stuff07:55
axwok07:55
wallyworldfeel free07:55
voidspacemorning all08:00
dimiternmorning voidspace08:03
dimitern(just how it sounds :)08:04
wallyworldaxw: i just got the failing bzr tests as well although i could have sworn they passed before as i did a complete test run. go figure08:06
fwereadehey all08:06
fwereadeI'd love a review of https://codereview.appspot.com/94540043/08:07
axwwallyworld: me too, though I did a pull earlier... I'm pretty sure I had all of your changes already though08:07
dimiternfwereade, jam, vladk|offline, I'd really appreciate a second look on this goamz CL https://codereview.appspot.com/98430044/08:11
* dimitern is away for a while08:11
tasdomasfwereade, hi08:29
fwereadetasdomas, heyhey08:30
fwereadedimitern, oops, looking08:30
fwereadetasdomas, (I can talk and review at the same time, at least to some degree)08:32
tasdomasfwereade, was thinking about the ensure-availability MP - should we display the Promote/Demote/Remove information always or just in verbose mode?08:32
axwwallyworld: I think it will be very difficult to backport that fix for 1.1808:33
axwit relies on a bunch of existing changes in 1.19 that allow dialling multiple addresses08:33
wallyworldaxw: ok, it seemed like something we would have wanted08:33
fwereadetasdomas, I think we should generally display feedback, and have a --quiet option; --verbose remains meaningful, it just means *loads* of output08:33
wallyworldaxw: i think a 2nd opinion to mine as to how important it is would be desireable08:34
axwwallyworld: ideally yes, but I think it should probably just wait for 1.20 unless it's critical (which I assume it's not, since this is nothing new)08:34
wallyworldok08:34
tasdomasfwereade, so would this sort of output look sane to you: http://paste.ubuntu.com/7496511/ ?08:43
wallyworldaxw: FFS :-( https://codereview.appspot.com/10059004808:46
mgzwallyworld: aha08:56
mgzwallyworld: what's the reason?08:57
wallyworldmgz: i was dumb08:57
axwmgz: bzr wants a home08:57
axwit tries to read /.bazaar if $HOME==""08:57
mgzoh yeah, \bsse just removes the envvar08:58
axwwallyworld: mgz sorry to be a pain, going to be a little late again - gotta get my daughter to have a shower... back real soon08:58
wallyworldyep08:58
wallyworldok, np08:58
fwereadetasdomas, sorry: I'd say --quiet can suppress all output, and it would be perfect if normal mode output the final list of expected sate servers09:09
tasdomasfwereade, ok - what do you mean by "final list of expected state servers" ?09:10
fwereadetasdomas, if we add a new one it isn't a state server *yet*, but we expect that in a couple of minutes it will be09:11
axwwallyworld mgz: back09:12
tasdomasfwereade, so instead of printing the promotion/demotion lists, I should just print a list of what state servers are expected to be operating once the ensure-availability process completes (i.e. collapse those lists)?09:15
fwereadetasdomas, yeah, I reckon the lists are maybe best for --verbose09:16
fwereadetasdomas, the thing most people care about is "which ones are now my state servers"09:17
fwereadetasdomas, with an option on "which ones used to be but aren't any more"09:17
tasdomasfwereade, ok - I will update the branch09:18
dimiternfwereade, how's the looking going? :)09:42
* fwereade glances guiltily at dimitern, changes tabs09:43
dimitern:)09:45
dimiternnp09:45
mgzwallyworld: I wonder if we should switch over goose or something first, less active than core and may avoid some early pain09:45
wallyworldmgz: not a bad idea. but i guess we already have other things in github, but not the landing bot support. let's see how we go over the next day or so. at this stage i think we should just rip off the band aid09:47
wallyworldalso, the guys getting store out of core are waiting for us09:47
wallyworldgotta run though, back later maybe09:48
mgzwallyworld: goose is on the landing bot atm I mean, so we need both and it's the same steps09:48
mgzjust doing the smaller one first will give a day or whatever to find glaring issues09:48
voidspacerouter firmware update09:50
voidspacegoing offline briefly09:50
fwereadedimitern, so, it is looking pretty sane to me, but I'm worried I'm not the best person to review it -- jam, do you feel ~at home with the ec2 testing double? I've never really worked with it at all09:53
fwereadedimitern, all I really have is a whine that one of the methods is awfully big09:56
dimiternfwereade, it is indeed, and that's after splitting it up a bit09:57
dimiternfwereade, I welcome suggestions how to simplify it further though09:57
fwereadedimitern, I was thinking that at least the if len(ifaces) == 0 block could move out09:58
fwereadedimitern, it was less clear whether it'd be a win to extract that massive switch09:58
dimiternfwereade, ah, good point09:58
dimiternfwereade, it's really not that easy to parse that huge complicated form09:59
fwereadedimitern, I suspect that if you were to do that it'd be a matter of a new type that sort of accumulates state in its fields09:59
dimiternfwereade, hence the switch09:59
dimiternfwereade, expand a bit please?09:59
fwereadedimitern, some of those switch branches are pretty big themselves, so it could be good to extract them; but maybe it isn't even a type, it's just a func that takes a *iface and modifies it in place10:02
fwereadesorry forget anything I said about an extra type10:02
fwereadedimitern, just consider breaking the longer switch branches out so it's easier to see the structure of the whole method without getting lost10:03
dimiternfwereade, i kinda feel there is indeed a type waiting to emerge around parsing stuff in the test server, but it will require bigger refactoring10:03
dimiternfwereade, alright then, sgtm10:03
fwereadedimitern, I heartily support the "refactor first, so that the change you want to make becomes trivial" approach, so I'm not going to complain if you do do that, but if it's not clear what to do maybe best to skip it ;p :)10:04
dimiternfwereade, yeah, it will blow up the CL without much immediate gain, and I just want to get it landed so I can concentrate on juju work10:08
fwereadedimitern, +110:08
=== vladk|offline is now known as vladk
pindongahi, I'm having some issues trying to deploy charms on canonistack; I've filed 2 bugs in case someone can help me figure out what's wrong with this10:13
pindongahttps://bugs.launchpad.net/juju-core/+bug/132168610:13
_mup_Bug #1321686: initial deploy using local provider fails because template creation takes too long <juju-core:New> <https://launchpad.net/bugs/1321686>10:13
pindongahttps://bugs.launchpad.net/juju-core/+bug/132168310:13
_mup_Bug #1321683: juju takes a long time to deploy using the local provider <juju-core:New> <https://launchpad.net/bugs/1321683>10:13
tasdomasis `juju ensure-availability` supposed to work with the local provider?10:25
jamtasdomas: it is currently blocked from  working there10:27
jamwell, it doesn't work there10:27
jamenabling it properly is a big pile of work10:27
voidspacenatefinch: https://codereview.appspot.com/94510043/10:27
jamdoing an approximation of it is just a matter of disabling some checks10:27
tasdomasjam, just to check that I understand this correctly - enabling it would mean changing the location of the state server in local provider (as I understand it, localhost is the state server in local provider)10:29
jamtasdomas: enabling it would mean that we would add a state server also in a container. To enable it properly that state server would then need something to talk to running on your host that could start more containers10:30
jambecause from within a container, you cannot spawn other containers10:30
tasdomasjam, thanks10:31
jamfwereade: want to join our standup?10:48
fwereadejam, why not :)10:49
jamhttps://plus.google.com/hangouts/_/canonical.com/juju-sapphire10:49
voidspacenatefinch: actually there was a review from fwereade that I missed - with a few changes needed on that mp11:01
voidspacenatefinch: so switching to completing that11:01
natefinchok cool11:02
voidspacefwereade: ping11:16
fwereadevoidspace, pong11:16
voidspacefwereade: about your review comments on the rsyslog branch11:16
voidspacefwereade: specifically, dropping the Port field on RsyslogConfig11:17
voidspacefwereade: I did start down that road11:17
fwereadevoidspace, oh yes?11:17
voidspacefwereade: it means having RsyslogWorker creation plus template rendering use HostPorts instead of the global Port11:17
fwereadevoidspace, yeah, that was the plan in my mind11:18
voidspaceunfortunately at bootstrap time we have a global port and not a set of HostPorts available11:18
voidspaceso it means threading this api change through several layers of architecture in two places (initial creation plus in the worker handle)11:18
voidspacethat was quite an invasive change (not *too bad*)11:18
voidspacehttps://code.launchpad.net/~mfoord/juju-core/ha-rsyslog-api/+merge/22008711:18
voidspaceI made the code changes, but that broke a metric crapload of tests *too* that would also need fixing11:19
voidspace(and I'm a little uncertain about what I've done with worker creation - but I can talk that through with someone)11:19
voidspacefwereade: so it seemed like quite a lot of extra work for something we *might* use in the future (switch away from a global port)11:20
voidspacefwereade: so in discussion with natefinch it seemed like defering that work until we actually needed this capability was more sensible11:20
voidspacefwereade: would you rather I spent the time on it now?11:20
fwereadevoidspace, heh, I see -- tbh those changes do look like a win to me (although there's still the odd Port sitting around?), but let me think a sec11:20
fwereadevoidspace, the main thing is that if we have HostPorts in the API but don't use it, there doesn't seem much point to that11:21
voidspaceit's an initial step...11:21
voidspaceit means when we do switch the GetRsyslogConfig already supports it11:22
voidspacethe *API* already supports it11:22
fwereadevoidspace, right, but unless that step is imminently followed by further steps in the same direction its value is somewhat limited11:22
voidspacewell, it means when we do make the switch it doesn't require a backwards incompatible API change11:22
fwereadevoidspace, versioning is coming along apace, thanks be to jam11:22
voidspaceswitching template rendering etc to use it - but still *actually* only storing and using a global port would be just as pointless11:23
voidspacebut more work11:23
voidspaceeven with these changes (plus maybe pulling the Port out of syslogConfig altogether) wouldn't change the fact that we're only *really* using a global Port11:23
voidspaceit would just mask it further11:24
fwereadevoidspace, agree -- but each, in the absence of the other, is just a speculative change, and they rarely work out well11:24
voidspaceso yes, fewer changes to make in the future - but no actual change in behaviour11:24
fwereadevoidspace, getting the mask in place between the api server and the rest of the world is imo a good sort of masking11:24
voidspacefwereade: but even with this extra work, it's *still* a speculative change11:24
voidspacefwereade: right, yep11:25
voidspacethat is true, it leaves the only place that thinks in terms of a global port being the internal database11:25
fwereadevoidspace, it eliminates the assumption of a single port among the api clients11:25
voidspacefwereade: it sounds like you'd rather I did it11:25
fwereadevoidspace, what happens under the covers is exposed to far fewer people ;)11:25
fwereadevoidspace, I would, yeah11:26
voidspaceok11:26
voidspacenp11:26
fwereadevoidspace, tyvm11:26
natefinchsorry to throw a wrench in things, guys.  It just sounded like more work was being added to support a feature that may or may not ever be implemented, and I wanted Michael to be able to move on to other projects.11:27
voidspacefwereade: natefinch: shall I do this as a separate CL - it's going to be quite a big diff against the existing branch11:35
voidspaceso I can address the *other* comments from fwereade in the existing CL and then work on the new one11:35
natefinchvoidspace: that sounds like a good idea11:36
voidspacefwereade: ah, there's a difficulty with eliminating use of Port altogether11:39
voidspacefwereade: when we start a new state server we need to pick a port to use11:39
voidspacefwereade: and the "State" needs to *know* which port we picked, because it needs to associate the state server with that port to return in RsylogConfig.HostPorts11:39
fwereadevoidspace, does that happen at the same time as we generate the cert?11:40
voidspacefwereade: to be honest I'm not sure how we pick the initial port - let me check11:40
voidspacefwereade: hmmm... jujud/agent doesn't pass a port and the worker is started with a port of 011:43
fwereadevoidspace, so, wait, we have an env config setting that's just ignored?11:43
voidspaceensureCertificates doesn't set a port11:44
* fwereade wonders why it's env config in the first place then :/11:44
voidspacefwereade: we must be setting it somewhere - because HA does set the correct port11:45
voidspaceI just haven't found it yet11:45
voidspacefwereade: hah11:46
voidspacefwereade: we have DefaultSyslogPort in environs/config/config.go11:46
fwereadevoidspace, that syllable rarely preceds good news11:46
voidspacefwereade: what happens is that we use port 011:47
voidspacefwereade: when we set the cert it causes a rewrite of the config which requests the port from EnvironConfig11:47
voidspacefwereade: which returns the DefaultPort, which is what we use11:47
voidspaceand port 6541 is what I always see used (the default)11:47
voidspacewe have an api to change the port though11:47
fwereadevoidspace, ah, ok, but someone might have set it to something different, and in that case it would be used?11:48
voidspacelet me see where that's called from11:48
voidspacefwereade: yes, if it's changed we would (previously anyway!) see the change and rewrite11:48
voidspacefwereade: axw is certain that the port is in the config when the worker is created - so we should be safe (and indeed we will make the port immutable once set)11:48
* fwereade is somewhat reassured11:49
voidspaceheh11:49
voidspacehmmm... no, we only have an api to set the cert11:50
voidspacesetting the port has to be done through environconfig I believe11:50
voidspacefwereade: sigh, so I don't think it's set deliberately in our code - we always use the default11:52
voidspacefwereade: so the only way it would be set would be by users doing it - and we wouldn't pick up that change with our new code11:52
voidspacefwereade: so I need to talk to axw again about the motivation for allowing it to be changed11:52
voidspacefwereade: if there's a real use case then we need to still support it11:52
voidspacehe said it was because previously it could pick a privileged port and rsyslog refuse to start11:53
voidspacebut with our default of 6541 I can't see that being the case now11:53
voidspaceit maybe that the initial starting of the rsyslog worker was picking a privileged port when we give it port 011:54
voidspacebut as far as I can see we *always* overwrite that immediately - we don't set back the port the system gives us11:55
wwitzel3hello11:56
voidspacewwitzel3: morning11:58
voidspacefwereade: what that means though is that we *don't* have a way to pick a port for rsyslog - we use the default or one the user has set11:59
voidspacefwereade: so a new state server coming online either has to have a new way of picking a port, and that needs to be stored associated with the server11:59
voidspacefwereade: or we still have to use a global one11:59
voidspacefwereade: meaning I can't eliminate it from the api client12:00
voidspacefwereade: we could call it "DefaultPort", and it would only be used by state servers not by units12:00
voidspaceand setting the environ config would only change the default port for new state servers12:00
fwereadevoidspace, that doesn't seem quite right either12:00
fwereadevoidspace, although... there's something funny about having the same RsyslogConfig for servers and clients, isn't there? I'm not sure we should be getting the info from the same call12:02
voidspacefwereade: the part of the state server config that specifies the port to listen on is a separate part to the bit where we specify forwarding rules12:03
voidspacefwereade: so conceptually there is a difference between "the HostPorts to forward to" and "the port to listen on"12:03
voidspaceand if we eliminate Port now, it's harder to communicate a *port change* which is a compatibility issue12:03
fwereadevoidspace, ok, so, if we keep Port and document it as "the port this server should listen on"; and also have HostPorts meaning "where you should send your logs", we're essentially fine modulo the semantic drift, which probably doesn't hurt us much?12:04
voidspacefwereade: I concur12:05
fwereadevoidspace, and again the fact that Port is always the same is something we *can* vary per-server if we want to , without changing anythying outside the API12:05
fwereadevoidspace, ok, cool12:05
fwereadevoidspace, keep Port but make it clear what it's for12:05
voidspacewe can't really eliminate Port from the API client until we start properly storing HostPorts in the db, and have state servers pick a port and store that information12:05
voidspaceyep, we can still do that without changing the api12:06
fwereadevoidspace, ok, sgtm, thanks12:06
voidspacewwitzel3: I'm addressing William's comments on our CL12:08
wwitzel3voidspace: got my coffee, reading the review and chat here12:13
voidspaceI'm going on lunch12:24
voidspacewwitzel3: I'll sync up with you when I'm back12:24
wwitzel3voidspace: sounds good12:25
axwvoidspace: the use case was purely for supporting upgrading existing environments to TLS without triggering the privileged port/drop-to-root race in rsyslog12:25
axwvoidspace: we don't need to do this anymore, as of 1.19.x12:26
axwvoidspace: I think let's just make it immutable again12:26
axw(it used to be)12:26
axwvoidspace: also, the default used to be a privileged port12:27
voidspacedammit, dammit12:42
voidspaceI mean, what axw said is *great*12:42
voidspacebut I forgot I have a dentist appointment today12:42
voidspaceso I'm back off lunch, but will be going out shortly and not back until later12:43
wwitzel3gotta keep those teeth healthy12:43
voidspaceheh, yeah12:43
perrito666voidspace: uh, you reminded me12:43
voidspaceperrito666: sorry :-)12:43
voidspaceI completely forgot about it until now12:43
* perrito666 changes his dentist appointment by one week bc he accidentally let himself without health care for a month12:44
hazmatanyone know the  reason add-unit does a tools lookup instead of using the env existing tools?12:52
natefinchI'm sure someone knows12:53
natefinchbut not me12:53
* hazmat files a bug12:55
voidspacefwereade: if we no longer support setting rsyslog port at all, should I remove upgrades/rsyslogport.go?12:55
voidspacefwereade: it would only ever set the port to the DefaultSyslogPort anyway12:55
voidspacefwereade: the use case was for an older version of juju anyway12:56
fwereadevoidspace, I would prefer not to drop anything from upgrades until I can no longer think of any way anyone could possibly be running an old enough version to qualify13:00
voidspacefwereade: well, it's just that if the port is immutable then that code can't succeed13:01
voidspacefwereade: unless we make it "immutable unless switching to the default"13:01
voidspacefwereade: but we'd like to be able to guarantee that the port can't change13:01
voidspacefwereade: so the watcher can ignore environ config altogether13:01
fwereadevoidspace, or immutable unless switching from unset (and being sure that it's always set on bootstrap ofor newer envs)13:02
fwereadevoidspace, wait, possibly that made no sense13:02
voidspacefwereade: we *always* use default, except on an existing system where it may have been changed13:02
voidspacefwereade: upgraded from 1.16 to 1.18 will switch to default13:02
voidspacefwereade: and we don't support 1.16 to 1.20 directly I don't believe13:03
fwereadevoidspace, but it's in env config, won't we use whatever was already there?13:03
voidspaceso 1.20 doesn't have to consider a *change*13:03
voidspacewe will use whatever is already there13:03
voidspacethe question is - do we have to watch for changes13:03
voidspacethe use case for permitting change was for the upgrade13:04
voidspacethere's no such value as "unset" really I believe - just Default or non-default. If we allow changing away from default *at all*, then we need extra complexity in the watcher to handle the port changing13:05
voidspaceand post 1.18 there's no actual use case for that13:05
voidspaceis the "upgrades/*" code used by the *client*? If a 1.20 client might run against an earlier server then maybe we still need that code.13:07
voidspaceBut that code should fail against a 1.20 server.13:07
fwereadevoidspace, the upgrades code should not be used by the client, no, I think we're ok there13:09
fwereadevoidspace, (sorry, workman interruption, reloading state)13:10
fwereadevoidspace, IIRC you don't have to watch for changes anyway13:10
fwereadevoidspace, the watcher will always fire once when the agent bounces, and it'll always bounce on upgrade13:10
voidspacefwereade: right, but it's not the upgrade that's the problem - it's if we don't make it totally immutable it could change at *other* times13:11
voidspaceand *then* we'd have to watch for changes13:11
voidspaceunless I can make it "immutable except during upgrade"13:12
voidspacethere's no "unset" value I don't think13:12
fwereadevoidspace, well, before it existed it would simply not have been there, right?13:13
fwereadevoidspace, ah, ok, but it's inserted automatically when we read a config without it13:14
fwereadevoidspace, hmm, in which case, yeah, I don't see the point of that upgrade step at all13:15
fwereadevoidspace, I think you can drop it, but get axw to review it as well13:16
fwereadevoidspace, on a separate note13:16
fwereadevoidspace, jobs in agent config vs jobs from the API13:16
voidspaceok13:16
fwereadevoidspace, which we happen to use at any given time seems pretty random13:16
fwereadevoidspace, is there a pattern I'm not seeing?13:16
voidspacefwereade: what do you mean by "jobs"? :-)13:17
fwereadevoidspace, entity.Jobs() vs agentConfig.Jobs()13:18
natefinchfwereade: if there's two sources of truth, a programmer will use whichever one he stumbles on first13:18
fwereadevoidspace, quite so13:18
voidspacefwereade: I don't see either used in our CL13:18
fwereadevoidspace, I had a vague recollection that you were doing something around that area in your first sprint, but maybe you were just in the conversation13:19
voidspacefwereade: ah, not something I recall I'm afraid13:19
fwereadevoidspace, no worries13:19
fwereadedimitern, does the Jobs() thing above ring a bell for you?13:19
* dimitern reads scrollback13:20
natefinchfwereade: I've faced that dilemma - where to get it.  is there a right place and a wrong place?  If we have two places, can we consolidate them, or at least hide one so we don't confuse ourselves?13:20
natefinchfwereade: I was talking about this with perrito666 because he was doing work in APIWorker to only connect to localhost for the API if we're on a state server, but it seemed like we needed to connect to the API first to determine our jobs.  Maybe we missed where the jobs were held in the agent config13:21
fwereadenatefinch, well, the jobs from the state server should be authoritative13:21
dimiternfwereade, it's not random at all - Jobs from agent config is used only before we have an api connection, then we use API Jobs13:21
dimiternvoidspace, ^^13:22
fwereadedimitern, but we don't update config jobs based on api results, right?13:22
fwereadedimitern, mainly because jobs don;t change -- yet -- I guess13:22
dimiternfwereade, no, they're not updated13:22
* perrito666 feels summoned13:22
fwereadedimitern, do you remember why we need jobs before we have an api connection?13:23
fwereadenatefinch, fwiw there's a Jobs method on agent config13:23
natefinchfwereade: well, in the example I was talking about, we were using jobs to determine which API to connect to13:23
dimiternfwereade, to know what workers to start in the agent?13:23
fwereadedimitern, what workers need to be started before we're connected, that can't be determined trivially by looking for whether we have api-connect info and/or state-connect info?13:24
fwereadedimitern, natefinch: ie, always connect to the api; and if we can connect to state, do so13:24
voidspacedimitern: thanks13:27
dimiternfwereade, i'm not saying it's not shit, it is :)13:27
voidspaceok, folks - off to the dentist13:27
voidspaceit's in the next town over, so I'll be a while13:27
dimiternfwereade, we should not use agent config Jobs or other "cached" stuff for that matter before we connect to the api13:28
wwitzel3voidspace: gl :)13:28
fwereadedimitern, I'm not quibbling there, I'm really just trying to determine the diet that led to the substance in question13:29
perrito666voidspace: beautiful, across town travel with half face asleep13:29
fwereadevoidspace, take care13:29
TheMuejam: you discussed about the charm implications of the network model. that’s not in the agenda table. add?13:30
dimiternfwereade, for agent config Jobs() existence specifically, I'm to blame, but I just moved them from the Values map to a config field13:35
fwereadedimitern, no worries, I'm happier having them there than in Values13:36
dimiternfwereade, you can probably find the reason following the changes around adding the jobs to the map in the first place13:36
fwereadedimitern, just trying to unpick jujud a little bit, it's triped all my needs-fixing flags :)13:36
dimiternfwereade, but i really am not the best person to ask why do we have them13:36
fwereadedimitern, not to worry, thanks for the nuggets you supplied :)13:37
dimiternfwereade, thumper / rog know more most likely13:37
dimiternfwereade, ;)13:37
fwereadedimitern, hmm, I did not actualy mean nuggets of shit there, sorry13:37
* dimitern hears for that type of nugget for the first time :)13:37
natefinchlol  when you have kids, you get to know lots of types of nuggets13:40
natefinchand shit13:40
jcw4fwereade: regarding the CL https://codereview.appspot.com/98260043/ ... you'd mentioned cloning the Unit.  I thought that would be at least the same db impact as what I'm doing by checking the u.doc.Life in mongo directly?13:41
fwereadejcw4, the trick is only hitting the db after you've failed a transaction, and doing that is often a bit tedious to arrange cleanly13:45
fwereadejcw4, "if i != 0" is about as nice as it gets iirc13:45
fwereadejcw4, and that still has a little ickiness about it13:46
jcw4fwereade: I see.  Other than that and punting on the contention simulation I think everything else is ready to submit...13:46
jcw4fwereade: I was kinda waiting for your cleanup refactor to land to introduce actions cleanup13:47
fwereadejcw4, excellent, I'll take a quick look and approve in a bit13:47
jcw4fwereade: tx13:47
fwereadejcw4, good point13:48
fwereadenatefinch, dimitern: either of you free to review https://codereview.appspot.com/94540043/ ?13:48
jcw4fwereade: mgz may be interested too?13:49
fwereadejcw4, good point, yeah; mgz ^^13:49
dimiternfwereade, i can look a bit later if not too late13:50
natefinchfwereade: sure13:50
jcw4forgot to lbox propose it again...13:50
jcw4okay done13:53
fwereadeoh WTF13:55
dimiternfwereade, vladk, https://codereview.appspot.com/98430044/ updated - final look while i'm waiting for gustavo?13:56
fwereadewe don't even use the jobs in agent config, except in the StateWorker, which we only start if we have StateServingInfo available in the first place13:56
fwereadeand while it might indeed be nice to separate jobs that connect to state from jobs that cause state to exist, we don't have a distinction there at all currently13:57
fwereadenext does-anyone-know question: (1) we still have minunitsworker running against state, does anyone have any idea why? (2) we have all this "singular" crap in stateworker, does anyone know why?13:59
natefinchfwereade: the singular stuff is to ensure we only have one of them running in the environment, in case of HA where we have multiple state servers14:00
fwereadenatefinch, right, but those are all tasks that are meant to work with multiples14:00
wwitzel3natefinch: standup?14:02
natefinchwwitzel3: thanks for reminding me14:02
wwitzel3np :)14:02
fwereadenatefinch, it's quite nice to have minunitsworker singular I guess14:02
fwereadenatefinch, but resumer should certainly be running everywhere14:02
fwereadenatefinch, and cleaner should also be fine, I think14:03
fwereade(grumble grumble, why is resumer only started after upgrade?)14:04
natefinchfwereade: voidspace did that work with roger I think.14:08
fwereadenatefinch, cool, I'll see what he remembers when he gets back14:09
dimiternniemeyer, hey hey14:23
dimiternniemeyer, i've updated again https://codereview.appspot.com/98430044/ - included more tests and simplified the code a bit, can I get an LGTM? :)14:23
niemeyerdimitern: Will have a look14:24
dimiternniemeyer, thanks!14:25
niemeyerdimitern: Have you found anyone with good knowledge on those areas of EC2 to have a look over it?14:25
dimiternniemeyer, it seems only vladk has more experience with ec2/vpc/nic stuff, I asked for a review14:26
dimiternniemeyer, but in any case, i have a parallel juju branch that depends on those changes and it does seem to work for what we need14:27
niemeyerdimitern: Can I nitpick a bit about the comment?  It'll probably be useful in future code..14:27
niemeyer  404                         // If default-vpc were provided, create them and their14:27
niemeyer  405                         // subnet.14:27
niemeyerThis is right after14:28
dimiternniemeyer, yes?14:28
niemeyer403                 if attrName == "default-vpc" {14:28
niemeyerdimitern: At this point, it's not "if".. the attribute *was* provided14:28
niemeyerdimitern: and "them" is context-less there.. you are not creating attributes, I assume14:28
dimiternniemeyer, "them" refers to the default vpc14:29
niemeyerdimitern: That's not what the first part of the sentence refers to14:29
niemeyerdimitern: It's talking about the defalut-vpc attribute14:29
natefinchfwereade: looking at the review you mentioned about setting departed on dying units' relations... what does it mean for a relation to be in scope?14:29
niemeyerdimitern: I'd suggest something along the lines of14:29
dimiternniemeyer, well, it's both the attribute name and what it signifies14:29
niemeyerdimitern: // The default-vpc attribute was provided, so create the respective VPCs and their subnets.14:29
niemeyerdimitern: No, it's not14:30
dimiternniemeyer, sgtm, will change it14:30
niemeyerdimitern: It's the attribute that was provided14:30
niemeyerdimitern: You cannot provide the VPC object14:30
niemeyerdimitern: Either way, that's FWIW really..14:31
dimiternniemeyer, that's correct, you just provide it's id in the values slice of the attribute named "default-vpc"14:31
dimiternniemeyer, I see how it's confusing and will rephrase it as you suggest14:31
perrito666´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´14:32
perrito666´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´'14:32
perrito666ouch sorry dropped my external kb over the laptop14:32
niemeyerdimitern: Thanks.. I'd not bikeshed for this instance alone.. the comment might even go away entirely since the code is clear enough, but keeping that kind of thing in mind has a chance of improving other comments in future code14:32
fwereadenatefinch, I haven't written that bit up yet: quick hangout?14:33
natefinchfwereade: sure, cool14:33
=== Ursinha is now known as Ursinha-afk
niemeyerperrito666: I thought it was a big quote for an upcoming text file!14:33
fwereadenatefinch, popping into moonstone14:33
niemeyerperrito666: Glad it wasn't ;)14:33
niemeyerdimitern: The trick of having the comment inside the if block is a good one I learned not too long ago14:34
niemeyerdimitern: It enables phrasing such as "We have a foo, do bar."14:34
dimiternniemeyer, +1 good point14:35
niemeyerdimitern: Instead of "If the world is in the proper conditions then we'll have a foo, and be able to do bar."14:35
wwitzel3lol .. when I read fwereade cooment to natefinch I added mentally replaced that second p with an o .. now I can't stop laughing.14:35
* wwitzel3 is mature.14:35
* dimitern is afk for some time14:36
fwereadehaha14:41
natefinchwwitzel3: lol14:41
=== Ursinha-afk is now known as Ursinha
TheMue*rofl*14:52
niemeyerdimitern: I still don't get the logic around this:14:55
niemeyerif len(ifaceToCreate.PrivateIPs) > 0 {14:55
niemeyer        primaryIP = ifaceToCreate.PrivateIPs[0].Address14:55
niemeyerThe new comment you added says14:56
niemeyer  732                 // To simulate that, we need to set PrimaryIPAddress of the14:56
niemeyer  733                 // NIC and empty the PrivateIPs when there is only one address14:56
niemeyer  734                 // specified there.14:56
niemeyerBut nowhere does it check that there is a single entry in that list14:56
niemeyerIt just picks up the first one blindly and considers it as the primary ip14:56
niemeyerAt the other end of it, we see14:57
niemeyer    614                                 iface.PrivateIPs = append(iface.PrivateIPs, ec2.PrivateIP{14:57
niemeyerdimitern: I must be missing something14:58
dimiternniemeyer, just a sec14:59
dimiternniemeyer, it my tests AWS behaves like this: if you specify explicit NICs and private IPs in RunInstances, when you get the instance details, the NetworkInterfaces[x].PrivateIPs is populated as you specified15:00
dimiternniemeyer, OTOH if you don't specify NICs, AWS creates one for you with a single private ip assigned, which is the primary, and sets NetworksInterface.PrivateIPAddress and PrivateDNSName, but leaves the PrivateIPs slice empty, i.e. the single ip is not duplicated in the slice and the field15:01
dimiternniemeyer, i forgot to mention that in the first case, PrivateIPAddress is not set15:02
niemeyerdimitern: and what prevents that slice from having 10 entries?15:03
niemeyerdimitern: and why would the first one be primary in that case?15:03
dimiternniemeyer, the first one is the primary, when there's anything in the slice at all - that's my observation15:04
dimiternniemeyer, the slice can have many entries15:05
niemeyerdimitern: Sorry, but I don't get the logic15:05
niemeyerdimitern: There's a: case "PrivateIpAddresses":15:05
dimiternniemeyer, i don't get it either - it's just what I've seen AWS respond with15:05
niemeyerdimitern: In your code15:05
niemeyerdimitern: That adds entries into the iface.PrivateIPs15:06
dimiternniemeyer, yes, that's where PrivateIPs gets deserialized from15:06
niemeyerdimitern: slice15:06
niemeyerdimitern: and has a privateIP.IsPrimary = val15:06
niemeyerdimitern: Assignment15:06
niemeyerdimitern: Based on a "Primary" field15:06
dimiternniemeyer, yes15:06
niemeyerdimitern: There's zero consideration of ordering in that logic15:06
niemeyerdimitern: Why on earth a few instructions afterwards the first one would magically be the primary?15:07
dimiternniemeyer, sorry, I don't understand that question15:07
niemeyerdimitern: It15:07
niemeyerdimitern: It's the only one I've been asking so far :)15:07
niemeyerdimitern: On line 607 there's logic appending to PrivateIPs and handling a Primary boolean15:08
dimiternniemeyer, AWS, when there is more than one private ip, returns a populated PrivateIPs, and usually the first one in there is the primary15:09
niemeyerdimitern: On line 736 there's logic that considers the first IP on PrivateIPs  to be the primary, whatever happened on line 60715:09
niemeyerdimitern: You've said that many times, but it's completely irrelevant15:09
dimiternniemeyer, these are two different things15:10
niemeyerdimitern: Okay, phew.. can you explain how?15:10
dimiternniemeyer, in parseRunNetworkInterfaces, I'm taking AWS request and I'm parsing is as best as I can, because that's what the ec2 provider in juju will be using15:10
niemeyerdimitern: Okay?15:11
dimiternniemeyer, in createNICsOnRun I'm using that to create fake NICs for the instance, so when I get the instance info in juju it will have a NIC15:11
niemeyerdimitern: Well, yes, you've described what both of these functions do15:12
niemeyerdimitern: per their documentation15:12
niemeyerdimitern: Now, what gives them a free pass to create completely bogus data?15:12
niemeyerdimitern: Based on blind assumptions?15:12
dimiternniemeyer, why bogus?15:12
niemeyerdimitern: because parse takes a list of interfaces which explicitly define what is primary.. and create ignores that information entirely and picks the first entry out of the slice15:13
niemeyerdimitern: Again, this is the same point I've been making over and over15:13
niemeyerdimitern: and so far there's no good answer for why that'd be okay15:13
dimiternniemeyer, well, because i'm trying to accommodate an arbitrary user-sent RunInstances + NICs request as AWS would do (all quirks included)15:14
niemeyerdimitern: What quirks?  Do you mean Amazon ignores a Primary: true definition for an interface?15:15
niemeyerdimitern: THat'd be *very* surprising15:15
dimiternniemeyer, and in case the user didn't give any NICs, create one as if the user did, and in that case i control what's in PrivateIPs15:15
dimiternniemeyer, that part of AWS API is unnecessary complicated i think - why have both PrivateIpAddress as a separate field, and a list of PrivateIpAddresses, which can be primary or secondary15:16
dimiternniemeyer, you can even combine both in the same request up to point15:16
niemeyerdimitern: Okay, we've been talking about this for half an hour, and I'm very unconvinced15:16
niemeyerdimitern: I'm copy & pasting that conversation somewhere we can refer to, and will mark the issue as not lgtm15:17
dimiternniemeyer, ok, so to summarize - you suggest to change the code in createNICs to either use the stand-alone PrivateIPAddress as primary, or scan PrivateIPs to find it15:17
niemeyerdimitern: Yes, I suggest doing something minimally sensible and internally consistent..15:18
dimiternniemeyer, will that be ok?15:18
dimiternniemeyer, ok, will do it then and repropose15:18
dimiternniemeyer, in the mean time I'd appreciate other suggestions on the rest of the CL, if you have them15:19
niemeyerdimitern: Sent15:25
dimiternniemeyer, cheers15:26
perrito666wwitzel3: if you have a moment let me know if that mail I sent is accurate, so I can actually write docs with it15:27
perrito666wwitzel3: I am a bit rust at mecanography, at least in english15:28
wwitzel3perrito666: sure, looking now15:29
dimiternniemeyer, updated https://codereview.appspot.com/98430044/ again - this time the code around PrivateIPs in createNICs should be straightforward; also fixed the comment and the error message15:49
dimiternhazmat, ping15:49
hazmatdimitern, pong15:50
dimiternhazmat, quick question: are you comfortable enough with EC2 networking API for VPC to review this? https://codereview.appspot.com/98430044/15:50
hazmatdimitern, looking.15:50
dimiternhazmat, the changes are mostly in the ec2test testing server, improving it to behave closer to the real AWS wrt running instances with/without specified NICs15:51
dimiternhazmat, thanks!15:51
bodie_anyone know offhand what tz mgz is in?15:52
hazmatdimitern, fwiw. default vpc on an acct starts with subnets in several azs15:52
hazmatbodie_, gmt15:52
bodie_thanks15:52
dimiternhazmat, yes, a subnet per AZ15:52
hazmatdimitern, btw. the aws unified cli is a great tool15:52
dimiternhazmat, the ec2-xxx one?15:52
hazmatcan do raw request return, and has wide api coverage15:52
hazmatdimitern, no.. the python one.15:52
hazmatdimitern,  https://aws.amazon.com/cli/15:53
dimiternhazmat, haven't used any aws cli that much - will check it out, thanks15:53
hazmatdimitern, they used to random hodgepodge by each team in different languages, they rewrote based on json description of the api with python frontend, much nicer to work with, but also easy to determine exact params on apis15:54
dimiternhazmat, that is indeed useful, would've saved me a few hours of wireshark usage :)15:55
hazmatdimitern, default-vpc doesn't have a name15:56
dimiternhazmat, name? i don't think any one has15:57
mgzbodie_: gmt+1 atm16:01
hazmatdimitern, nevermind.. i got thrown by 'default-vpc' == Attributes[0].Name .. but that's just  describe account attributes resposne.16:02
dimiternhazmat, ah :)16:03
bodie_mgz, hua16:03
hazmatdimitern, re awscli fwiw.. http://pastebin.ubuntu.com/7497943/16:03
dimiternhazmat, interesting - the api docs do not describe most of these16:06
hazmatdimitern,  these commands also have builtin detailed parameter help16:06
* dimitern is going now, might be back later16:16
bodie_how does the frontend talk to the client api?16:20
bodie_is there an http service or does it go through sockets?16:20
bodie_I'm familiar with the CLI client api interface16:21
bodie_I suppose that info will be in doc/api.txt :)16:21
hazmatbodie_, via an api client that uses websockets16:23
hazmatbodie_, parts of the api are over https (charm upload, log download), but most goes over the websocket16:23
bodie_so via cmd/*?16:23
hazmatbodie_, yes.. cmd/* are cli commands that use state/api  client16:24
hazmatbodie_, did you guys know go before you started this project?16:24
bodie_I just want to make sure I'm understanding you right, the web frontend also uses that command client?16:24
bodie_I'd experimented with and explored it a bit but I wouldn't say I was quite intermediate even really :)16:24
jcw4hazmat: some, but this is my first production code Go project16:26
bodie_I'm from a C / Java background so it's been a pretty natural fit outside of some of the RPC and interface{} bits16:26
bodie_why do you ask?16:28
hazmatbodie_, the webfront end uses the a javascript implementation of the same16:30
hazmatbodie_, the webfront talks via the websocket protocol using a js client implementation of the api.. there's also a python-jujuclient that exposes the same client api in python.16:31
hazmatbodie_, ie. api not cli implementation16:31
hazmatbodie_, jcw4  just curious about ramp-up time16:31
bodie_I see16:32
bodie_so we expose the stateservice endpoints and the js client will have methods written to map to them, I suppose16:33
jcw4hazmat: for me the big ramp up time is learning juju, not so much Go16:34
jcw4hazmat: although to be fair I do need to learn and internalize some of the Go idioms better16:35
hazmatbodie_, yes16:37
jcw4<fwereade> natefinch, dimitern: either of you free to review https://codereview.appspot.com/94540043/ ?17:29
jcw4mgz?  :-D17:29
mgzjcw4: on it17:31
jcw4mgz: ta17:32
mgz(thanks for the poke :)17:32
jcw4:)17:32
jcw4mgz: any luck on that? :)19:15
mgzjcw4: need to hit m, will do shortly19:16
jcw4mgz: yay :)  tx19:16
jcw4mgz: looking forward to more fun comments ;)19:16
hatchhi dpritchett :)19:53
dpritchetthi there19:53
fwereadejcw4, bah, I thought you were looking for a review for yourself, and I jumped straight on it, then...hmm20:02
jcw4_lol20:03
jcw4mgz: is almost done20:03
mgzyup20:03
mgzonly nits really, just got distracted earlier20:03
jcw4I like nits20:03
jcw4better than "what is this shyte?"20:03
jcw4fwereade: any eta on your cleanup refactor landing?20:04
jcw4fwereade: should I just make a dependent branch on that one?20:04
fwereadejcw4, isn't that the one you just ask mgz for a review of? it's rather in his hands ;p20:05
jcw4I thought he was reviewing the one you just finished reviewing of mine?20:06
jcw4fwereade: I'm referring to https://code.launchpad.net/~fwereade/juju-core/use-prepare-leave-scope20:08
jcw4fwereade: I *think* mgz is reviewing https://code.launchpad.net/~johnweldon4/juju-core/action20:09
fwereadejcw4, ehh, who knows, but just above you quoted me asking for a review on mine20:09
jcw4fwereade: doh... I just saw the last few digits of the number and assumed...20:09
fwereadejcw4, there is definitely something funny about codereview.appspot.com, "043" comes up alarmingly often20:10
jcw4fwereade: I'm actually glad... I want that one in soon!  42 +1?20:10
mgzI can do both!20:11
jcw4woo hoo20:11
fwereadehaha20:11
* fwereade cheers20:11
mgzfwereade: yours seems to have some overlap with one I already reviewed?20:11
mgzor I'm getting confused?20:11
jcw4:)20:11
fwereademgz, yeah, it's the followup to that one20:11
jcw4mgz: mine is https://codereview.appspot.com/98260043/20:11
mgzk20:11
fwereademgz, it uses it and renames a bunch of stuff just to keep your life interesting20:12
=== vladk is now known as vladk|offline
mgzjcw4: will payload change type or remain map[string]interface{}?20:21
jcw4afaik it will remain20:21
jcw4mgz: the actual definition is configurable per action, per charm so that's the strongest typing we can achieve imo20:22
bodie_mgz, that's where the json-schema comes into play, so we don't know how the charmer will define his or her params spec20:31
bodie_I'm working through some potential edge cases right now in my tests20:31
bodie_the map[string]interface{} represents a list of arguments, but those arguments could have complex values (is my understanding)20:32
mgzbodie_: yup20:35
jcw4tx mgz20:36
jcw4so mgz : I should add that ErrMatches and you want me to comment Name and Payload in the actionDoc for now?20:40
mgzyeah, that would be nice20:40
jcw4Okay.  No issues with ErrMatches, just cautious about Name/Payload comment, but since we're not using it now and as you suggest we may want to clarify our thinking on it I'll do that and re-submit20:41
bodie_does anyone know the default behavior of json-schema if the "optional" or "required" keys are omitted?20:47
perrito666hey what is the criteria for naming things such as addresser20:53
mgzno erers20:53
perrito666and I am mostly curious about the "er"20:53
perrito666mgz: @more20:53
mgztry not to make it too weird20:54
perrito666ok20:54
bodie_lol20:58
bodie_uniter is pretty weird20:58
bodie_at least there's no errer20:59
jcw4_lol21:02
jcw4mgz: done21:05
mgzjcw4: I think you can go ahead and land then, fwereade any reason not to?21:05
jcw4mgz: pending fwereade approval, do I do something to land that branch?21:06
mgzjcw4: basically mark the proposal on launchpad as approved and set the commit message (to something similar to the description)21:07
jcw4mgz: +1 I'll do that once fwereade approves.  Tx again21:07
bodie_woot, I think I have a good MR here.  next stop will be the Validate function so I'm sure there will be more interesting stuff to come21:09
jcw4bodie_: yay21:09
bodie_https://codereview.appspot.com/9454004421:09
bodie_brb21:09
* jcw4 leaves for a couple hours 21:10
fwereadejcw4, can't figure out why name/payload are commented; otherwise looks fine21:13
fwereademgz, thanks for the review, good points21:13
jcw4fwereade: per mgz21:14
jcw4fwereade: maybe I misunderstood mgz ...21:15
fwereadejcw4, I think he meant "describe them with comments" rather than "comment them out"21:15
jcw4ROFL21:15
jcw4seriously21:15
jcw4okay getting up again21:15
jcw4doh21:15
fwereadejcw4, but to be fair there should probably also be tests that what we getout matches what we put in21:16
fwereadejcw4, I might actually recommend getting some sleep ;p21:16
jcw4I'll uncomment and then comment and then add tests and then resubmit21:16
jcw4;)21:16
fwereadejcw4, cheers21:16
fwereadejcw4, I think I'll be in bed by then, I'm afraid21:17
jcw4no worries. I'll just let it wait til your morning fwereade , thanks21:17
* jcw4 mutters to himself... I thought commenting out was a little weird21:18
mgzjcw4: doh, yeah I did, sorry, not clear enough21:18
jcw4:)21:18
* jcw4 leaves for real this time21:19
fwereadebodie_, https://codereview.appspot.com/94540044/ reviewed21:34
* fwereade goes for a ciggie, might go straight to bed afterwards, but ping me if you need me in case I don'y21:34
wallyworldsinzui: hi, did you have time for a quick catch up?21:54
sinzuiI will in 6 minutes21:54
wallyworldok21:55
sinzuiwallyworld, I am ready22:03
wallyworldsinzui: https://plus.google.com/hangouts/_/gtg7auay67vchcqri3to3a6g4qa22:03
sinzuiwallyworld, it that the full url? I am told the party is over22:04
wallyworldsigh, let me try again22:04
wallyworldhttps://plus.google.com/hangouts/_/gwbfwjemvxm5p7u4jhegwu2aima22:04
sinzuiwallyworld, try inviting me. Google doesn't want me you interrupt your party22:05
wallyworldok, invite sent22:06
=== jcsackett_ is now known as jcsackett
=== dpritchett_ is now known as dpritchett
=== _mup__ is now known as _mup_
waiganiSo Actions in juju. What is that all about? what are 'Actions'?23:04
rick_h_waigani: the idea of an action is a prepackged script that can be run on demand. The primary example is a mongodb "backup" action that can be triggered and will perform a mongodump and place the backup at a location that might be configurable in the action call.23:06
rick_h_waigani: so actions can take some pre-defined input as if script --params23:06
waiganirick_h_: thanks. What would trigger the backup (to go with your analogy)?23:07
waiganii.e. is this pub/sub or command line calls or ...23:08
rick_h_waigani: a command. So you'd juju xxxx mongodb backup --output=/tmp/xxxx.back23:08
rick_h_waigani: so command line calls, but available over the api so the GUI will report and allow users to submit them from there as well23:09
rick_h_waigani: in the future there might be a place for automating actions based on some external controls23:09
waiganirick_h_: right, cool.23:09
wallyworldwaigani: you were looking at this problem, right?   cannot share a state between two dummy environs; old "dummyenv"; new "dummyenv"23:51
waiganiwallyworld: I fixed that one. I had to dummy.Reset() in TearDownTest23:52
wallyworldwaigani: it's still appearing on the bot23:52
waiganihmph23:52
wallyworldmight be in a different place23:52
wallyworldwaigani: can you take aquick peak and see if it is failing in the place you fixed? http://juju-ci.vapour.ws:8080/job/walk-unit-tests-amd64-trusty/317/console23:53

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