davecheney | wrtp: did you see my mail about the machineswatcher ? | 13:20 |
---|---|---|
davecheney | sorry, firsly, how was your flight ? | 13:21 |
wrtp | davecheney: no i didn't. i've just arrived back. will have a look. | 13:21 |
davecheney | i've managed to blow up my cobzr repo | 13:21 |
davecheney | so i've lost all my old branches | 13:21 |
davecheney | but i'll get them back and port the machines watcher tests | 13:21 |
wrtp | davecheney: 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 |
wrtp | davecheney: oops. how did you manage that? | 13:22 |
wrtp | davecheney: are you still in lisbon BTW? | 13:22 |
davecheney | yeah, don't leave for hours | 13:22 |
davecheney | eating stale chips and a crap club sandwitch | 13:22 |
davecheney | wrtp: bzr branch url:/// | 13:23 |
davecheney | not lp:... | 13:23 |
davecheney | will do a remote branch | 13:23 |
davecheney | and it screwes up cobzr | 13:23 |
davecheney | i did it yesterday, have a look in the channel log for the gorey details | 13:23 |
wrtp | davecheney: oops | 13:23 |
wrtp | davecheney: did you post to juju-dev ? | 13:23 |
davecheney | y | 13:23 |
davecheney | lucky(~/devel/juju-core) % bzr switch 111-util-quango | 13:23 |
davecheney | bzr: 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 |
wrtp | davecheney: ah, found it | 13:24 |
wrtp | davecheney: yeah, definitely needs more tests! | 13:24 |
davecheney | i'm concerned the machines watcher doens't work properly | 13:24 |
davecheney | which is sorta important for the PA :) | 13:24 |
wrtp | davecheney: mere technicalities! | 13:25 |
davecheney | i know | 13:26 |
davecheney | such trivialities | 13:26 |
davecheney | oh brilliant, there were no tests for the old machines watcher ... | 13:29 |
* davecheney le sigh | 13:30 | |
wrtp | davecheney: have you looked in watcher_test.go | 13:38 |
wrtp | ? | 13:38 |
davecheney | wrtp: maybe i missed it, but there are no tests that call WatchMachines | 13:39 |
wrtp | davecheney: state_test.go:/WatchMachines | 13:39 |
davecheney | in the old codebase or the new ? | 13:40 |
wrtp | davecheney: old codebase | 13:40 |
wrtp | davecheney: it's true they're fairly poxy tests | 13:40 |
davecheney | ahh yes | 13:41 |
davecheney | i did miss it | 13:41 |
davecheney | well, i'll start with that | 13:41 |
wrtp | davecheney: i'm not sure the table-driven test adds much there tbh | 13:41 |
davecheney | and indeed that is present in the new codebase | 13:41 |
davecheney | I wonder if it's actually testing anything | 13:41 |
wrtp | davecheney: doesn't look implausible, but it could do with doing many more machines. | 13:42 |
wrtp | davecheney: it occurs to me that a StopSync might be useful | 13:42 |
wrtp | davecheney: then we can easily simulate multiple changes arriving at once. | 13:43 |
davecheney | what does Start/Stop sync do ? | 13:43 |
wrtp | davecheney: StartSync triggers a db poll | 13:43 |
davecheney | does it disconnect the watcher from the underlying even stream ? | 13:43 |
davecheney | so stopSync, change some stuff, start sync == big change | 13:43 |
wrtp | davecheney: yup | 13:43 |
davecheney | ok, i'll keep looking | 13:44 |
wrtp | davecheney: we *can* do that now, but it's non-deterministic because the sync might happen while we're making the changes | 13:44 |
davecheney | the PA is just acting like it never sees any machines changes at all | 13:44 |
wrtp | davecheney: have you put a log statement in? | 13:44 |
wrtp | davecheney: just to make sure | 13:44 |
davecheney | they were there from the odl days | 13:44 |
davecheney | but it's been a while | 13:44 |
davecheney | i'll keep digging | 13:45 |
davecheney | hmm, no logging in the normal path | 13:45 |
davecheney | only the error path | 13:45 |
davecheney | that would be a good place for me to start | 13:45 |
davecheney | wrtp: how was customs ? | 13:46 |
davecheney | should I get a move on | 13:46 |
wrtp | davecheney: fine, but quite slow again | 13:46 |
wrtp | davecheney: depends very much on how many people are going through at that time, of course | 13:46 |
davecheney | i should probably go then | 13:47 |
davecheney | wrtp: interesting | 13: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 |
wrtp | davecheney: just thought - does it call AllMachines? | 13:57 |
wrtp | davecheney: 'cos AllMachines is horribly broken | 13:58 |
davecheney | wrtp: yes, but only after actioning machine additions | 13:58 |
wrtp | davecheney: AllMachines only fills in the machine id, nothing else. | 13:59 |
davecheney | wrtp: ok, i'll be careful of this | 13:59 |
davecheney | but this is happening before then | 13:59 |
davecheney | in worker/provisioner:loop() | 14:00 |
davecheney | we wait on the watcher | 14:00 |
davecheney | and this is the change that is received | 14:00 |
wrtp | oops, just almost ran out of battery | 14:03 |
wrtp | davecheney: the WatchMachines test in the new state seems much better than the old one | 14:06 |
wrtp | davecheney: though it doesn't check what happens when there's an initial machine. | 14:06 |
davecheney | wrtp: yeah, there are a few bugs like that | 14:07 |
davecheney | expecting addmachine to give you machine 1, not machine 0 | 14:07 |
davecheney | i think we talked about this yesterday | 14:07 |
davecheney | because of the bootstrap rquirements | 14:07 |
wrtp | davecheney: it looks like it works though | 14:08 |
wrtp | davecheney: yeah we did | 14:09 |
wrtp | davecheney: but after chatting about it with gustavo, we decided to keep things the way they were | 14:09 |
wrtp | davecheney: i.e. the dummy provider bootstrap does not allocate a machine and instance | 14:09 |
davecheney | wrtp: sounds sane | 14:12 |
davecheney | and predictable | 14:13 |
wrtp | davecheney: 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 too | 14:13 |
wrtp | davecheney: but it does require quite a few tests to be fixed | 14:14 |
davecheney | wrtp: i fear that is mocking too much | 14:16 |
wrtp | davecheney: i definitely see that POV too | 14:16 |
davecheney | the magic that happens behind the scenes in jujud bootstrap is unfortunate | 14:22 |
davecheney | because we either have to ignore it in the tests | 14:22 |
davecheney | or mock it | 14:22 |
davecheney | which is brittle | 14:22 |
wrtp | davecheney: gotta go now. hope you survive your flights ok. | 14:27 |
wrtp | davecheney: see you whenever you manage to surface! | 14:28 |
davecheney | wrtp: cool | 14:29 |
davecheney | i'll keep working on this | 14:29 |
davecheney | btw,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!