/srv/irclogs.ubuntu.com/2012/09/22/#juju-dev.txt

davecheneywrtp: did you see my mail about the machineswatcher ?13:20
davecheneysorry, firsly, how was your flight ?13:21
wrtpdavecheney: no i didn't. i've just arrived back. will have a look.13:21
davecheneyi've managed to blow up my cobzr repo13:21
davecheneyso i've lost all my old branches13:21
davecheneybut i'll get them back and port the machines watcher tests13:21
wrtpdavecheney: fine. a bit crowded at lisbon. got to the front of an hour long queue wait and they said "you could have used the priority queue because you checked in online". grrr.13:21
wrtpdavecheney: oops. how did you manage that?13:22
wrtpdavecheney: are you still in lisbon BTW?13:22
davecheneyyeah, don't leave for hours13:22
davecheneyeating stale chips and a crap club sandwitch13:22
davecheneywrtp: bzr branch url:///13:23
davecheneynot lp:...13:23
davecheneywill do a remote branch13:23
davecheneyand it screwes up cobzr13:23
davecheneyi did it yesterday, have a look in the channel log for the gorey details13:23
wrtpdavecheney: oops13:23
wrtpdavecheney: did you post to juju-dev ?13:23
davecheneyy13:23
davecheneylucky(~/devel/juju-core) % bzr switch 111-util-quango13:23
davecheneybzr: ERROR: Not a branch: "/home/dfc/devel/juju-core/.bzr/cobzr/000-foo/13:23
davecheney/".13:23
davecheney^ i'm tyring to fix it, but the .bzr/branch/location file cannot have a \n at the end of the line ...13:24
wrtpdavecheney: ah, found it13:24
wrtpdavecheney: yeah, definitely needs more tests!13:24
davecheneyi'm concerned the machines watcher doens't work properly13:24
davecheneywhich is sorta important for the PA :)13:24
wrtpdavecheney: mere technicalities!13:25
davecheneyi know13:26
davecheneysuch trivialities13:26
davecheneyoh brilliant, there were no tests for the old machines watcher ...13:29
* davecheney le sigh13:30
wrtpdavecheney: have you looked in watcher_test.go13:38
wrtp?13:38
davecheneywrtp: maybe i missed it, but there are no tests that call WatchMachines13:39
wrtpdavecheney: state_test.go:/WatchMachines13:39
davecheneyin the old codebase or the new ?13:40
wrtpdavecheney: old codebase13:40
wrtpdavecheney: it's true they're fairly poxy tests13:40
davecheneyahh yes13:41
davecheneyi did miss it13:41
davecheneywell, i'll start with that13:41
wrtpdavecheney: i'm not sure the table-driven test adds much there tbh13:41
davecheneyand indeed that is present in the new codebase13:41
davecheneyI wonder if it's actually testing anything13:41
wrtpdavecheney: doesn't look implausible, but it could do with doing many more machines.13:42
wrtpdavecheney: it occurs to me that a StopSync might be useful13:42
wrtpdavecheney: then we can easily simulate multiple changes arriving at once.13:43
davecheneywhat does Start/Stop sync do ?13:43
wrtpdavecheney: StartSync triggers a db poll13:43
davecheneydoes it disconnect the watcher from the underlying even stream ?13:43
davecheneyso stopSync, change some stuff, start sync == big change13:43
wrtpdavecheney: yup13:43
davecheneyok, i'll keep looking13:44
wrtpdavecheney: we *can* do that now, but it's non-deterministic because the sync might happen while we're making the changes13:44
davecheneythe PA is just acting like it never sees any machines changes at all13:44
wrtpdavecheney: have you put a log statement in?13:44
wrtpdavecheney: just to make sure13:44
davecheneythey were there from the odl days13:44
davecheneybut it's been a while13:44
davecheneyi'll keep digging13:45
davecheneyhmm, no logging in the normal path13:45
davecheneyonly the error path13:45
davecheneythat would be a good place for me to start13:45
davecheneywrtp: how was customs ?13:46
davecheneyshould I get a move on13:46
wrtpdavecheney: fine, but quite slow again13:46
wrtpdavecheney: depends very much on how many people are going through at that time, of course13:46
davecheneyi should probably go then13:47
davecheneywrtp: interesting13:57
davecheney[LOG] 97.37511 JUJU:DEBUG watcher: got request: watcher.reqWatch{key:watcher.watchKey{c:"machines", id:interface {}(nil)}, info:watcher.watchInfo{ch:(chan<- watcher.Change)(0xf840151eb0), revno:0}}13:57
davecheney[LOG] 97.37554 JUJU rcvd machines change: &{[] []}13:57
wrtpdavecheney: just thought - does it call AllMachines?13:57
wrtpdavecheney: 'cos AllMachines is horribly broken13:58
davecheneywrtp: yes, but only after actioning machine additions13:58
wrtpdavecheney: AllMachines only fills in the machine id, nothing else.13:59
davecheneywrtp: ok, i'll be careful of this13:59
davecheneybut this is happening before then13:59
davecheneyin worker/provisioner:loop()14:00
davecheneywe wait on the watcher14:00
davecheneyand this is the change that is received14:00
wrtpoops, just almost ran out of  battery14:03
wrtpdavecheney: the WatchMachines test in the new state seems much better than the old one14:06
wrtpdavecheney: though it doesn't check what happens when there's an initial machine.14:06
davecheneywrtp: yeah, there are a few bugs like that14:07
davecheneyexpecting addmachine to give you machine 1, not machine 014:07
davecheneyi think we talked about this yesterday14:07
davecheneybecause of the bootstrap rquirements14:07
wrtpdavecheney: it looks like it works though14:08
wrtpdavecheney: yeah we did14:09
wrtpdavecheney: but after chatting about it with gustavo, we decided to keep things the way they were14:09
wrtpdavecheney: i.e. the dummy provider bootstrap does not allocate a machine and instance14:09
davecheneywrtp: sounds sane14:12
davecheneyand predictable14:13
wrtpdavecheney: i dunno. given that every real provider will have (at least) machine 0 allocated at bootstrap time, i sway towards the thought that dummy should too14:13
wrtpdavecheney: but it does require quite a few tests to be fixed14:14
davecheneywrtp: i fear that is mocking too much14:16
wrtpdavecheney: i definitely see that POV too14:16
davecheneythe magic that happens behind the scenes in jujud bootstrap is unfortunate14:22
davecheneybecause we either have to ignore it in the tests14:22
davecheneyor mock it14:22
davecheneywhich is brittle14:22
wrtpdavecheney: gotta go now. hope you survive your flights ok.14:27
wrtpdavecheney: see you whenever you manage to surface!14:28
davecheneywrtp: cool14:29
davecheneyi'll keep working on this14:29
davecheneybtw,m should MachinesWatcher ever return a change with empty Added and Removed ?14:29

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