/srv/irclogs.ubuntu.com/2012/05/17/#juju-dev.txt

davecheneyniemeyer: do you have any further comments on https://codereview.appspot.com/6215045/ ?00:10
niemeyerdavecheney: Heya00:18
niemeyerdavecheney: Good morning00:18
niemeyerdavecheney: I'll have a pass on your branches00:19
niemeyerdavecheney: Just back from dinner now00:19
niemeyerdavecheney: Will finish Rog's one first, though.. already half way through the massive branch00:19
niemeyerdavecheney: ping?00:48
davecheneyack00:51
niemeyerdavecheney: Heya00:55
niemeyerdavecheney: How are you?00:55
davecheneygood00:55
davecheneysorry, was downstairs having breakfast00:55
niemeyerdavecheney: No worries at all00:55
davecheneyi generally work from when I get up to when sam gets up00:55
niemeyerdavecheney: Just wanted to take the chance we're both up and kicking to chat a bit00:55
davecheneysure thing00:56
niemeyerdavecheney: Who's Sam?00:56
davecheneymy partner00:56
davecheneyshe's not a morning person00:56
niemeyerdavecheney: Aha, I can understand that! :)00:56
davecheneyso, what can I do to get those reviews cleared away00:57
niemeyerdavecheney: I work in the morning because I interact with the guys in the EU, but it's certainly not my most productive moment in the day00:57
niemeyerdavecheney: I'm just finishing that monster review for Rog.. I have yours next up00:57
davecheneyno worries00:57
niemeyerdavecheney: I think I still have spare energy to get through them00:57
davecheneyi'm not blocked at the moment00:58
niemeyerdavecheney: How've you been feeling this week with the work-at-home situation?00:58
davecheneyit's working well00:58
davecheneyi ordered a new X22000:59
davecheneyso when taht arrives i'll be more mobile00:59
davecheneybut for the moment i'm just kicking it in the spare room00:59
niemeyerdavecheney: Nice. Coincidently, my battery just died today, so I'm stuck in the office :)01:06
davecheneyso i read01:07
davecheneyli-ions tend to fall off a cliff01:07
niemeyerPhew..01:11
niemeyerdavecheney: Yeah01:12
niemeyerBranch reviewed01:12
niemeyerThat was a long oen01:12
davecheneynice work01:12
davecheneyi understand, small branches >> large brances01:12
andrewsmedinahi guys01:13
andrewsmedina:D01:13
* davecheney waves01:16
niemeyerdavecheney: https://codereview.appspot.com/6215045/ has a review, and LGTM with the points addressed.01:23
niemeyerandrewsmedina: Heya!01:23
niemeyerandrewsmedina: juju team is 24x7 now ;)01:23
niemeyerWell, 24x5 at least!01:24
andrewsmedinaI'm 24x701:24
andrewsmedinaniemeyer: I'm working on https://codereview.appspot.com/6099051/01:24
niemeyerandrewsmedina: No, I'm serious.. davecheney is in Australia.. we're going round-the-clock now :)01:25
davecheneyniemeyer: thanks for https://codereview.appspot.com/6215045/, i'll address those comments and submit01:25
andrewsmedinaI will tell you when I finish it01:25
niemeyerdavecheney: My pleasure, and thanks01:27
niemeyerandrewsmedina: Super!01:27
davecheneynegronjl: re your final comment01:28
davecheneyI would personally find it ok if we injected the "name" attribute on the01:28
davecheneyenvironment configuration when reading it out of environments.yaml.01:28
davecheneycan I handle that in a later branch ?01:28
davecheneyi'll change the config to be a TODO01:28
davecheneyniemeyer: did you have a chance to consider the race with AddMachine() ?01:32
niemeyerdavecheney: Re. "name", yeah, definitely.. wasn't suggesting it'd be for the same branch. I suggest fixing the "TODO", though.01:32
niemeyerdavecheney: re. the race, which race?01:33
davecheneythe way state.AddMachine works currently, it's changes are visible to the MachineWatcher while the topology is inconsistent01:33
niemeyerdavecheney: Duh.. that kind of thing is the core reason why we have the topology01:35
niemeyerdavecheney: I forgot about it when reviewing. Thanks a lot for pointing that out.01:35
davecheneyi haven't looked into it too much, but it might be possible to fix the problem by reordering the operations inside AddMachines01:36
davecheneybut as it stands now, the MachineWatcher observes /machines changing, but when it calls state.Machine("the name of the key that just arrived"), it can fail because the topology has not yet changed to reflect that01:36
niemeyerdavecheney: The only reason we have a central monotonic topology is so that we can get atomicity in that kind of operation01:37
niemeyerdavecheney: I suggest a quick look at the watch_machine_states in the Python side01:38
davecheneywill do01:38
niemeyerdavecheney: If we reorder operations, we have the same problem on the opposite side01:38
niemeyerdavecheney: (code reading the topology explodes due to lack of nodes)01:39
davecheneyright01:39
niemeyerdavecheney: Eventually, we may have to get smarted than that to scale up to more extreme levels01:39
niemeyersmarter01:39
niemeyerdavecheney: But then we'll need to consider races, locks, expirations, etc01:40
niemeyerdavecheney: The monotonic topology is a cheap way to get going for a long time without having to invest much on scenarios that re unrealistic in the near future01:40
davecheneyi think i haven't explain myself properly01:41
davecheneyi shouldn't have said the topology is inconsistent01:41
davecheneymore that state.Machine() races with state.AddMachine()01:41
niemeyerdavecheney: It doesn't01:52
niemeyerdavecheney: At least not any more than the fact everything always races with everything01:52
niemeyerdavecheney: Changing the topology is atomic.. AddMachine will add to the topology atomically, and state.Machine will read it atomically01:53
niemeyerdavecheney: The watcher needs to observe the topology, though, not the nodes themselves01:55
niemeyerdavecheney: Btw, when you "lbox submit", the latest changes in the branch are pushed to the codereview01:59
niemeyerdavecheney: So, unless you want to have a last look online, the propose preceding it isn't necessary01:59
niemeyerdavecheney: Ah, I think I've got the context for what you're talking about now, looking at your branch02:02
niemeyerdavecheney: Sorry for the noise02:02
davecheneyniemeyer: re lbox propose, yeah I do that so I have a diff of what is the final state02:03
davecheneyit probably don't need to do that02:03
niemeyerdavecheney: It doesn't bother me.. was just pointing out that submit does send the diff too02:04
niemeyer(since it's not obvious)02:04
davecheneyniemeyer: when you say context, you're talking about the comment at the bottom of MachinesWatcher.toMachines02:04
niemeyerdavecheney: yeah02:04
niemeyerdavecheney: Was just prising the comments, coincidently02:04
niemeyerdavecheney: You got a LGTM on it02:05
davecheneynice02:05
davecheneythere is a similar problem with doing state.Machine('an id which was just deleted') but for more obvious reasons02:06
niemeyerdavecheney: yeah02:06
davecheneyniemeyer: thanks for the reviews02:15
davecheneyI started to work on the provisioning agent proper yesterday02:15
davecheneyso I shold have a wip branch this evening02:15
niemeyerdavecheney: Woot02:21
davecheneyi have a plan to model the current privider (environs.Environ) as a goroutine02:21
davecheneywhich should hide the fact that it can reload itself as the environment changes02:22
davecheneywithout having to require a lot of retry logic02:22
niemeyerdavecheney: Btw, would you mind to work on a branch fixing WatchMachines?02:24
davecheneysure02:24
davecheneyso, you would like WatchMachines to not return a *Machine unless it is properly visible in the topology ?02:25
niemeyerdavecheney: WatchMachines should be a content watcher, not a child watcher02:26
niemeyerdavecheney: and watch the topology02:26
niemeyerdavecheney: Otherwise it will be notifying about machines before they are visible, which will create all kinds of bugs02:27
niemeyerdavecheney: The Python logic already works like that for the same reason02:27
davecheneyok, understood02:27
niemeyerAaand that's bad time!03:20
niemeyerI mean, good time!03:20
niemeyerGood time for bed! :)03:20
niemeyerHave a good night all03:20
niemeyerdavecheney: And a good day to you, Dave03:20
davecheneynight mate03:45
hazmatdavecheney, x230s are around the corner04:18
hazmatalways something i suppose04:18
rogpeppedavecheney: hiya06:17
davecheneyhi rog06:27
davecheneyhazmat: don't tell me that, i just dropped a gorilla on an x 22006:28
rogpeppedavecheney: hey, we coincide!06:38
davecheneyshazam06:39
davecheneyso, after redoing watchmachine, i have to redo it again :)06:39
davecheneyoh well, at least I got two commits off my plate today06:39
rogpeppedavecheney: yeah, i saw that. bummer.06:39
rogpeppedavecheney: is it that it can't use the child watcher?06:39
davecheneyno, not directly, although i'll probably end up implenting the same logic06:40
davecheneythe problem witht eh child watcher is i observe new /machine keys arriving before they exist in the topology06:40
davecheneygustavo says i need to watch the topology insteam06:40
rogpeppedavecheney: i wonder if *anything* can legitimately use the child watcher06:40
davecheneyrogpeppe: i'm starting to think not06:40
davecheneystill, once we get the provisioning agent right, the machine and unit agents will probably be 95% the same06:42
rogpeppedavecheney: interesting. i'm sure the python version watches children somewhere. but maybe it's wrong.06:42
rogpeppedavecheney: machine agent is simple. the unit agent is a bit more complex as it needs the logic for determining which hook to run when (the core of juju in fact)06:43
davecheneyno, it watches the topology,06:43
rogpeppetrunk/juju/state/relation.py:65306:46
rogpeppetrunk/juju/state/relation.py:83906:47
rogpeppedavecheney: so there is at least *one* place that watches children06:47
rogpeppedavecheney: i can't immediately work out if it's legit though06:48
davecheneywill read in a sec06:48
rogpeppedavecheney: BTW after discussion with gustavo last night, i have an idea for simplifying the ConfigChecker part of EnvironProvider, and making it slightly more statically typed.06:52
davecheneyrogpeppe: if you want to do a branch for that, i'll gladly review it06:53
rogpeppedavecheney: cool. it might only be 10 minute's work. i'll have a look now.06:54
davecheneyrogpeppe: the part where you pass an untyped 'something' through the Checker and receive another opaque 'something' back which is specific to the Provider that checked it, doesn't make me feel wholesome06:55
rogpeppedavecheney: yeah. i don't mind the second part so much, but now that we mandate that the initial "something" is actually [string]interface{}, we should reflect that in the API.06:56
davecheneyrogpeppe: +106:56
rogpeppedavecheney: heh, maybe it should return a func() Environ, rather than an opaque "something"06:57
rogpeppedavecheney: then the state would be hidden behind a closure.06:57
davecheneyrogpeppe: now that would be more appropriate for Go06:59
rogpeppedavecheney: i think so06:59
rogpeppedavecheney: how about something like this: http://paste.ubuntu.com/991940/07:04
davecheneybtw, state/machine.py ~ 103 sort of does what your child watcher does07:05
rogpeppedavecheney: yeah. i think when i did the child watcher i was misremembering that piece of code.07:08
davecheneywell, it does do what your child does, ie it takes an old set, then waits for a new set, the produces a delta of machines added and machines left07:09
rogpeppedavecheney: BTW if you don't mention my IRC nick, i tend not to see your comments (it makes my machine beep...)07:09
rogpeppedavecheney: exactly. i think i'd misremembered the fact that it reads topology not children.07:10
davecheneyrogpeppe: np, anyway, i hope the functionality exists inside the topology (haven't looked yet)07:10
rogpeppedavecheney: i don't think there's a similar watcher yet.07:11
* davecheney fml07:11
rogpeppefml?07:12
davecheneyhttp://www.urbandictionary.com/define.php?term=FML&defid=514519807:14
rogpeppethat bad, eh?07:14
davecheneyno, not really07:17
davecheneyrogpeppe: re http://paste.ubuntu.com/991940/07:24
davecheneyrogpeppe: why produce a func that produces an Environ, why not produce the Environ directly ?07:24
rogpeppedavecheney: because we want to be able to check all the environments in environments.yaml for correctness without instantiating them all.07:25
rogpeppedavecheney: an environment is perfectly entitled to do some expensive operation when opened.07:25
davecheneyfair enough07:25
rogpeppedavecheney: i'm liking the way it's looking so far07:26
davecheneyrogpeppe: yup, fair point, in that case func(Environ, error) is really just an anonymous type for EnvironProviderHolder, or something07:26
davecheneybut it gets the job done07:26
rogpeppedavecheney: yeah.07:26
rogpeppeit could return a Config type. type Config interface { Open() (Environ, error) }07:27
rogpeppebut i don't mind returning a simple function.07:28
rogpeppealthough....07:28
davecheneyi'd argue for the functional approach07:28
rogpeppeactually that might be nice. we've already got a config type in ec2 and elsewhere.07:28
rogpeppeand we'd just need to define an Open method on it.07:28
rogpeppei could go either way07:29
davecheneyrogpeppe: so, Check(config map) => Config; Config.Open() => Environ ?07:29
rogpeppedavecheney: yeah07:29
rogpeppedavecheney: i think i prefer that actually.07:30
rogpeppes/Config/EnvironConfig/ i think07:31
rogpeppedavecheney: current state: http://paste.ubuntu.com/991957/07:33
davecheneyrogpeppe: LGTM07:34
davecheneyrogpeppe: how did your networking explorations go ?07:34
rogpeppedavecheney: i totally failed to set up a bpf filter (no idea why - couldn't see anything in the kernel code to indicate why i was getting EINVAL); but i've realised that i *think* i can just use the tun device and get the kernel to do all the filtering for me.07:36
rogpeppedavecheney: had fun on the plane writing a little translator to the bpf VM language. came across a really nice use of defer.07:36
davecheneyrogpeppe: as a suggestion, if you're bringing up a tun device, then you can just use IP routing to do what you want07:37
rogpeppedavecheney: exactly.07:37
davecheneyrogpeppe: bpf might get you max nerd cred, but IP routing is easier and better understood07:37
rogpeppedavecheney: i just have to work out how to use an etun device because you can't share a network interface across lxc instances07:37
rogpeppedavecheney: but that's probably easy to do through the lxc interface in fact.07:38
davecheneyrogpeppe: yeah, lxc has a number of networking options; I would _think_ that we do _not_ want bridging (which is what it does out of the box)07:38
rogpeppedavecheney: yes.07:39
davecheneyfrom experience with OpenVZ, on the host side, you get an interface called venet0, which you assign all the ip's of the containers you're running07:39
davecheneyas long as you get the IP packets to the host, it will do the rest07:39
rogpeppedavecheney: i *think* that etun (a kind of interface "pipe") does what i'm after, but i haven't had great joy finding docs.07:39
davecheneyessentially the OpenVZ guests are running ppp (think point to point, not ppp serial) links to the host07:40
davecheneyso there is layer 3 routing involved07:40
rogpeppedavecheney: the most important thing is being able to read the IP packets generated by the guests from some central point.07:40
rogpeppedavecheney: and that the kernel knows enough to route between local guests.07:41
davecheneyyeah, dunno if you can sniff on the host side of an LXC container07:41
davecheneythe kernel will be able to route between the local LXC containers07:41
davecheneythat sorta comes for free07:41
rogpeppedavecheney: i found this to be a useful intro: http://backreference.org/2010/03/26/tuntap-interface-tutorial/07:42
davecheneyrogpeppe: thanks for the link07:43
rogpeppedavecheney: i got all that stuff working ok.07:43
rogpeppedavecheney: but i haven't put it together with lxc yet07:43
davecheneyrogpeppe: ip (iproute2) is an amazing tool, and virtually completely without documentation, unless you've used cisco routers, then it's like second nature07:43
rogpeppedavecheney: it seems ok actually. the syntax isn't too shit.07:44
davecheneyrogpeppe: i found it pretty unfriendly to exploration07:44
rogpeppedavecheney: it reminds me of the configuration language you use for talking to the plan 9 ip device07:44
davecheneyalthoguh i got pretty friendly with ip r s07:44
rogpeppedavecheney: it would be nice to have some decent docs though, it's true.07:44
rogpeppeip r s?07:45
davecheneyip route show07:45
rogpeppeah07:45
davecheneyip r a 10.0.0.1/32 gw tun007:45
davecheneywas another favorite07:45
rogpeppedavecheney: using the ip command beats working out the right argument to pass to the right ioctls...07:46
rogpeppedavecheney: what's the difference between route add and addr add?07:47
davecheneyrogpeppe: adding an address to an interface is an endpoint07:47
davecheneyadding a route, establishes a possible flow between endpoints07:47
rogpeppedavecheney: ok. that makes sense.07:48
rogpeppedavecheney: in my case though, i'm using an endpoint as a route...07:48
davecheneyrogpeppe: yeah, it gets murkey07:49
davecheneytraditionally you'll say, ip r a 192.168/16 gw tun007:49
davecheneysorry07:49
davecheneyip r a 192.168/16 gw 10.0.0.107:49
davecheneythat is, send anything for 192.168/16 to 10.0.0.1, it knows what to do07:50
rogpeppedavecheney: is 192.168/16 equiv to 192.168.0.0/16 ?07:50
davecheneybut there are more complex combinations, generally when the next hop is either not local to our network, or a point to point link07:50
davecheneyyes, http://en.wikipedia.org/wiki/CIDR_notation07:50
davecheneythey are all shorthand07:51
davecheneyanyway, i'd better get my self together to go out07:52
davecheneydevops sydney starts in an hour07:52
rogpeppedavecheney: k07:52
rogpeppedavecheney: have fun07:52
davecheneywd07:52
rogpeppedavecheney: hmm, not obvious from that page that 192.168 is equivalent to 192.168.0.0.07:54
rogpeppedavecheney: i've used 127.1 as an alias for 127.0.0.1 in the past, so it's not universal...07:55
fwereadeheya rogpeppe09:30
rogpeppefwereade: yo man!09:30
rogpeppefwereade: thought you were off!09:30
fwereaderogpeppe, today's cold and dull :)09:31
rogpeppefwereade: where r u?09:31
fwereaderogpeppe, my mum's house in gloucestershire09:31
rogpeppefwereade: ah, cold and grey is par for the course currently...09:32
fwereaderogpeppe, I will almost certainly take a couple more off over the next week but I don't want to entirely cut myself off :)09:32
rogpeppefwereade: cool.09:32
fwereaderogpeppe, btw, I really enjoyed lord valentine's castle10:15
rogpeppefwereade: great, innit?!10:15
rogpeppefwereade: there are sequels...10:15
fwereaderogpeppe, good old-fasjioned gripping yarn, nicely written, cool tech just peeking out of the background10:15
rogpeppe'xactly10:15
rogpeppei really liked that world10:15
fwereaderogpeppe, yeah, I was thinking I'd have to look them up :)10:16
fwereaderogpeppe, also there's something quite nice about a world running on tech they don't understand that *doesn't* draw all its drama from the obvious "it's breaking down and nobody understands it" scenario10:17
rogpeppefwereade: yeah. the tech is not central.10:17
rogpeppefwereade: i also fondly imagine, though i haven't read it in a while, that it hasn't dated badly.10:21
rogpeppefwereade: because of its lack of connection to the present day10:21
rogpeppefwereade: did you ever read Helliconia Spring BTW?10:21
fwereaderogpeppe, perhaps ever such a gentle sepia tinge10:21
fwereaderogpeppe, but quite possibly that was just triggered off it being an old book, becaue I can't think of anything specific10:22
fwereaderogpeppe, nope10:22
rogpeppefwereade: great series. Brian Aldiss.10:22
* fwereade is *sure* he read some of his stuff but can't remember what10:22
* rogpeppe hasn't read any of his stuff in ages, but read most of it years ago.10:23
rogpeppefwereade: http://www.amazon.co.uk/Helliconia-Spring-Summer-Hellonica-MASTERWORKS/dp/0575086157/ref=sr_1_1?ie=UTF8&qid=1337250194&sr=8-110:24
fwereaderogpeppe, cool, that series has not led me wrong at any time I can recall10:24
rogpeppefwereade: not sure i've read anything from that series actually10:25
rogpeppefwereade: the original helliconia covers were definitely better.10:25
rogpeppefwereade: http://www.amazon.co.uk/Helliconia-Spring-Brian-W-Aldiss/dp/0586053654/ref=sr_1_4?ie=UTF8&qid=1337250194&sr=8-410:25
rogpeppefwereade: http://www.amazon.co.uk/Helliconia-Summer-Panther-Books-Aldiss/dp/0586053662/ref=sr_1_5?ie=UTF8&qid=1337250194&sr=8-510:26
fwereaderogpeppe, I haven't read all that many I guess but all the ones I've read have been good10:26
rogpeppefwereade: http://www.amazon.co.uk/Helliconia-Winter-Brian-Aldiss/dp/0586053670/ref=sr_1_6?ie=UTF8&qid=1337250194&sr=8-610:26
rogpeppe:-)10:26
fwereaderogpeppe, yeah, those are much more interesting10:26
rogpeppefwereade: they're also fairly close to the actual contents of the book, which is unusual10:26
fwereaderogpeppe, I still keenly remember the disappointment of my first don't-judge-etc moment ;)10:28
rogpeppefwereade: :-)10:28
rogpeppefwereade: the style isn't as accessible as Valentine's Castle. you can get a good idea from the Look Inside...10:29
fwereaderogpeppe, seems quite pleasing to me10:31
fwereaderogpeppe, I can imagine times I wouldn't be in the mood for it10:31
rogpeppefwereade: it's definitely lingered in my mind.10:31
rogpeppefwereade: you might want to have a look at https://codereview.appspot.com/6145043/10:48
rogpeppefwereade: it's got quite a bit of new stuff in after discussions with niemeyer10:48
rogpeppefwereade: in particular, check out the Storage types in environs/interface.go10:49
Arammorning.11:16
fwereaderogpeppe, sorry I missed that, I'll take a look; morning Aram11:21
rogpeppeAram: hey11:22
rogpeppefwereade: i've uploaded a new version addressing niemeyer's comments.11:44
fwereaderogpeppe, just saw, thanks11:45
fwereaderogpeppe, and the storage stuff is indeed very pleasing, nice work11:48
rogpeppefwereade: cool. it's funny how a tiny niggle (ToolsPath in this case) can lead to a significant advance.11:51
rogpeppefwereade: "This being an interface method says to me that it's done by definition ;)."12:02
rogpeppefwereade: not quite sure what you mean there12:02
rogpeppefwereade: "juju1.2.3-precise-i386.tgz" vs "juju-1.2.3-precise-i386.tgz" ?12:19
rogpeppefwereade: which do you prefer?12:19
fwereaderogpeppe, sorry, it would appear I can't read and failed to notice it was commented out12:19
* fwereade looks bashful and goes to eat lunch12:19
rogpeppefwereade: np12:19
Aramrogpeppe: juju-1.2.3-precise-i386.tgz is better for awk.12:20
rogpeppeAram: ok. good enough. that's what i have already.12:21
rogpeppei just noticed i had also had the other variant in the past12:21
* rogpeppe goes for lunch12:52
niemeyerMorning!13:21
fwereadeheya niemeyer13:21
niemeyerfwereade: Heya, how're things going there?13:22
niemeyerfwereade: Still in the uk?13:22
fwereadeniemeyer, not bad; cold and wet13:22
fwereadeniemeyer, that should answer your followup too ;)13:23
niemeyerHaha :)13:23
niemeyerfwereade: Having fun with the family?13:23
fwereadeniemeyer, yeah, it's lovely13:23
niemeyerfwereade: nice13:23
fwereadeniemeyer, I think since I have the opportunity I will take tomorrow until tues as a proper holiday if that's ok with you13:24
niemeyerfwereade: Yeah, it's cool13:24
fwereadeniemeyer, great, thanks :)13:24
niemeyerfwereade: no worries, good to enjoy the family every once in a while :)13:26
fwereadeniemeyer, absolutely :)13:26
fwereadeniemeyer, laura brought be a bunch of flowers today, it was awesome :)13:27
niemeyerfwereade: Hah, so sweet :)13:27
andrewsmedinaHeya!13:35
niemeyerandrewsmedina: Morning!13:35
andrewsmedinaniemeyer: morning!13:38
rogpeppeniemeyer: hiya!14:09
niemeyerrogpeppe: Hey man14:13
niemeyerrogpeppe: How's tricks?14:13
rogpeppeniemeyer: great. am pleased with the last couple of branches. just working on upload-tools, to integrate the upstream stuff.14:13
rogpeppeniemeyer: sorry about the size of the last one14:13
rogpeppeniemeyer: lp doesn't make it easy to split a branch during review14:14
niemeyerrogpeppe: No worries, it was partly self-inflicted :)14:14
rogpeppeniemeyer: i'm hoping you like the new Listen/Close thing in the dummy environ.14:15
rogpeppeniemeyer: that's the only substantive change this time round, i think.14:15
niemeyerrogpeppe: Why do we need it?14:15
niemeyerrogpeppe: Can't we simply Reset a single time in the test?14:15
rogpeppeniemeyer: because we need to be able to signal to the dummy environ that no more changes are coming14:15
rogpeppeniemeyer: we need to Reset to listen; then we need to wait for any changes on the channel.14:16
niemeyerrogpeppe: Ok, that may be done with a single Reset14:16
rogpeppeniemeyer: by closing it, we know there are no more to come.14:16
rogpeppeniemeyer: but we also want to be able introspect the state after the channel has been closed.14:16
rogpeppeniemeyer: so that we can tell that tools have been uploaded for example.14:16
rogpeppeniemeyer: that was why i added the bool arg, but i think Listen/Close is cleaner.14:17
niemeyerrogpeppe: I don't see why we need to do that afterwards.. but either way I like the sound of it too14:17
rogpeppeniemeyer: well, we can't do it before!14:18
rogpeppepwd14:19
niemeyerrogpeppe: We only need to Reset once in a test.. you then have a channel of events to introspect14:21
niemeyerrogpeppe: You can use that single channel of events in all verifications14:21
rogpeppeniemeyer: yes, but we need to introspect *after* all events have completed.14:21
niemeyerrogpeppe: Not really14:22
niemeyerrogpeppe: There's no intrinsic reason why that would be the case14:22
rogpeppeniemeyer: we don't necessarily know what operations will be performed14:22
Aramwhat's a branch in this context, it seems to me the branches you're talking about are not VCS branches, right?14:22
rogpeppeAram: VCS branches, yes14:22
Aramor is bzr different?14:22
niemeyerrogpeppe: Yes, we don't.. welcome to mocking14:22
Aramhmm.14:22
niemeyerrogpeppe: You're asserting that you know it..14:22
rogpeppeniemeyer: i don't *think* so.14:23
rogpeppeniemeyer: i'm asserting that i know at least one operation that will be performed. and that the files can be downloaded afterwards.14:23
rogpeppeniemeyer: if the channel isn't closed, then i'll have to time out on error, and i don't want to do that.14:23
niemeyerrogpeppe: Huh.. you're asserting a sequence of operations, and closing the channel in a way that explodes if it doesn't work14:24
niemeyerrogpeppe: Anything else done by the environment will cause the test to explode14:24
niemeyerrogpeppe: You might as well do that without resetting in the middle, for example14:25
rogpeppeniemeyer: i'm asserting that the operation does a sequence of operations, yes. i don't think anything will explode if it doesn't work - unless the operation does operations aynchronously after it's returned.14:25
niemeyerrogpeppe: I can't follow you.. "i'm asserting that the operation does" and "i don't think anything will explode if it doesn't work" are not compatible with each other14:26
* rogpeppe goes to look at the code again14:26
rogpeppeniemeyer: what do you mean by "explode"?14:27
niemeyerrogpeppe: The test will explode14:27
rogpeppeniemeyer: nothing will panic, if that's what you mean14:27
niemeyerrogpeppe: Fail14:27
rogpeppeniemeyer: that's what i want to happen14:27
niemeyerrogpeppe: No.. I mean the test will fail14:27
rogpeppeniemeyer: isn't that the correct behaviour?14:27
niemeyerrogpeppe: Yes, and this correct behavior doesn't need Reset in the middle.14:28
niemeyerrogpeppe: It will fail if you don't reset in between things too.14:28
rogpeppeniemeyer: what happens if the operation does no actions?14:28
niemeyerrogpeppe: Yes, what happens?14:28
niemeyerrogpeppe: Today?14:28
niemeyerrogpeppe: The same will happen14:28
rogpeppeniemeyer: i wait for something to arrive on the channel, but nothing arrives.14:28
niemeyerrogpeppe: Yep.. same will happen if you don't reset14:29
rogpeppeniemeyer: no, that's why i have Close.14:29
niemeyerSorry, I don't get it..14:29
niemeyerrogpeppe: Reset, A, B, Reset, C, D14:29
niemeyerrogpeppe: Why do you need the Reset in the middle?14:29
niemeyerrogpeppe: Reset the dummy environment, and use a single channel from end to end..14:30
rogpeppeniemeyer: we need a Reset at the end of the test as well as at the beginning.14:30
niemeyerrogpeppe: That's not the question asked14:30
rogpeppeniemeyer: otherwise what happens when we're expecting to read D but it wasn't sent14:30
rogpeppe?14:30
niemeyerrogpeppe: Why do you need the Reset in the middle14:30
rogpeppeniemeyer: we don't. we have one Reset at each side of the tested operation (or, in the new way, a Reset at the start and a Close at the end)14:31
niemeyerrogpeppe: Bingo.. we don't need a Reset in the middle, which means we don't need clear, or to change the interface of the dummy package.14:32
rogpeppeniemeyer: there is no Reset in the middle right now. there never has been.14:32
niemeyerrogpeppe: There is.. that's the only reason why you've introduced clear14:32
niemeyeror clean14:32
niemeyerrogpeppe: To reset the environment without actually resetting it14:32
niemeyerrogpeppe: If you only actually reset when the test starts or ends, the current interface suffices14:33
rogpeppeniemeyer: look at cmd_test.go:15014:33
rogpeppeniemeyer: what happens if the operation fails to send a bootstrap op?14:33
niemeyerChecking14:35
niemeyerrogpeppe: Ok, that sounds fine.. so there is a reason14:38
rogpeppeniemeyer: yes, i was trying to explain to you :-)14:38
rogpeppeniemeyer: sorry if my explanations were a bit shit14:39
* rogpeppe is wondering how he could make the comments clearer14:40
niemeyerrogpeppe: You have a Reset in the middle of the test.. and it wasn't clear why. Denying that the Reset existed was one of the difficulties for me to understand what was going on, at least.14:53
niemeyerrogpeppe: Either way, Listen+Close looks great14:54
rogpeppeniemeyer: yeah, i was unclear sorry. i was confusing "test" and "operation"...14:55
rogpeppeniemeyer: cool. i think it works ok.14:55
niemeyerLunch time.. back in a moment15:16
=== marrusl_ is now known as marrusl
fwereadeneed to be away for a while; I'll pop back on later tonight15:38
rogpeppefwereade: ok. see you tomorrow.15:40
* niemeyer waves15:58
niemeyerrobbiew: Do we have a call now?15:58
robbiewyes15:58
robbiewwell...in 1.5min...but yes15:58
rogpeppeniemeyer: i'm off a little earlier today. i'll see you tomorrow.15:59
niemeyerrogpeppe: Cool, cheers, I'll try clean things up by the EOD tomorrow (hopefully!)15:59
niemeyerErm, EOD today15:59
niemeyerrobbiew: Cool, welcome back15:59
rogpeppeniemeyer: that would be great. it feels a little cluttered at the moment. i'm trying to avoid criss-cross merges...15:59
niemeyerrogpeppe: Yeah, I've been making my way through it, but still a bit to go16:01
robbiewniemeyer: biobreak..then will send g+ link :)16:02
robbiewTMI16:02
niemeyerrobbiew: Ok, I'll send the invite.. just join when you're back16:03
niemeyerrobbiew: Sent16:04
robbiewniemeyer: on my way16:09
niemeyerI suspect this is the largest branch/review yet: https://codereview.appspot.com/6145043/18:27
niemeyerIt's an awesome step forward, and it's also a great counter example for branch size :)18:27
niemeyerandrewsmedina: ping19:19
niemeyerandrewsmedina: pingous19:42
niemeyerandrewsmedina: Well, there's a ton of comments form Rog.. I'll put the branch as Work In Progress. Once you re-propose, it will show up in the active reviews again19:43
niemeyerandrewsmedina: If there's anything I can do in between, just ping me please19:43
andrewsmedinaniemeyer: Im back20:50
andrewsmedinasomeone know why juju ssh use hostname instead ip?20:51
SpamapSniemeyer: any word on cs:precise/ubuntu ?22:17
niemeyerSpamapS: I've pinged Tom Haddon several times, without responses, and finally opened an rt ticket.. still waiting22:17
niemeyerSpamapS: devops ftw22:18
SpamapSniemeyer: RT is as agile as a bowling ball in a lake.22:22
=== asavu_ is now known as asavu
davecheneyniemeyer: https://codereview.appspot.com/620308322:52
davecheneyniemeyer: i can't figure out why all this other stuff has leaked into this branch22:52
davecheneyniemeyer: i figured it out, the -req this branch was based on was not up to date22:59
niemeyerdavecheney: Heya23:06
davecheneyniemeyer: hey23:06
niemeyerdavecheney: Ah, yeah, easiest is to push the previous branch23:06
niemeyerdavecheney: and then propose again.. should clean it up23:06
davecheneyniemeyer: is there a way to switch the -req (maybe by hacking the lbox data?)23:06
davecheneyniemeyer: yeah, that worked for me23:07
niemeyerdavecheney: No, it doesn't work, only if you push it again23:33
davecheneyniemeyer: fair enough23:36
davecheneyniemeyer: % jujud -v provisioning --zookeeper-servers 127.0.0.1:218123:38
davecheney2012/05/18 09:37:54 JUJU state: opening state; zookeeper addresses: ["127.0.0.1:2181"]23:38
davecheney2012/05/18 09:37:54 JUJU state: waiting for state to be initialized23:38
davecheney2012/05/18 09:37:54 JUJU invalid environment configuration: key "kind"  was not present in the supplied configuration23:38
davecheneygetting there23:38
niemeyerdavecheney: Hah, neat!23:38
davecheneyniemeyer: i look forward to the feedback from the team, but i'll keep working it this morning, and then move on to another pass at WatchMachines23:42

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