/srv/irclogs.ubuntu.com/2012/07/16/#juju-dev.txt

davecheneyubuntu@ip-10-4-114-16:~$ pgrep jujud -lf00:55
davecheney5074 /var/lib/juju/tools/juju-0.0.0-precise-amd64/jujud provisioning --zookeeper-servers localhost:2181 --log-file /var/log/juju/provision-agent.log --debug00:55
davecheney5077 /var/lib/juju/tools/juju-0.0.0-precise-amd64/jujud machine --zookeeper-servers localhost:2181 --machine-id 0 --log-file /var/log/juju/machine-agent.log --debug00:55
rogpeppedavecheney: mornin'05:55
davecheneyrogpeppe: hows' tricks ?05:55
rogpeppedavecheney: good thanks. finally got around to painting the kitchen last weekend... two years after we did the rest of it!05:56
rogpeppedavecheney: still needs another coat, but getting there05:56
davecheneyrogpeppe: yup, you'd think as an adult painting would be simple05:56
davecheneyturns out it's really bloody hard05:56
rogpeppedavecheney: i've had an idea about the watchers which i'd like to run past you05:57
davecheneybtw, I think ec2/config_test.go might be broken05:57
davecheneyas in, doesn't test anything05:57
rogpeppedavecheney: hmm, how so?05:57
davecheneytrying to write a _failing_ test case for https://bugs.launchpad.net/juju-core/+bug/102512805:57
davecheney        {05:58
davecheney                "admin-secret: 81a1e7429e6847c4941fda7591246594\n" + baseConfig,05:58
davecheney                func(cfg *providerConfig) {},05:58
davecheneythis should fail right ?05:58
davecheney                "",05:58
davecheney        },05:58
davecheneyrogpeppe: did you read my mid afternoon status, we have a machine agent running on machine/0 now05:59
* rogpeppe has a look06:00
rogpeppedavecheney: oh, no i didn't - i've got a branch almost done which runs the MA. that's cool though, it's not much code.06:00
davecheneyrogpeppe: dagnabbit, we're all over each others toes06:01
rogpeppedavecheney: i know, it's as things start to close in06:01
davecheneyi'm kinda hanging in the wind until deploy secrets is comitted06:01
rogpeppedavecheney: that'll be soon, i hope, if one or other of the config branches gets in06:02
* davecheney nods06:02
rogpeppedavecheney: did you have a look at this BTW? https://codereview.appspot.com/6343107/06:02
davecheneyrogpeppe: i had a brief look, SGTM06:03
davecheneybut i'm really only intersted in getting secrets deployed06:03
rogpeppedavecheney: it's part and parcel06:03
davecheneyconfig has had _so_ many polishes, it must ground down to a nub now06:03
rogpeppedavecheney: it's surprisingly subtle06:04
davecheneyrogpeppe: that suggests that its serving many masters06:04
rogpeppedavecheney: i found that when trying to hack on william's code06:04
davecheneysubtle the way state.Info is subtle06:04
rogpeppedavecheney: it was trying to be two things at once06:04
rogpeppedavecheney: i don't thing state.Info is subtle06:05
rogpeppethink06:05
rogpeppedavecheney: there was lots of code doing not very much06:05
rogpeppedavecheney: you're right, config tests are fucked06:06
davecheneyrogpeppe: should I raise a bug06:07
davecheneyi fixed 1025128, but it's hard to test when the test harness is rooted06:07
rogpeppedavecheney: i just changed one of the existing error messages and the test still passed...06:07
davecheneyrogpeppe: indeed o_O06:08
rogpeppedavecheney: go test -gocheck.f TestConfig06:08
rogpeppedavecheney: runs no tests06:08
rogpeppeoops06:08
davecheneybwahaha06:08
davecheneyhwo did that happen ?06:08
rogpeppedavecheney: ha!06:08
rogpeppedavecheney: i see06:08
rogpeppedavecheney: someone at some point (maybe me!) changed (configSuite) to (s *configSuite)06:09
davecheneybzr blame ?06:09
rogpeppedavecheney: i dare not06:09
davecheneycare to unfuk ?06:10
rogpeppedavecheney: gimme 30s06:10
rogpeppedavecheney: ha! not so fast - loads of tests fail...06:11
rogpeppeshit06:12
davecheneyrogpeppe: maybe log a bug06:13
davecheneyi'll do it06:13
rogpeppedavecheney: looks like william might've done it...06:13
rogpeppefwereade_: ahem06:13
rogpeppeso easy to do06:13
davecheneyrogpeppe: sohuld thre be two bugs then ? on against gocheck to avoid this kind of thing ?06:13
rogpeppedavecheney: arguably. it should probably give an error if it finds tests on the value type when it's been given a pointer06:14
davecheneyrogpeppe: i think this should be raised as a bug06:15
rogpeppedavecheney: yeah06:15
davecheneyrogpeppe: i'll do it06:15
rogpeppedavecheney: can i run my watcher idea past you?06:16
davecheneyrogpeppe: https://bugs.launchpad.net/juju-core/+bug/102513806:16
davecheney^ can you put some debug in this issue06:16
davecheneythen i'll log one against gocheck to make sure we can't screw ourselves again06:16
davecheneyrogpeppe: sure, tell me about your watcher06:16
rogpeppedavecheney: i'm concerned by how hard it is to write multiplexers. this was some code i suggested to frank for the firewall code: http://paste.ubuntu.com/1089462/06:18
rogpeppedavecheney: the code inside loop() there should really only be three lines of code.06:18
rogpeppedavecheney: and i think the problem is to do with the way we stop watchers06:19
davecheneyrogpeppe: one idea i had was to pass into the watcher a channel to receive changes06:19
rogpeppedavecheney: each watcher has its own Stop function.06:19
davecheneythis is unusual, but might make a mux style watcher simpler06:19
rogpeppedavecheney: i think a nicer alternative is to pass a stop channel into the watcher06:19
rogpeppedavecheney: then the watcher closes its channel when done06:20
davecheneyrogpeppe: but you can't select on a closed channel, right ?06:20
rogpeppedavecheney: that way you've got a *single* stop channel for all watchers you're muxing06:20
rogpeppedavecheney: 'course you can06:20
rogpeppedavecheney: (select on read)06:20
* davecheney remains unsure06:20
rogpeppedavecheney: and only a single channel to read from each watcher06:20
rogpeppedavecheney: i *think* it could simplify things considerably06:21
* davecheney goes to play with play.g.o for a second06:21
davecheneyrogpeppe: indeed, this will work, http://play.golang.org/p/G15bEHpZkP06:23
rogpeppe davecheney: absolutely. it's the way closed chans are meant to be used06:23
davecheneynice06:24
rogpeppedavecheney: having a single stop channel means that a muxer can "delegate" its stop request to those things it's watching06:24
davecheneyrogpeppe: if you pass it in as <- chan, then you know you are the only one who can close it06:24
rogpeppedavecheney: then every watcher would provider a Wait (sp?) method which would read messages from the watcher chan until EOF, then return the watcher's error06:24
rogpeppedavecheney: exactly06:24
rogpeppedavecheney: i *think* this means most watchers can dispense with tomb06:25
davecheneyrogpeppe: certainly for those watchers where we don't need any sort of error value from, yes06:25
rogpeppedavecheney: no, errors are easy too06:25
rogpeppedavecheney: most watchers are single-goroutine06:26
rogpeppedavecheney: it's easy for them to get an error from the watcher they're reading from and put it in an instance variable06:26
rogpeppedavecheney: the only way for a client to get the error is to call Wait.06:26
rogpeppedavecheney: and when that returns, we're guaranteed that the error is in a known state06:27
rogpeppedavecheney: errors are crucial, because all watchers need to be able to return an error06:30
* davecheney nods06:30
rogpeppeshit, i've just buggered cobzr06:32
davecheneyrm -rf ../../.bzr/cobzr ?06:33
rogpeppedavecheney: nope, edit .bzr/branch/location06:34
rogpeppedavecheney: that's a really bad suggestion BTW!06:34
rogpeppedavecheney: it would erase all my branches06:34
davecheneyrogpeppe: I did the above by mistake once, once06:34
rogpeppedavecheney: oops06:35
rogpeppedavecheney: in this case it wasn't so bad. i did branch -m ec2-fix-configsuite'06:35
rogpeppe'06:35
rogpeppe(note the linefeed)06:35
rogpeppedavecheney: it doesn't like it!06:35
rogpeppedavecheney: at least, it "works"06:35
rogpeppedavecheney: then you can't do anything06:36
rogpeppedavecheney: i'll raise a bug! that's what i'll do...06:36
rogpeppedavecheney: ha. can't do that.06:37
rogpeppedavecheney: i did one watcher: https://codereview.appspot.com/637304806:57
rogpeppedavecheney: the important bit is the change on lines 162-16706:59
rogpeppedavecheney: we don't have to select on output any more06:59
rogpeppedavecheney: which makes muxers much easier (and we will have lots of them in the firewall and unit agent)06:59
davecheneyrogpeppe: holy shit, a closed channel always fires !??07:22
rogpeppedavecheney: absolutely!07:22
rogpeppedavecheney: have you not read the spec?07:22
rogpeppedavecheney: they're *really* useful07:22
davecheneyrogpeppe: not for a while07:22
rogpeppedavecheney: it's the only way to use a chan to broadcast07:23
rogpeppedavecheney: it's always been like that. except in the early days you'd get a panic if you read more than N times N =~ 20.07:24
davecheneyrogpeppe: i can't find a reference to it in the spec07:24
davecheneybut a closed channel looks like it always behaves like it has a value of the zero value and false07:25
rogpeppedavecheney: http://golang.org/ref/spec#Close07:25
davecheneyI guess you're talking about this bit "zero value for the channel's type without blocking"07:25
davecheneyit doesn't specifically mention it's use in select {} but whatever07:26
davecheneyas you say, a very useful property07:26
rogpeppedavecheney: yeah07:26
rogpeppeto both07:26
davecheneythe fact it's level triggered is very useful07:27
davecheneyalthough, it's not really acting as a default case07:27
rogpeppedavecheney: thanks to fwereade_'s refactoring, the state/wacher.go changes are pretty minimal, it seems07:27
rogpeppedavecheney: what do you mean by that?07:27
davecheneythat is, receiving from a closed channel will be chosen pseudorandomly from the set of ready channels07:28
rogpeppedavecheney: yeah07:28
rogpeppedavecheney: which is fine, i think.07:28
davecheneyyup07:28
rogpeppedavecheney: you might have two closed channels, of course07:28
davecheneycombined with nil'ing the channel, it's very powerful07:28
rogpeppedavecheney: definitely07:28
davecheneyanyway, time for a break, and some dinner07:28
rogpeppedavecheney: both of those things weren't in Limbo, and i really appreciate them07:29
rogpeppedavecheney: enjoy!07:29
rogpeppedavecheney: 't'was good to catch you07:29
davecheneylater lads, if I don't see you again tonight, we'll talk at le standup!07:29
rogpeppedavecheney: aye07:29
TheMuemorning08:04
fwereade_TheMue, heyhey08:09
fwereade_rogpeppe, also heyhey :)08:09
rogpeppefwereade_: yo!08:09
rogpeppefwereade_: i've had a minor revelation about the watchers08:10
rogpeppeTheMue: yay!08:10
fwereade_rogpeppe, oh yes?08:10
rogpeppefwereade_: i was thinking about this code, which i suggested to TheMue as part of the firewall code: http://paste.ubuntu.com/1089462/08:10
fwereade_rogpeppe, is this to do with the which-ready-channel-you-receive-from-is-random thing?08:10
fwereade_rogpeppe, that has had me a little suspicious lately, easy to miss08:11
rogpeppefwereade_: that was a side shoot08:11
rogpeppefwereade_: or... maybe i don't know what you're referring to there08:11
rogpeppefwereade_: i thought that the code above was way more complex than it should be08:11
fwereade_rogpeppe, I shouldn't worry about it for now, I'm just developing a sl. twitchy feeling that we may not have fully analysed some of the watchers, I'll figure it out properly myself :)08:12
rogpeppefwereade_: this potential change makes them easier to analyse, i think08:12
rogpeppefwereade_: the idea is that actually most watchers layer on top of other watchers08:12
fwereade_rogpeppe, anyway, sorry derail08:12
fwereade_rogpeppe, yes, this is very true08:13
* TheMue listens08:13
rogpeppefwereade_: and so the fact that each watcher has its own Stop method makes things hard08:13
fwereade_rogpeppe, ok...08:13
rogpeppefwereade_: we can do better, i think, if we *pass in* a stop channel08:13
rogpeppefwereade_: and use the EOF status of the watch channel as an indication that the watcher has completed08:14
TheMuerogpeppe: Hmm, an idea: why don't we build the watchers so that, when creating an instance, we don't pass behaviors based on interfaces. They are called on changes and errors.08:14
fwereade_rogpeppe, hmm, this has crossed my mind in individual cases08:14
TheMuerogpeppe: Everything else is handled internally.08:14
rogpeppeTheMue: i'm not sure i understand that08:14
TheMuerogpeppe: Wait a moment, I'll write a paste as outline.08:15
rogpeppefwereade_: here's an example of what i mean: https://codereview.appspot.com/6373048/diff/1/state/watcher/watcher.go08:15
fwereade_rogpeppe, the trouble is that pass-a-stopper is a nice thing internally, but as a consumer of our APIs I would much rather get an object I can Stop() myself08:15
rogpeppefwereade_: yes, that's the down side08:15
rogpeppefwereade_: *but*08:15
rogpeppefwereade_: it makes everything else simpler08:15
rogpeppefwereade_: particularly in the muxing case, which we're going to be doing a *lot* in the firewall and unit agent code08:17
rogpeppefwereade_: that code i pasted earlier turns into something like this: http://paste.ubuntu.com/1094518/08:18
rogpeppefwereade_: i.e. exactly what it *should* look like08:18
fwereade_rogpeppe, hmm, yes, I agree it's useful in those cases08:19
* fwereade_ is fretting that it's not necessarily everything we need08:19
rogpeppefwereade_: how do you mean?08:19
fwereade_rogpeppe, eg in one of the things I have up for review08:19
fwereade_rogpeppe, relationUnitsWatcher I think08:19
fwereade_rogpeppe, I found that stop chans weren't quite enough for my single-thing-watcher goroutines08:20
fwereade_rogpeppe, and I convinced myself that I needed a whole separate tomb for every goroutine08:20
rogpeppefwereade_: i don't *think* you do08:21
fwereade_rogpeppe, maybe I should have been keeping references to the subwatchers around directly, that would probably be enough08:21
fwereade_rogpeppe, the specific issue was "make sure this goroutine is not going to send anything else on the updates channel"08:22
rogpeppefwereade_: ah!08:22
fwereade_rogpeppe, ie, make sure I can't get a changed event after a deleted event08:22
rogpeppefwereade_: but that's the important thing about this change!08:22
rogpeppefwereade_: we don't care any more!08:22
TheMuerogpeppe: http://paste.ubuntu.com/1094521/ is very, very quick. The important idea should be that you don't bother with different channels and tombs. The watcher does this and calls the methods of the passed behavior.08:22
rogpeppefwereade_: because the way we wait for a watcher to complete is by reading all events from the channel.08:22
TheMuerogpeppe: It's used in Erlang/OTP very much. Services provide the backend, behaviors concentrate on business logic.08:23
rogpeppefwereade_: have a look at that watcher code i posted above08:23
fwereade_rogpeppe, I do like that, but I'm still not sure it helps my case08:23
fwereade_rogpeppe, this is me waiting until I'm sure that one specific goroutine is no longer going to be sending on a shared channel08:24
rogpeppeTheMue: i'm not sure i understand the motivation, or the context.08:24
rogpeppefwereade_: why do you need to do that?08:24
rogpeppeTheMue: is this a suggestion for state/watcher.go ?08:24
fwereade_rogpeppe, to ensure that I will not get any embarrassing changed events after I've sent a departed event for a particular relation units08:25
rogpeppeTheMue: it looks quite similar to what fwereade_'s done in that file already08:25
rogpeppefwereade_: because you've got two watchers watching different aspects of the same thing?08:26
TheMuerogpeppe: Inside one watcher, yes. But take a look at your paste above. We still build new watchers upon, with own tombs, with multiply channels and all that stuff.08:26
fwereade_rogpeppe, assume that I got a change immediately followed by a delete, and my main goroutine is processing the delete while the child goroutine is processing the change08:27
TheMuerogpeppe: My intention is to simplify that.08:27
rogpeppeTheMue: i'd have to see a more complete example to understand what you're suggesting.08:27
fwereade_rogpeppe, unless I wait for the child to actually die, I can't be sure which of the channels it's selecting on will be selected08:28
rogpeppefwereade_: isn't the problem there that you've got two things operating on the same state?08:28
fwereade_rogpeppe, ie when the scheduler gets around to it next, Dying is closed but updates is also unblocked08:28
rogpeppefwereade_: which channels is it selecting on?08:28
fwereade_rogpeppe, I have two different things operating on two different pieces of state that are in the same system08:29
fwereade_rogpeppe, waiting to receive from a stop chan (which might be a tomb.Dying()), or send on an updates chan for the attention of the main goroutine08:29
rogpeppefwereade_: with this change, you would not do that08:30
rogpeppefwereade_: you'd just send on the updates chan unconditionally08:30
fwereade_rogpeppe, right, so how do I avoid getting change events on the updates chan as soon as I want to stop receiving them?08:31
rogpeppefwereade_: you don't.08:31
rogpeppefwereade_: but i don't see why that's a problem.08:31
fwereade_rogpeppe, at the time I stop, the child goroutine may already be waiting to send08:31
rogpeppefwereade_: that's fine.08:31
fwereade_rogpeppe, I want to be damn sure it will not do so08:31
rogpeppefwereade_: at the receiving side, you have to ignore the subsequent event(s)08:32
fwereade_rogpeppe, because a relationUnitsWatcher that sends crap like unit-0-0 deleted followed by unit-0-0 changed is just crackful08:32
rogpeppefwereade_: but that shouldn't be hard08:32
fwereade_rogpeppe, when N goroutines are sending on the shared update channel?08:32
fwereade_rogpeppe, I keep more state lying around to know which events I should filter out f the updates stream?08:33
rogpeppefwereade_: yeah, it's not a difficult problem, i think. you maintain some state per goroutine on the receiver side.08:33
rogpeppefwereade_: each even coming from the shared update channel will identify its goroutine08:33
fwereade_rogpeppe, hmm, doesn't really feel like a win to me, but I could perhaps be convinced08:33
rogpeppefwereade_: so the state can be there trivially08:33
rogpeppes/each even/each event/08:34
rogpeppefwereade_: i *think* it's a much easier structure to reason about08:34
fwereade_rogpeppe, it's just a feeling that the watchers which keep state around are harder to reason about08:35
fwereade_rogpeppe, it could well still be a net win; makes most things easier and some harder08:35
rogpeppefwereade_: at least this state is simple local state, no concurrent interactions with it08:36
rogpeppefwereade_: in this case, i think it's as simple as "x.ignore = true"; [..] if x.ignore { continue}08:36
rogpeppefwereade_:  but i may well misunderstand your problem08:37
fwereade_rogpeppe, well, it's multiple goroutines, so I'd need to invert it and store the ones I *do* care about in a map08:37
fwereade_rogpeppe, I agree not very complex08:37
fwereade_rogpeppe, I'm not arguing it's an insupportable burden08:38
rogpeppefwereade_: i don't think so... each goroutine stores info about itself08:38
rogpeppefwereade_: and sends that info on the watch channel.08:38
rogpeppefwereade_: so when an event arrives, you get the info too, which you can manipulate as local state.08:38
fwereade_rogpeppe, but the critical info always comes in on the main goroutine, not the child, I don't think the child should be storing that state08:39
fwereade_rogpeppe, I am not opposed to exploring this idea further08:39
rogpeppefwereade_: cool08:39
Arammoin everyone.08:39
TheMueHi Aram08:39
rogpeppeAram: yo08:39
rogpeppe!08:39
fwereade_rogpeppe, just pointing out a use case which I think is legitimate and not the best fit08:39
fwereade_Aram, heyhey08:39
rogpeppefwereade_: i'll be interested to have a look at the CL08:39
fwereade_rogpeppe, I have a stack of them, bit insomniac this w/e08:40
rogpeppefwereade_: i had this idea sitting in my head all weekend, but couldn't get anywhere near a computer...08:40
fwereade_rogpeppe, TheMue: in fact I think https://codereview.appspot.com/6408045/ is basically a trivial08:40
fwereade_rogpeppe, TheMue: but one with a surprisingly significant effect08:40
fwereade_rogpeppe, TheMue: so I would appreciate both your opinions08:41
fwereade_rogpeppe, TheMue: it's independent of https://codereview.appspot.com/6405044/ which is a prereq for https://codereview.appspot.com/6402048/08:41
fwereade_rogpeppe, the first one of those 2 is the use case I was talking about08:42
fwereade_rogpeppe, the second one ties together a bunch of stuff in a way that I find pleasing08:42
fwereade_rogpeppe, and gets us a RelationUnit type that is aware of the existence/settings of other RelationUnits in other agents08:43
Aramfwereade_: rogpeppe: TheMue: I have to take at least half a day off... I've stayed too much in the sun and I have a fever and an excruciating headache.08:43
fwereade_Aram, np, look after yourself :)08:43
rogpeppefwereade_: 6408045 is because yaml doesn't marshal deterministically?08:43
fwereade_rogpeppe, yeah :/08:43
Aramwoke up and drank 2 liters of water.08:43
rogpeppeAram: ok, sorry about that08:43
rogpeppefwereade_: although i'm jealous of your sun08:43
rogpeppefwereade_: it's been 13 degrees here for weeks08:43
fwereade_rogpeppe, it was swapping dict field order about 1 time in 10 in normal use08:44
rogpeppefwereade_: i've got the central heating on08:44
rogpeppefwereade_: ah, makes sense08:44
fwereade_rogpeppe, the test case hits it 100 times and it sometimes switches rendering order >50 times08:44
rogpeppefwereade_: LGTM08:44
fwereade_rogpeppe, that was a fun midnight bug-hunt though08:44
fwereade_rogpeppe, cool08:44
rogpeppefwereade_: good catch!08:44
fwereade_TheMue, if I could get one from you too I'll merge it straight in08:45
fwereade_rogpeppe, cheers :)08:45
rogpeppefwereade_: although...08:45
fwereade_rogpeppe, go on08:45
rogpeppefwereade_: why did it cause anything to fail?08:45
rogpeppefwereade_: i'd've thought the tests should be resilient to config nodes changing-but-not-changing08:46
fwereade_rogpeppe, AIUI ConfigNode is meant to *not* change-without-changing08:46
fwereade_rogpeppe, a while ago niemeyer said he would consider that behaviour to be a bug08:46
fwereade_rogpeppe, and it is an assumption I was depending on in the tests08:47
rogpeppefwereade_: nonetheless, the watchers *should* be resilient to it, no?08:47
rogpeppefwereade_: ah08:47
fwereade_rogpeppe, no, IMO the system should assume this useful property of ConfigNode08:47
fwereade_rogpeppe, this case specifically08:47
rogpeppefwereade_: ok08:47
fwereade_rogpeppe, relation unit writes private-address to its settings node on creation08:48
fwereade_rogpeppe, the private address *might* have changed if the UA was restarted and is rejoining an existing one08:48
rogpeppefwereade_: i suppose contentWatcher copes with updates-without-changes at too low a level08:48
fwereade_rogpeppe, or it might not, or the node might not exist at all08:48
fwereade_rogpeppe, IMO the nice thing to do is just to always set private-address on join08:48
fwereade_rogpeppe, and let the lower level filter out the changes-that-don't-chnage08:49
fwereade_rogpeppe, with the bug, a particular node's version can change under the hod and send me an unepected event08:49
rogpeppe"relation unit writes private-address to its settings node on creation"08:50
fwereade_rogpeppe, not even an unexpected event, actually08:50
rogpeppei don't understand that08:50
fwereade_rogpeppe, just an unexpected version08:50
fwereade_rogpeppe, ok, every unit participating in a relation has its own settings and presence nodes08:50
TheMuefwereade_: Looks good08:50
rogpeppefwereade_: what's a "relation unit" and what's the private address we're talking about here?08:50
fwereade_rogpeppe, existence of the presence node implies validity of the settings08:50
rogpeppefwereade_: ok08:51
fwereade_rogpeppe, one thing we guarantee is that if you're in a relation with some other units, you will have access to their private-address setting08:51
fwereade_rogpeppe, so that you can do whatever magic youpersonally require to get your charm talking to the other side of the relation08:51
rogpeppefwereade_: ah, i didn't know that08:51
fwereade_rogpeppe, make sense roughly?08:51
rogpeppefwereade_: yup08:52
fwereade_rogpeppe, I'm not saying there isn't a better way to do it, but the python seems to work pretty well like that :)08:52
rogpeppefwereade_: i guess i'm surprised that the config node watcher doesn't filter out occasions when the content has changed but the attrs haven't08:53
rogpeppefwereade_: but i'm happy with your fix08:53
rogpeppefwereade_: it seems very plausible08:53
fwereade_rogpeppe, feels like a lot more hassle to do it at output time when we already have all the info available at input time, as it were08:53
rogpeppefwereade_: yeah08:53
fwereade_rogpeppe, and then we get more predictable behaviour at a lower level and can build higher-level stuff with more confidence08:54
rogpeppefwereade_: definitely.08:54
rogpeppefwereade_: thanks for the explanation08:54
fwereade_rogpeppe, need to take a longish break, cath was away for the weekend and I need to JIT some housekeeping which got sacrificed to coding while laura was asleep ;)08:55
rogpeppefwereade_: :-)08:55
rogpeppefwereade_: when you're back i should have a watcher CL for your perusal08:55
fwereade_rogpeppe, cool08:55
fwereade_rogpeppe, TheMue: I'll just merge the ConfigNode change before I break08:56
rogpeppefwereade_: and i'll add some tests to that config proposal. i *hope* that gustavo likes it.08:56
fwereade_rogpeppe, that's always the worry08:56
fwereade_rogpeppe, I wish I had a better niemeyer sim08:56
rogpeppefwereade_: mine's still training the neural net.08:57
rogpeppefwereade_: it's pretty erratic08:57
fwereade_rogpeppe, indeed, I find it actually gets worse with time because it functions accurately for weeks and then, suddenly, *total* failure08:57
rogpeppefwereade_: wildly non-linear solution space08:58
fwereade_rogpeppe, indeed :)08:58
fwereade_rogpeppe, TheMue: thanks, submitted09:00
TheMuefwereade_: Cheers09:08
TheMueOh, revision 300, nice number.09:21
TheMuedavecheney: Heya09:51
davecheneyTheMue: howdy09:51
davecheneyi'll leave the firewaller to you09:51
TheMuedavecheney: Thx *bow*09:53
fwereade_davecheney, heyhey10:01
davecheney'sup !10:03
* TheMue thankfully bought the Ubuntu fleece jacket in Oakland. It's pretty cold today here.10:14
* fwereade_ is exhausted by the mere prospect of the 10-minute walk in blazing sunshine to collect laura from nursery10:49
fwereade_bbs10:49
davecheneyniemeiyer: any comment ? https://www.youtube.com/watch?v=32DD4DF7Qpo11:00
rogpeppedavecheney, TheMue, fwereade_: request for comment: https://codereview.appspot.com/6373048/11:11
rogpeppedavecheney: lol11:14
* davecheney reads11:15
rogpeppefwereade_: i'm not sure that passing a tomb around would be a good idea11:56
fwereade_rogpeppe, yeah, it feels too bulky11:56
fwereade_rogpeppe, potentially11:57
rogpeppefwereade_: a tomb has a single idea of an error11:57
fwereade_rogpeppe, ah, sorry, what's the problem there?11:57
rogpeppefwereade_: my main inspiration for the CL was my realisation that there's a fundamenal asymmetry using channels11:57
rogpeppefwereade_: channels fan in but they don't fan out11:57
fwereade_rogpeppe, yeah11:57
rogpeppefwereade_: which leads me to think that stopping your sources is more appropriate as a broadcast.11:58
rogpeppefwereade_: then each source tells you when it has responded and completed.11:58
TheMuerogpeppe, fwereade_: What's still somehow too complex for me is the chaining of goroutines. We do goroutine(baseWatcher) -> goroutine(somehowSpezializedWatcher) -> goroutine(neededWatcher)11:58
rogpeppefwereade_: and when we've got a channel coming from that source, EOF on the channel seems the Right Way.11:59
fwereade_rogpeppe, sure, that's what we do anyway, right?11:59
rogpeppeTheMue: chaining of goroutines is the Go Way.11:59
fwereade_TheMue, yeah, the chaining of goroutines makes me happy11:59
rogpeppefwereade_: yes, but the stopping is still one-to-one.11:59
fwereade_TheMue, so long s they're sanely written they make very nice building blocks IMO11:59
TheMuerogpeppe, fwereade_: I would like to already tell the first one what I want to do and only think about the business logic.11:59
rogpeppeTheMue: i'm not sure what you mean by "the business logic"12:00
fwereade_TheMue, IMO the good thing is that you *can* as long as you enforce communication by channels12:00
TheMuefwereade_: But we have so much overhead around it, each time with new tombs.12:00
fwereade_rogpeppe, the domain logic if you prefer12:00
rogpeppeTheMue: my proposal does away with most of the tombs12:00
fwereade_TheMue, is this overhead serious?12:00
TheMuerogpeppe: The stuff that I want to be done, sorry for the wording.12:00
fwereade_rogpeppe, yeah, that's what makes me uncomfortable, I find the tombs *really* helpful12:01
TheMuefwereade_: IMHO it can be done more simple using interfaces.12:01
rogpeppefwereade_: a tomb is overkill much of the time12:01
rogpeppefwereade_: did you look at the watcher implementations in the CL?12:01
fwereade_rogpeppe, if "knowing when you've stopped" is overkill, then yes12:01
rogpeppefwereade_: they don't use a tomb, and the code is no more complex IMHO12:01
rogpeppefwereade_: when you've only got one goroutine, there's no difficulty knowing when you've stopped :-)12:02
rogpeppefwereade_: you return...12:02
rogpeppeTheMue: the fundamental problem we're trying to solve here is that there are things changing all over the system, and we need to respond to them in a coherent way12:03
rogpeppes/to them/to the changes/12:03
rogpeppeTheMue: channel multiplexing can work really nicely here, but it's a right pain if you have to select every time you want to send or receive on a channel.12:04
TheMuerogpeppe: How does your CL helps regarding this point.12:04
TheMuerogpeppe: OK, get's more clear.12:05
rogpeppeTheMue: you see the two pieces of code at the start of the CL description?12:05
rogpeppeTheMue: that's the simplification that this CL buys you12:05
TheMuerogpeppe: That's why I started with using range.12:05
rogpeppeTheMue: *exactly*!12:05
TheMuerogpeppe: Indeed.12:05
rogpeppeTheMue: but with the way things are, you *can't use range*.12:05
rogpeppeTheMue: which seems wrong.12:06
rogpeppeIMHO this CL lets us write more natural Go code.12:06
TheMuerogpeppe: ack12:06
rogpeppefwereade_: one possibility i did consider was to allow passing in a nil stop channel to the watcher, which would mean "make your own stop channel"; and a method, Stop, which would close it.12:07
rogpeppefwereade_: i even started doing it, but it doesn't work very well.12:08
fwereade_rogpeppe, I think the thing I don;t like is the action-at-a-distance nature of it all12:09
rogpeppefwereade_: you mean that stopping isn't synchronous?12:09
fwereade_rogpeppe, you close the channel you originally passed in and a whole tree of goroutines shut themselves down, sending an arbitrary number of additional events, before everything is finally stopped12:10
fwereade_rogpeppe, internally to the watchers the receive-until-close works nicely12:10
fwereade_rogpeppe, but outside of them it feels like we're exposing our internals in a slightly inappropriate way12:11
fwereade_rogpeppe, does that make sense?12:11
rogpeppefwereade_: i know what you mean, but i think that it's not an internal thing - it's that telling anything to stop is a two-way process - we tell them to stop and then they get around to doing it.12:12
rogpeppefwereade_: and that an *inevitable* consequence of a synchronous stop is that you have to select on every channel send.12:12
rogpeppefwereade_: and i think that leads to uglier code overall12:12
rogpeppefwereade_: particularly when we come to the unit agent12:13
rogpeppefwereade_: and the firewall code12:13
rogpeppefwereade_: and, i think that it really won't be hard at all to avoid relying on synchronous-stop semantics12:14
fwereade_rogpeppe, won't the firewall code also have to deal with a lot more state to figure out what events should just be dropped because we don't care about them any more?12:14
rogpeppefwereade_: i don't think so.12:14
rogpeppefwereade_: we'll only stop things at the end, AFAICS12:14
fwereade_rogpeppe, you surely have a clearer idea of the details there than me12:14
fwereade_rogpeppe, surely when a machine is terminated you'll want to stop paying attention to changes?12:15
fwereade_rogpeppe, some changes anyway12:15
fwereade_rogpeppe, which could still be queued up from the past but will potentially want to write to state that you've deleted?12:15
rogpeppefwereade_: if that's the case, it's trivial to mark the machine as dead12:15
rogpeppefwereade_: if we see an update from a dead machine, we'll just ignore it. one if.12:16
fwereade_rogpeppe, ok, and when do we tidy up the dead machines?12:16
rogpeppefwereade_: GC12:16
fwereade_rogpeppe, how? when do we know that we we're guaranteed no more changes for a machine?12:17
rogpeppefwereade_: we don't. the goroutine that's responsible for sending on the channel holds a reference to the machine.12:17
rogpeppefwereade_: when it exits, the last reference goes12:17
fwereade_rogpeppe, ok, and how do we tell that goroutine to make the machine dead?12:17
rogpeppefwereade_: we don't12:18
fwereade_rogpeppe, we'll be findin out it's dead on a separate goroutine, right?12:18
rogpeppefwereade_: no12:18
rogpeppefwereade_: hold on12:18
rogpeppefwereade_: let me paste some code12:18
fwereade_rogpeppe, thnks12:18
rogfwereade_: bugger, my machine just randomly rebooted for no apparent reason12:23
rogfwereade_: i was about 10 lines into my example12:23
rogfwereade_: will be another 5 mins12:23
fwereade_rog, np, I'll stick some food on12:25
rogfwereade_: http://paste.ubuntu.com/1094802/12:36
fwereade_rog, sorry, will deal converse about this in a bit12:44
rogfwereade_: np12:45
* Aram is feeling just slightly slightly better.12:50
rogfwereade_: why don't you like Environ.Config BTW?12:50
Aramjust enough to get out of bed :).12:50
niemeyerGood morning!12:58
rogniemeyer: yo!13:03
rogniemeyer: did you have a good conference?13:03
rogAram: if you feel bad, just take the day off sick...13:03
niemeyerrog: Yeah, it was pretty nice13:03
rogniemeyer: your talk went down well, i trust13:04
niemeyerrog: Nothing so different, though, given I had been in other MongoDB conferences recently13:04
niemeyerrog: Seeing old friends and making new ones is great, though13:04
niemeyerrog: Yeah, talk was alright13:04
rogniemeyer: yeah13:04
fwereade_niemeyer, heyhey13:04
niemeyerrog: Haven't had much time to really prepare something great, so it was below what I'd like to do13:05
niemeyerfwereade_: Heya!13:05
rogniemeyer: you can't do everything!13:05
niemeyerThe 5-Gram Experiment turned out nicely, though13:05
fwereade_rog, I do like your environ config... did I comment on the wrong CL or something? :)13:05
niemeyerrog: True that is :)13:05
rog niemeyer: i've been thinking about watchers recently, and i wonder what you think of this: https://codereview.appspot.com/6373048/13:05
rogfwereade_: i meant, specifically the Config method on Environ.13:06
fwereade_rog, ah sorry13:07
fwereade_rog, I don't see a use case for it13:08
fwereade_rog, when would you need it?13:08
rogfwereade_: apart from anything else, it makes for a great test13:08
fwereade_rog, do we really need anything more than name?13:08
rogfwereade_: that caught quite a few errors when i was doing the branch13:08
fwereade_rog, hm, like what?13:08
rogfwereade_: times when i'd forgotten to return all the attributes from Attrs, for example.13:09
rogfwereade_: i can also see it being useful for debugging13:09
rogfwereade_: (it makes it trivial to print all the attributes of the current environ)13:09
fwereade_rog, I dunno, I think we can manipulate and verify and test configs just fine on their own13:09
rogfwereade_: by putting the test in jujutest.LiveTests, we automatically get that test for every environ that passes through that, which is more or less every environ tests13:10
rogs/tests/tested13:10
fwereade_rog, but that environ is usually wrong13:11
fwereade_rog, so it will make debugging harder :p13:11
rogfwereade_: it doesn't matter if it's wrong or right - it should still roundtrip13:11
rogfwereade_: sorry, wrong why?13:11
niemeyerrog: This code has just been refactored by fwereade_.. I think it's time for us to let it alone a bit so we can finish the rest13:12
rogniemeyer: fwereade_'s refactoring made it nice and easy to make this change :-)13:12
rogniemeyer: and i'm pretty sure it'll make writing the firewall and unit agent code much easier13:12
niemeyerrog: I don't feel like the code has improved significantly either, to be honest13:13
rogniemeyer: what about the two code fragments in the CL description?13:13
rogniemeyer: that's a common idiom13:13
niemeyerhttps://codereview.appspot.com/6373048/diff/5001/state/watcher.go13:13
niemeyerLine 44 on the new watcher13:13
niemeyer32 on the old file13:13
rogniemeyer: i changed the name because it does the go itself now13:14
niemeyerIt seems just as tricky, and requires as much understanding of the surroundings, or perhaps more, than the previous version13:14
rogniemeyer: perhaps runLoop might be better13:14
fwereade_rog, I see how you do the machine changes, I guess it's ok, but I'd still rather have the watchers behave prdictably than to have simple idioms for handling their unpredictability13:14
niemeyerrog: Not worried about naming13:15
niemeyerfwereade_++13:15
fwereade_rog, even at the cost of a few selects :)13:15
rogi think we should be able to write nice idiomatic Go code. and selecting on *everything* isn't good for that.13:16
fwereade_rog, and I don't think the UA stuff is too much of a car crash with the existing style ;)13:16
fwereade_rog, mileages may ofc vary13:17
rogthe "watcher cleans itself up and tells you when it has done" idiom works well, and is commonly used13:17
* rog is convinced this, or something like it, is the Right Way to do it.13:18
rogniemeyer: that code seems pretty equivalent to me.13:19
rogniemeyer: it's nice we can use a range, of course13:20
rogniemeyer: and 5 lines shorter is nice too13:21
niemeyerrog: LOL13:21
rogniemeyer: i agree it doesn't make much difference at the edges, but it really helps the multiplexer case, and both the firewaller and the unit agent do a lot of multiplexing.13:23
niemeyerrog: I haven't seen any kind of improvement in that direction in the CL13:24
rogniemeyer: that's because we don't have any multiplexers yet13:24
niemeyerrog: In fact, both the provisioner and the machiner have gained complexity13:24
niemeyerrog: Rather than being simplified13:24
rogniemeyer: i don't think one line extra is much gain.13:25
niemeyerrog: and now we have those awkward stop channels spread through the whole code base13:25
niemeyer(of state, specifically)13:25
niemeyerrog: I'd prefer to not do that now, and as suggested focus on pushing things forward13:25
rogniemeyer: yes, that is indeed the worst bit of it13:25
niemeyerrog: mstate is coming along as well13:26
rogniemeyer: whether we're using mstate or state doesn't make much difference to the code i'm thinking about13:27
niemeyerrog: Yes, it doesn't, but this is changing the interface while Aram is working on it13:27
rogniemeyer: ok, that's a reasonable point.13:27
niemeyerrog: It'd be great if we could stop fuzzing with this interface for a few weeks while we push the implementation of agents forward13:27
rogniemeyer: it was precisely because i was thinking about the implementation of agents that i wanted to make this change13:28
rogniemeyer: but i hope you'll bear this in mind when we find that the firewall code looks unnecessarily big and bulky13:29
niemeyerrog: That's only part of the suggestion ;-)13:29
niemeyerrog: I haven't seen it, but given the current agents we have in place, I really hope that this isn't the case13:29
rogniemeyer: ok, time for another slapdown. i was sympathetic to fwereade_'s cries of distress over the config stuff, tried to make it better, but couldn't. i then wondered whether an alternative approach might work. https://codereview.appspot.com/6353092/13:33
fwereade_niemeyer, rog: IMO the ugliest bit of the UA is likely to be the relationUnitWatcher, and I think that worked out tolerably13:33
rogniemeyer: it's lacking tests, and william made some comments that i will address if you like it.13:34
niemeyerrog: This is a branch from William?13:35
rogniemeyer: no, this was something i did very quickly while trying to work out what might work.13:36
rogniemeyer: i wanted to avoid saying yet again "try this" without knowing the implications13:36
niemeyerrog: This is a branch from William13:37
rogniemeyer: oops, so it is13:37
rogniemeyer: https://codereview.appspot.com/6343107/13:37
fwereade_niemeyer, sorry about that branch -- I did my best to follow what you wanted but wasn't able to make it nice13:38
fwereade_niemeyer, davecheney thought it was kinda OK so it might be an ok fallback, but I thought rog's approach was much cleaner13:39
niemeyerOh, this again..13:40
fwereade_niemeyer, sorry13:41
fwereade_niemeyer, believe me the thorn has been in my side too :)13:41
rogfwereade_: i'd like to see your code for relationUnitWatcher13:41
niemeyerfwereade_, rog: So, rather than evaluating yet another proposal from the ground up, what is the problem with the one brought up in the mailing list?13:42
rogfwereade_: it's your code, you say :-)13:43
fwereade_niemeyer, the problem is that I tried my best and was not satisfied with the result13:43
niemeyerfwereade_: That's not a problem.. that seems like a consequence of the problem13:43
rogfrom my point of view there was lots of code for little result13:44
roghaving the config type hold attributes for two different things made things awkward.13:45
fwereade_niemeyer, well, my version is still up on codereview if you want to take a look at that; I was not happy with it, though, and I didn't think you would be either13:45
rogconversely, embedding it seems to make things fall out more naturally.13:45
niemeyerfwereade_: Heh..13:46
fwereade_niemeyer, if I misjudged that then sorry; as it was I felt I'd screwed up the 3rd or 4th attempt at implementing it, and cutting my losses did not seem like a bad idea, especially since it let me get back to the unit agent13:46
niemeyerfwereade_: Is there a reason you can identify why that is the case? :-)13:46
rogniemeyer: the ComposeConfig function in this file seems to me to epitomise the difficulties: https://codereview.appspot.com/6353092/diff/2001/environs/ec2/provider.go13:47
fwereade_niemeyer, I feel like the actualy code is ugly and hard to follow and I'm still suspicious of corner cases despite heavy testing13:47
niemeyerrog: The proposal didn't even have this method13:47
rogniemeyer: it's fwereade_'s name for Validate13:48
rogniemeyer: same semantics13:48
fwereade_niemeyer, by best guess is that I Just Do Not Get It, and have failed to apprehend some aspect of what you're looking for13:48
niemeyerrog: There was nothing in config with that semantics, whatever its name13:48
fwereade_niemeyer, indeed; I tried to do what you were asking but I presumably misunderstood something, or was too obsessive about validation, or *something* that I cannot precisely identify13:49
niemeyerfwereade_: Okay.. I think I'll give it a try then13:49
fwereade_niemeyer, I look forward to the inevitable schooling ;p13:50
fwereade_niemeyer, but I'm sorry to add more to your plate :(13:50
niemeyerfwereade_: Well, one of us will definitely learn something.. not sure which yet :-)13:51
fwereade_niemeyer, we'll see :)13:52
rog[Monday 09 July 2012] [14:54:01] <rog>niemeyer: something like this, perhaps? http://paste.ubuntu.com/1082778/13:55
rog[Monday 09 July 2012] [14:54:26] <niemeyer>rog: Yeah, except it should be called Validate as we've been agreeing on13:55
niemeyer?!13:57
rogniemeyer: it takes an old config, a new config and returns a validated config by composing the two. seems fairly similar.13:57
niemeyerrog: Heh13:58
rogniemeyer: but like william, i probably misunderstood13:58
niemeyerrog: No, you didn't.. you just changed the proposal13:58
niemeyerrog: That paste is very different from what the CL has13:58
niemeyerrog: Anyway, would you mind if I tried to implement the proposal made, in smaller chunks?13:59
rogniemeyer: that's true, but i tried to move in that direction and failed.13:59
rogniemeyer: sigh13:59
rogniemeyer: i think we have spent quite a long time on this13:59
niemeyerrog: Yes, we have indeed!13:59
rogniemeyer: and i don't think my proposal is too shit13:59
niemeyerrog: Yet all the time I spent on it seems a bit wasted13:59
niemeyerrog: Is my proposal shit then?14:00
niemeyer:-/14:00
rogniemeyer: i didn't see yours implemented14:00
rogniemeyer: but i'm sure fwereade_ did the best he could14:00
niemeyerrog: fwereade_ was working on it, supposedly14:00
niemeyerrog: and you came up with something else..14:00
rogniemeyer: yes, because i tried to make something like yours work, and couldn't.14:01
fwereade_niemeyer, I was working on it, and I proposed a CL that pretty clearly betrayed my state of despair14:01
rogniemeyer: and i think that it ended up really quite nice a different way14:01
fwereade_niemeyer, so from my perspective it was a helpful thing to do that brought a great sense of relief14:02
niemeyerThat's all fine, but please don't judge me as I try to implement what I actually presented and was ignored14:02
fwereade_niemeyer, I would love to see you make it work14:02
niemeyer"We've spent quite a long time on this", as you say14:02
fwereade_niemeyer, please do not think I did not try14:02
rogniemeyer: ok, have a go14:02
niemeyerThanks14:02
fwereade_niemeyer, and as you say one of us will learn from it; I suspect it will be me, because it usually is :)14:03
rogniemeyer: seems like we have already got something workable, but go for it14:03
niemeyerrog: We've got lots of things workable.. fwereade_ had a different proposal a while ago that was workable too14:03
rogniemeyer: fair enough14:04
niemeyerrog: I don't appreciate the fact New returns "unknown" for example14:04
rogniemeyer: ?14:04
niemeyerrog: Nor the fact that there's no way for an environment to validate settings14:04
rogniemeyer: what?14:04
niemeyerrog: All of those things in your proposal were already debated14:04
rogniemeyer: which New returns "unknown"?14:04
rogniemeyer: and all environment settings are validated in my proposal14:05
rogniemeyer: at least, that was the intention14:05
niemeyerrog: There's no hook point as far as I can see to compare an old and a new configuration14:05
niemeyerrog: and prevent changes at the client side14:05
rogniemeyer: environs.Config.Change14:05
niemeyerrog: In case the modification is rendered invalid14:05
niemeyerrog: This must be per environment14:06
rogniemeyer: it *is* per environment14:06
niemeyerrog: I don't think I understand14:06
rogniemeyer: environs.EnvironConfig is implemented by each environment14:06
niemeyerrog: Ah, I see14:06
rogniemeyer: you can embed config.Config to get the common stuff14:07
niemeyerThis is the unknowns I was talking about:   38 // New creates a new Config from the given attributes, and also returns any attr14:07
niemeyer     ibutes14:07
niemeyer  39 // not known.14:07
niemeyer  40 func New(attrs map[string]interface{}) (*Config, map[string]interface{}, error)14:07
niemeyerrog: How do we return this from state?14:07
rogniemeyer: that's because it's designed to be embedded.14:07
niemeyerrog: How do we return this from state?14:08
rogniemeyer: have a look at how it's used in https://codereview.appspot.com/6343107/diff/11001/environs/ec2/config.go14:08
niemeyerrog: How do we return this from state?14:08
niemeyer:-(14:08
rogniemeyer: what state?14:08
niemeyerrog: *State.EnvironConfig()14:08
rogniemeyer: i don't think we need to do that.14:09
niemeyerrog: Heh14:09
niemeyerrog: That whole conversation started there14:09
rogniemeyer: i known. but i think it's a false premise14:09
rogniemeyer: but...14:09
rogniemeyer: if we want it to, then EnvironConfig could live inside the config package14:10
niemeyerrog: and then all the registry has to live there as well14:10
rogniemeyer: well... either state uses an environ to validate what comes out of the db or not14:11
rogniemeyer: if it *does* then there has to be some registry not in environs14:11
rogniemeyer: if it does not, then it cannot return a validated environ config14:11
niemeyerrog: We can have a first class type being returned from state even if it's not validated14:11
niemeyerrog: Because it was already validated on entrance14:12
rogniemeyer: why not just return the attributes?14:12
rogniemeyer: same difference14:12
niemeyerMaybe I should just give up on this.. it's like the fourth time I'm going over this14:13
niemeyerRather than converging there's a brand new implementation every time14:14
rogniemeyer: so your objection to my branch is that we can't return a config.Config from state?14:14
niemeyerrog: I'm just going bit by bit about how the proposal sent to the mailing list, for which there's no reply other than "looks great", was put in place14:15
rogniemeyer: are you talking about my proposal now, or william's, or yours?14:16
niemeyerrog: Heh14:16
TheMueSo, next iteration of firewaller is in for review: https://codereview.appspot.com/6404051 . And this time the adding of the former CL as a requisite worked. Yeah!15:07
rogTheMue: i'm taking a look15:21
niemeyerrog, TheMue, fwereade_, Aram: Are any of you planning on buying a Raspberry Pi?15:29
rogniemeyer: not currently15:30
rogniemeyer: i don't have any spare geek time :-)15:30
niemeyerrog: Hehe :)15:30
fwereade_niemeyer, not really, I like the idea but doubt I'd actually do anything with it if I had one ;)15:30
fwereade_niemeyer, what rog said ;)15:30
niemeyerrog: That's wise.. I have a bunch of hardware I've never played at home :-)15:30
niemeyerSome of them did make up for some good time, though15:30
rogniemeyer: yeah, and what fwereade_ said too - too much decaying h/w in the attic15:31
niemeyermramm: What about you, any plans?15:31
TheMueniemeyer: I'm not planing it, I never had been good in HW things. Even if it looks interesting.15:32
mrammniemeyer: no plans yet15:32
niemeyerCrap :)15:32
mrammniemeyer: but I keep thinking about it15:32
TheMueniemeyer: But a box with a Tilera 64 would be nice. ;)15:32
Aramniemeyer: I am planning to buy one (or more), why?15:32
niemeyerAram: Because they are now available, and I was going to ask someone to take one to the sprint in case they arrived on time15:33
niemeyerAram: http://www.raspberrypi.org/archives/158815:33
niemeyerAram: But now that I read it, it won't fly15:33
AramI'll order some, but it won't get in time15:33
niemeyerIt's taking months to deliver15:33
niemeyerYeah15:34
mrammThere is a guy at the co-working space I sometimes use who has a couple15:34
mrammbut he's been on the list forever15:34
mrammand has a startup that's doing a bunch of open source hardware/computer vision stuff15:35
mrammso he's unlikely to let me take one away from him for 3 weeks15:36
mramm(which is how long I'll be away counting this sprint through the one on the isle of man)15:37
niemeyermramm: Aw :)15:53
mrammhaha15:53
niemeyerOkay, I'll grab some quick lunch and bbiab15:54
rogTheMue: you have a review16:40
rogTheMue: i'm concerned about the unsafe access to firewaller private variables from the tests.16:41
rogTheMue: they could be flaky in a very hard-to-diagnose way in heavily loaded environments16:42
rogTheMue: how about something like this, so allow instrumenting the internal state: http://paste.ubuntu.com/1095153/16:42
rogTheMue: again, with a comment on CheckProgress this time: http://paste.ubuntu.com/1095160/16:44
TheMuerog: Thx, have to get deeper behind your idea.16:59
rogTheMue: how do you mean?16:59
TheMuerog: To understand it. Only had two quick views on it.16:59
rogTheMue: which idea?17:00
TheMuerog: Huh, the one you posted above.17:02
rogTheMue: ah, the test instrumenting idea?17:02
TheMuerog: Yes.17:02
niemeyer"The conference will begin when the LEADER arrives.. there are.. currently.. *9* other participants."17:02
rogniemeyer: ha17:03
TheMuerog: Where do I access private variables?17:03
rogTheMue: i don't actually like it that much, because it clutters the runtime code for the tests, but i don't see a better alternative17:03
mrammniemeyer: yea, the hold music is particularly awesome today too17:03
rogTheMue: in CheckProgress you can safely call functions defined in export_test.go that access private variables17:04
niemeyermramm: Seems the same for me17:04
* niemeyer tries to code without being disturbed by the bad music17:04
rogTheMue: i thought about another alternative that adds a global variable, but i didn't like it17:05
TheMuerog: In other places we use that kind of export_test too17:05
TheMuerog: No, indeed, no global.17:05
rogTheMue: there's nowhere as far as i know that accesses private variables unsafely.17:05
fwereade_so, it turns out somehow it's past 717:05
mrammniemeyer: perhaps I just haven't listened to it long enough17:05
fwereade_gn all, see you tomorrow17:05
mrammfwereade_: good night17:05
rogfwereade_: gn, enjoy the evening!17:05
TheMuefwereade_: enjoy17:06
rogi've gotta go in a moment too17:06
* TheMue too, but later I'll take a deeper look into rogs ideas17:06
rogTheMue: another (and worse) alternative is to put a mutex around the private variables.17:07
TheMuerog: No, the tests shouldn't bother the productive code17:08
rogTheMue: i agree, but i don't see a good alternative17:08
rogTheMue: we're trying to introspect the internal state of the firewaller17:08
rogTheMue: i was trying to make the instrumentation code as minimal as possible, but it's still there.17:09
rogTheMue: to be honest, i wouldn't mind no tests at all for this code and lots of tests for the final behaviour which is what we're after17:10
TheMuerog: So maybe I could keep it while we're approaching the final state and then remove it.17:11
rogTheMue: but until we get there, something like this is useful i think. we can delete these tests later.17:11
rogTheMue: exactly17:12
rogTheMue: if there was a "test" build flag, we could do it with no overhead...17:12
TheMuerog: ??? How?17:13
rogTheMue: i'd have two type definitions, one in testing mode and the other in non-testing mode. the non-testing mode type would have stubs for the functions, which would be empty. the testing mode would have members like testStub in my idea.17:14
rogTheMue: calls to empty functions are removed by the compiler, so... no overhead.17:14
rogright, i'm off for the day. see y'all tomorrow.17:19
TheMuerog: Interesting, thx for sharing. We should discuss it tomorrow.17:19
rogTheMue: definitely17:19
TheMuerog: Enjoy, here is dinner time too17:20
* TheMue waves17:20
niemeyerdavecheney: yo!23:05
niemeyerdavecheney: how're things going there?23:06
davecheneyniemeyer: hey, how was your conference ?23:16
niemeyerdavecheney: It was pretty good23:16
niemeyerdavecheney: Always a chance to meet old and new friends23:17
niemeyerdavecheney: and exchange ideas on how things have been moving23:17
davecheneyindeed23:17
niemeyerdavecheney: How're things going for you?23:20
davecheneygood, just talking a spin through roger and williams comments23:20
niemeyerdavecheney: Do you have a moment for a quick call?23:21
davecheneysiure23:22
davecheneyskype or g+ ?23:22
niemeyerdavecheney: G+, if that works23:23
davecheneytwo secs23:23
davecheneyniemeyer: just rearranging the myriad of usb devices23:25
niemeyerdavecheney: Cool, no worries23:25
davecheneyimma online, but you do not appear to be23:27
niemeyerdavecheney: I've just invited you23:28
niemeyerdavecheney: Maybe the wrong you? :)23:28
davecheneyniemeyer: maybe, nothign here23:29
niemeyerhttps://plus.google.com/hangouts/_/4ac7f87247068630837d29e94eee4ad282d7c8f7?authuser=0&hl=en23:29
niemeyerOK: 12 passed23:52
niemeyerPASS23:52
niemeyerok      launchpad.net/juju-core/worker/provisioner      8.444s23:52
niemeyerdavecheney: !!23:52
niemeyer:-)23:52
davecheneyniemeyer: whoop whoop23:54

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