thumperwallyworld_: ah, removed that01:36
thumperwallyworld_: any reference there now is by mistake01:37
wallyworld_ah ok :-)01:37
wallyworld_i'll let you fix that and take another look after i finish this bit of work i'm doing01:37
thumperI'm beginning to realise that my mental model of the state stuff is just plain wrong01:57
wallyworld_at least you had a mental model02:03
davecheneyooooooooooooh, juju totally doens't work with the mongodb we ship with raring02:04
davecheneythat is a slight problem02:04
thumperdavecheney: plz fix, kthxbye04:13
thumperdimitern: hey there05:40
thumperdimitern: for the tasks you are doing or done, put your launchpad id in square brackets at the start05:41
dimiternthumper: heyhey05:41
dimiternthumper: in the blueprint?05:41
thumperdimitern: yeah, the work items05:41
dimiternthumper: ok, will do05:41
thumperso like this: [thumper] doing foo: INPROGRESS05:42
thumperdimitern: I'm just touching up the last part of plugins, using text/template etc05:42
dimiternthumper: ah, cool!05:42
dimiternthumper: my point (not that i explained it properly i think) with time.duration vs. floats is you can convert one to the other when generating the script05:43
dimiternthumper: and still have a nice to read code rather than floats05:44
thumperhmm... yeah, perhaps for a public thing, but really worth it for a test?05:44
thumperalso, with some refactoring on the templates, things are more obvious05:44
dimiternwell, tests are people too :)05:44
dimiterni mean we need to read and maintain them as well as other code, and readability helps (with that i'll leave it to your discretion, i don't absolutely insist on it)05:46
dimiternthumper: wrt to api authorization, who do you think should be allowed to call machine.Series(), m.Constraints() and m.Status() - everyone, only admins or only the environment manager node?05:50
dimiternthumper: the cli will need to use all of these in different commands, so maybe restrict them to whoever can use the cli and stop there?05:52
thumperdimitern: sorry, not thought too much about api auth, so not much help here05:52
=== tasdomas_afk is now known as tasdomas
dimiternthumper: np. how's it going in containerland?05:54
thumperdimitern: emailed people earlier05:54
dimiternthumper: ah, missed that, thanks05:55
dimiternthumper: have you seen my mail about the copyrights headers?05:55
dimiternthumper: reading the containers page you wrote, and i remember a discussion we had with william on the way back from oakland about nesting:06:01
dimiternthumper: the idea basically was to expand machine-id to contain a "path" like <root-id>/<type>:<child-id>/<type>:<child-id>/... where all ids are still numbers, and the type is the container type used (lxc, kvm, etc.) e.g. "0/lxc:1/kvm:2"06:03
dimiternthumper: this has some advantages: (1) scoping/namespacing, (2) ability to "move" up the "tree" when needed (e.g. set an ip address request going down from root to most deeply nested level, then back up (setting up networking on each level, etc).06:05
thumperyeah, I remember the discussion, but we also talked about having the machine namespace flat06:06
dimiternthumper: not sure it's the same discussion (i wasn't there on the one you mention, we talked about this later), but william seemed to like the idea; anyways just mentioning lest i forget06:08
* dimitern bbiab06:10
* thumper is away now06:18
thumperdimitern: if I have time.Duration in the struct instead of a float, how do I get the Seconds in the template?06:19
thumperwith a float {{.Seconds}} works06:19
thumpersorry, with a float {{.Sleep}} works06:19
thumperbut I need Sleep.Seconds()06:19
thumpercan't see how to do that in the template06:19
* thumper now away to eat06:19
dimiternthumper: well, i suppose something like this should work: http://play.golang.org/p/5g5fsv-3zn07:19
dimiternthumper: btw sleep(1) also supports arguments like "1m 23s"07:21
thumperdimitern: that isn't inside the template {{ ... }} bits07:26
dimiternthumper: look at {{printf}}07:26
TheMue*: morning07:26
thumperdimitern: nm {{.Sleep.Seconds}} works07:27
dimiternTheMue: hiya07:29
dimiternwallyworld_: consistency isn't everything you know :)07:33
thumperdimitern: last proposal updated, I'm signing off for the night now07:33
thumperciao everyone07:33
rogpeppe1mornin' all08:09
TheMuerogpeppe1: morning08:27
dimiternrogpeppe1: morning08:29
dimiternrogpeppe1: i have a question already08:32
rogpeppe1dimitern: ok08:32
dimiternrogpeppe1: so in order to implement state.AllMachines() -> []*state.Machine, error08:34
dimiternrogpeppe1: what should I put in AllMachinesResults.Machines? []params.Machine or params.MachineInfo? the client expects to have actual machine objects there08:34
rogpeppe1dimitern: []params.Machine08:35
rogpeppe1dimitern: as long as we're keeping Machine separate from MachineInfo08:35
dimiternrogpeppe1: ok08:35
rogpeppe1dimitern: or []*params.Machine if it's more convenient08:35
dimiternrogpeppe1: and then the user can do like machines[0].Id() right?08:35
rogpeppe1dimitern: api.State.AllMachines should look just as it does in state08:36
rogpeppe1dimitern: so you'll need to map the slice, making a *api.Machine for every params.Machine08:37
dimiternrogpeppe1: wait.. actually params.Machine is not right - I need apiclient.Machine08:37
dimiternrogpeppe1: oh yeah08:37
dimiternrogpeppe1: thanks08:37
rogpeppe1dimitern: np08:37
dimiternrogpeppe1: already implemented LifecycleWatcher and EnvironConfigWatcher - no trouble so far08:38
rogpeppe1dimitern: cool08:38
dimiternrogpeppe1: hmm.. params does not import api though - will there be a problem if I import it?08:40
rogpeppe1dimitern: yes08:40
rogpeppe1dimitern: why do you want to import api into params?08:41
dimiternrogpeppe1: to define the slice of machines08:41
dimiternrogpeppe1: in AllMachinesResults08:41
rogpeppe1dimitern: that must be []params.Machine, no?08:41
dimiternrogpeppe1: ah, it'll be api.Machine at client side, i see08:42
rogpeppe1dimitern: yup08:42
dimiternrogpeppe1: do you think it's worth having if len(machines) == 0 { return params.AllMachinesResults{}, nil } (or maybe Machines: make([]*params.Machine, 0) is better) ?08:46
rogpeppe1dimitern: i don't mind. whatever is easiest.08:47
dimiternrogpeppe1: wasn't sure how to convey best the case "empty slice"08:47
dimiternrogpeppe1: but it's up to the client I guess anyway08:48
rogpeppe1dimitern: i think it may be better to always return an empty slice. that way the json representation is [] not nil.08:48
dimiternrogpeppe1: yeah, that what i was thinking08:49
* rogpeppe1 wishes a nil slice encoded as json [] anyway08:49
dimiternrogpeppe1: strictly speaking a nil slice should be either null or undefined in json08:53
rogpeppe1dimitern: i'm not sure. the difference between a nil slice and an empty slice in Go is a subtle one that really isn't that useful to leak out into json.08:54
rogpeppe1dimitern: i can't see a particular use case for allowing a slice to encode as null08:55
dimiternrogpeppe1: yeah actually json doesn't have such a distinction08:55
rogpeppe1dimitern: well anything can be null in json08:56
dimiternrogpeppe1: i'm thinking it's worth having some helper to convert from state.Machine to params.Machine, so we have it at once place, right?08:58
rogpeppe1dimitern: definitely08:58
dimiternrogpeppe1: so can we assume all places using state.IsNotFound(err) will be changed to use api.ErrCode(err) == api.CodeNotFound?09:05
dimiternrogpeppe1: or we need a helper for each such case09:05
dimiternrogpeppe1: ping10:06
rogpeppe1dimitern: pong10:06
dimiternrogpeppe1: ^^10:06
rogpeppe1dimitern: ah, sorry, i didn't see that10:06
rogpeppe1dimitern: yes, we should assume that10:06
dimiternrogpeppe1: cool10:07
rogpeppe1dimitern: although we could add a help too if we wanted10:07
dimiternrogpeppe1: let's see how it'll work when we start changing the agents10:07
rogpeppe1dimitern: +110:07
dimiternrogpeppe1: i'm having difficulty with state.AllMachines at the client side - what should I put in the objType arg of call() ?10:08
rogpeppe1dimitern: i think we probably need a srvState type10:09
dimiternrogpeppe1: ok, will add it then10:10
rogpeppe1dimitern: and srvRoot.State(id string) (*srvState, error)10:10
rogpeppe1dimitern: then you'll use State as the obj type10:10
dimiternrogpeppe1: yeah, like the other objects10:10
rogpeppe1dimitern: yup10:10
dimiternrogpeppe1: but what about st.id ?10:11
dimiternrogpeppe1: i can add it but how shoud i initialize it?10:11
rogpeppe1dimitern: st.id ?10:11
dimiternrogpeppe1: st.call("State", st.id ...10:12
rogpeppe1dimitern: ah, i think we should enforce it as blank10:12
dimiternrogpeppe1: in srvRoot State(id string) ?10:13
rogpeppe1dimitern: at some point in the future, we'll potentially be able to connect to several states through the API, and then the id will be useful10:13
rogpeppe1dimitern: yes10:13
dimiternrogpeppe1: ok10:13
rogpeppe1dimitern: same as with Client10:13
daniloswhoops, forgot about OCR :)10:18
=== ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: danilos | Bugs: 8 Critical, 68 High - https://bugs.launchpad.net/juju-core/
rogpeppe1danilos: hiya10:19
danilosrogpeppe1, heya10:19
dimiterndanilos: yo10:19
dimiternrogpeppe1: actually AllMachinesResults now will have Machines []string instead (ids) and client-side I'll range over it and call st.Machine(id) for each, right?10:23
rogpeppe1dimitern: i don't think you should do that10:23
rogpeppe1dimitern: i think you should return all the info10:24
dimiternrogpeppe1: I only need the id to wrap it with a api.Machine10:24
dimiternrogpeppe1: but that I don't have in params.Machine10:24
rogpeppe1dimitern: i don't think you want an extra n round trips10:24
rogpeppe1dimitern: ah, well params.Machine should have it10:25
dimiternrogpeppe1: all details?10:25
dimiternrogpeppe1: or only the ones I need right now10:25
rogpeppe1dimitern: just what you need right now10:25
dimiternrogpeppe1: ok, this also means changing srvMachine.Get() to return the Id (now both this and the range loop in AllMachines use the same helper: stateMachineToParams(stm *state.Machine) *params.Machine)10:27
rogpeppe1dimitern: that seems fine. it should only affect stateMachineToParams, right?10:27
dimiternrogpeppe1: yeah10:27
dimiternrogpeppe1: and I'll have the reverse helper in apiclient: paramsMachineToAPI(?)10:28
rogpeppe1dimitern: sounds reasonable.10:29
dimiternrogpeppe1: except I can't do it that10:29
rogpeppe1dimitern: no?10:29
dimiternrogpeppe1: ah, no sorry api.Machine has doc which is params.Machine10:30
rogpeppe1dimitern: yu10:30
dimiternrogpeppe1: who should be able to call m.Constraints() and m.Status() wrt permission checks? everyone (deny: "user-admin", "user-other") ?10:37
rogpeppe1dimitern: i think allow: "machine-0", "machine-1"10:39
dimiternrogpeppe1: how about juju status?10:39
rogpeppe1dimitern: that wil be part of the client API10:39
dimiternrogpeppe1: really? that simplifies things then ok10:40
rogpeppe1dimitern: yeah, we already have an isAgent check in srvRoot.Machine, i think10:41
dimiternrogpeppe1: strictly speaking only the environ manager uses these two now10:41
dimiternrogpeppe1: so allow "machine-0" to be as restrictive as possible10:41
rogpeppe1dimitern: i think it's reasonable that a machine can get its own info10:41
dimiternrogpeppe1: it *sounds* reasonable but we never cared about this in the machiner10:42
rogpeppe1dimitern: i'm ok if you want to deny access to everything but the environ manager10:43
dimiternrogpeppe1: let's do that for now, we can expand it later when we get to the MA itself and the other tasks10:43
jamwallyworld_: is there anything particularly in your chain of branches that I can unblock. I've reviewed a bunch of stuff, but I don't have the knowledge of the thread that you do.11:01
wallyworld_jam: thanks for asking. just one more :-) https://codereview.appspot.com/9606046/11:03
wallyworld_thanks very much. you and dimitern have been very awesome in doing all the reviews11:03
jamwallyworld_: yeah, I was looking at that one now11:03
jamthough it seems not in-the-critical-path to getting the others landed11:03
wallyworld_it needs to be done so that https://codereview.appspot.com/9603044/ can land11:04
jamdanilos: poke11:30
wallyworld_danilos: if you want a review to do https://codereview.appspot.com/9545045/11:33
wallyworld_it's an easy one11:33
daniloswallyworld_, you've got conflicts in there (or at least the conflict markers)11:45
* wallyworld_ checks11:46
wallyworld_jam: i got permission denied trying to add you/mark etc as a watcher on my rt #6161311:59
_mup_Bug #61613: Can't run liferea with main window hidden <Dapper Backports:Fix Released> <liferea (Ubuntu):Fix Released> <https://launchpad.net/bugs/61613>11:59
jamwallyworld_: I get an error as well.12:01
dimiternrogpeppe1, TheMue: sorry guys I'll have to skip kanban today - i did move all my cards accordingly12:02
jamwallyworld_: try just replying to the ticket, and then including john.meinel@canonical.com in a CC field12:02
rogpeppe1dimitern: np12:02
jamwallyworld_: I just sent an email to derykc12:04
wallyworld_i just cc'ed12:04
jamwallyworld_: I saw the email12:04
wallyworld_that was quick12:04
wallyworld_i only *just* hit send12:04
jamwallyworld_: though it just puts me in a one-time message12:04
jamvs the default CC12:04
jamso we want someone to update it.12:05
wallyworld_better than nothing i guess12:05
=== dimitern is now known as dimitern|afk
hazmat`mgz, ping12:37
=== hazmat` is now known as hazmat
TheMuerogpeppe1: btw, I know found on my own what I wanted to ask by digging into the whole coudinit stuff12:56
rogpeppe1TheMue: cool12:56
jammgz: I figured out the bug for tarmac13:00
danilosjam: btw, the roundtrips to mongo are 70ms? that sounds like a lot: is that on the unix socket or over tcp/ip?13:00
jamdanilos: that is running from the client sitting in the hotel in Oakland13:01
jamstuff like 'juju status' is evaluated client-side ATM13:01
danilosjam: oh, right, I see13:01
jammgz: It turns out that Tarmac uses launchpad's API to find "bzr_identity" for a given branch.13:01
danilosjam: if it went through api server it would have gone much quicker, understood13:01
jamso if you say [lp:~go-bot/goose/trunk] tarmac connects to lp, but then tries to load the config item for lp:goose13:02
jam(the canonical name)13:02
jamand since that doesn't have any config, it just says "ok, everything Approved is ready to land"13:02
jamdanilos: presumably the api server has much lower overhead, yes.13:02
jammgz: which also explains why everything worked in testingb13:02
jambecause it *wasn't* lp:goose yet13:03
danilosjam: ack, thanks for explaining it13:04
rogpeppe1danilos, jam, mgz, TheMue: i'd appreciate a review of this: https://codereview.appspot.com/964304313:05
danilosrogpeppe1, taking a look13:05
TheMuerogpeppe1: *click*13:06
TheMuerogpeppe1: done13:22
rogpeppe1TheMue: thanks13:22
=== BradCrittenden is now known as bac
rogpeppe1TheMue: responded13:32
TheMuerogpeppe1: *clickAgain*13:33
niemeyerrogpeppe1: We have a meeting in ~5013:40
rogpeppe1niemeyer: ah, thanks - i hadn't seen an invite13:40
rogpeppe1niemeyer: anything you want to chat about prior to it?13:41
=== rogpeppe1 is now known as rogpeppe
niemeyerrogpeppe1: You seem to be there in the event13:41
niemeyerrogpeppe: Hmm.. given it's still a preliminary meeting, we can probably exchange ideas during it13:41
niemeyerrogpeppe: Have you read that document + comments?13:42
rogpeppeniemeyer: not ye13:42
TheMuerogpeppe: replied again13:43
niemeyerrogpeppe: That might be good to have a quick look before the call13:43
rogpeppeniemeyer: i definitely will do13:43
=== wedgwood_away is now known as wedgwood
rogpeppedanilos: responded13:58
=== tasdomas is now known as tasdomas_afk
danilosrogpeppe, LGTM, worker.Runner/worker.Worker does sound better, but ultimately your call (this might make it easier to extract in the future)14:36
allenapbac: Eyup lad. Are you using anything like socket.io in juju-gui?15:32
=== wedgwood is now known as wedgwood_away
bacallenap: no15:34
allenapbac: Just plain websocket, or something in YUI? Btw, "eyup lad" is a greeting in gmblish.15:35
allenapIn case you didn't know whether to feel insulted or not.15:36
bacallenap: i always default to insulted until proven otherwise15:37
bacallenap: we use the reconnecting-websocket.js package15:38
allenapbac: Was there a conscious decision to use that over something else, or was it just convenient and close to hand? (Wow it's small; that's neat.) Would you recommend it?15:42
bacallenap: i wasn't in on that decision.  you may want to quiz hazmat15:43
hazmatallenap, its a very thin layer over websocket.. to you know reconnect ;-)15:44
hazmatallenap, we're basically using a raw  websocket, the gui has several abstractions built on that.. the gui itself while yui.. focuses mostly on the backbone app framework style of yui15:45
hazmatallenap, socket.io is basically just particular conventions around websocket,  pub/sub .. chatrooms, etc.  most of which aren't relevant here.15:46
allenaphazmat: Have you had any issues with websockets that might have been dealt with by something like socket.io, or does the reconnecting logic cover it?15:48
hazmatallenap, none15:48
allenaphazmat: Brilliant, thanks, and thank bac too.15:49
* hazmat relocates15:50
=== wedgwood_away is now known as wedgwood
=== tasdomas_afk is now known as tasdomas
* rogpeppe is done for the day. see y'all tomorrow.17:28
=== tasdomas is now known as tasdomas_afk
=== deryck is now known as deryck[lunch]
=== deryck[lunch] is now known as deryck
dpb1jam: any way to get some action on #1182224  I think it should be quite easy, at least from the outside looking in?20:18
_mup_Bug #1182224: relation-list returns null with json-output <juju-core:New> <https://launchpad.net/bugs/1182224>20:18
thumpergood morning juju folks21:11
kyhwanaWait, it is actually morning somewhere else!21:21
kyhwanathumper: oh, that's because you're in the same country as me21:21
thumper9:21am in NZ21:21
thumperkyhwana: where are you?21:21
kyhwanaThe 'tron21:22
* thumper doesn't know where the 'tron is21:22
* thumper is in Dunedin, so not up with all that north island slang21:23
thumperkyhwana: what do you do for work, and what's your interest level with juju?22:15
* thumper is curious22:15
kyhwanathumper: I'm a "systems engineer" for a uh, company that makes "packet acquisition and generation" cards+appliances.22:15
kyhwanaand interest in juju is mostly personal admin stuff22:16
* thumper nods22:16
kyhwanathough, I bet I could use it to deploy build environments. Hmm22:17
=== ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: - | Bugs: 8 Critical, 68 High - https://bugs.launchpad.net/juju-core/
sidneithumper: re https://launchpad.net/bugs/1182224 seems the problem is in json.Marshal, it should marshall an empty list to [] not nil: http://play.golang.org/p/QIMUVJMVPR22:34
_mup_Bug #1182224: relation-list returns null with json-output <papercut> <uniter> <juju-core:Triaged> <https://launchpad.net/bugs/1182224>22:34
thumpersidnei: it does22:34
* sidnei just wrote his first go program :)22:34
thumpersidnei: it isn't bein given an empty slice22:34
thumpersidnei: it is a nil22:35
thumperwhich relates to null in json22:35
* thumper is fixing the code22:35
sidneisure it's a nill not an empty slice?22:35
* sidnei staring at uniter/context.go22:35
thumpersidnei: I did22:36
sidneiUnitNames starts with units []string, and returns that at the bottom, i would expect it to be an empty slice or whatever that's called22:36
thumpersidnei: it starts with an uninitialized slice22:37
thumperwhich is nil22:37
* thumper is adding one line of code22:37
sidneii see, uninitialized22:37
thumperunits = []string{}22:37
thumperappend can handle a nil to append to22:37
thumperand interestingly, if you have 'var value []string'22:38
thumperv := reflect.ValueOf(value)22:38
thumperv.Len() == 022:38
thumperv.IsNil() -> true22:38
thumperv.Kind() -> "slice"22:39
thumperso the HasLen matcher succeeds with 0 on nil22:39
thumperI've changed the tests to be "DeepEquals, []string{}"22:39
sidneithumper: so why this results in nil: http://play.golang.org/p/6T6mLG2FY022:39
thumperoh poos22:40
sidneiphew, so im not crazy22:40
* thumper pokes it with a stick22:41
* sidnei goes drink a beer22:42
thumpersidnei: you are crazy22:52
thumpersidnei: it just took me some time to work it out22:52
thumpersidnei: http://play.golang.org/p/xHa0rd-0cn22:53
mwhudsonhas there been any progress with juju-core deploying to armhf recently?23:07
thumpermwhudson: I believe it is being looked at actively23:11
thumpermwhudson: particularly as with go 1.1, it fixes some things23:11
thumperwe are pushing to get go 1.1 in the repos, and arm is kinda dependent on that23:11
mwhudsoni think that was going to be my next question :)23:11
thumperwe are getting arm deployments into a CI system for us23:11
mwhudsonis there a ppa with go 1.1 in it yet?23:12
thumperlook for ~gophers23:12
mwhudson... for armhf23:13
thumperhmm... I think PPAs still need special tweaking to build for armhf don't they?23:13
thumperas it isn't a default target (ISTR)23:13
mwhudsonis go mostly written in go?23:14
mwhudsoni can imagine there are bootstrapping issues looming23:14
thumperI think davecheney has tested arm locally23:14
thumperand it is all good23:14
thumperbut for what value of good, I don't know23:14
=== wedgwood is now known as wedgwood_away
* thumper is spending time considering jam's comments23:31

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