/srv/irclogs.ubuntu.com/2012/12/14/#juju-dev.txt

davecheneysoooo much better07:06
davecheneyhttp://paste.ubuntu.com/1433970/07:07
TheMueMorning07:57
fwereadeTheMue, heyhey07:58
TheMuefwereade: Can't see you, you are not here. ;)07:58
TheMuefwereade: Morning. :)07:58
TheMuefwereade: Thought you're on vacation today?07:58
fwereadeTheMue, kinda sorta -- I need to do a half day today to catch up with monday when I took an uncheduled one07:59
fwereadeTheMue, I haven't quite decied whether I'm "really" working this morning yet though08:00
fwereade;)08:00
TheMuefwereade: Hehe, here sometimes typical office jobs have more clear constraints.08:00
fwereadeTheMue, ok, just popping out, sent another comment on the FW08:17
TheMuefwereade: Just seen it, thanks. Enjoy your day.08:18
=== mthaddon` is now known as mthaddon
dimiternmgz: ping11:03
wallyworld_dimitern: can you hear me?11:03
dimiternwallyworld_: no11:03
TheMue*lol*11:09
mgzdimitern: hey11:09
dimiternmgz: mumble?11:10
mgzI'm on.11:11
Aramhello.11:32
TheMueAram: Hi11:34
niemeyerMornings!11:43
dimiternniemeyer: morning11:47
TheMueniemeyer: Hiya11:51
TheMueSo, lunchtime. BIAB12:04
fwereademorning everyone12:35
niemeyerTheMue: ping13:07
fwereadeniemeyer, in case TheMue's still at lunch, I was wondering a bit about EnsureSubordinate naming13:08
niemeyerfwereade: Heya13:08
niemeyerfwereade: Are you working or on holiday today?13:08
fwereadeniemeyer, catching up a half day I took off unscheduled on monday13:08
niemeyerfwereade: Just to see how much I can bother you ;_)13:08
fwereadeniemeyer, I am eminently botherable :)13:09
niemeyerROTFL13:09
niemeyerfwereade: Cool, let's see naming first then :)13:09
fwereadeniemeyer, EnsureSubordinate is, in my mind, a sensible contraction of EnsureHasSubordinateIfThatIsSensible13:09
niemeyerfwereade: Agreed, not trying to explain it all there13:10
fwereadeniemeyer, for some reason EnsureHasSubordinate feels, er, a bit different13:11
niemeyerfwereade: The clarity I was aming for is that foo.EnsureBarer generally ensures that foo is a barer13:11
niemeyerfwereade: It feels awkward to call out ru.EnsureSubordinate() when ru must necessarily not be a subordinate13:11
fwereadeniemeyer, yeah, that makes sense -- I was also pondering EnsureSubordinateState at one point, but that didn't seem quite clear either13:12
niemeyerfwereade: To be honest, I think ru.CreateSubordinate would be best13:13
niemeyerfwereade: Returning ErrSubordinateExists or ErrSubordinateInvalid13:13
fwereadeniemeyer, I was just about to suggest those :)13:13
niemeyerfwereade: Hah, jinx then :)13:14
TheMueniemeyer: Pong, just had to bring my daughter to her voluntary work.13:14
fwereadeniemeyer, that's great then -- grab me when you're done with TheMue then?13:14
niemeyerTheMue: Nice.. does she work voluntarily on the voluntary work? :-)13:14
niemeyerTheMue: I'll need some extra time to look over the logic on the branch actually13:15
fwereadeniemeyer, hah, when I was at school, there was an institution called "voluntary tea" on friday afternoons13:15
fwereadeniemeyer, no, it was not voluntary :/13:15
niemeyerTheMue: I'm just going over the firewaller change13:15
TheMueniemeyer: Hehe, yes, it's for bridging the time until her education as occupational therapist.13:15
niemeyerfwereade: Hehe, that's how it generally goes :-)13:16
TheMueniemeyer: Ah, fine, has been a lot of discussion by fwereade and me in there.13:16
* fwereade hopes he hasn't been leading TheMue up the garden path13:17
fwereadeniemeyer, a thought is squatting toadlike in my brain, and while I don't like it very much it will not leave peacefully13:31
fwereadeniemeyer, I don't think that CreateSubordinate actually deserves an independent existence -- it'd only ever be called just after EnterScope, and it depends on basically the same things... I can't think of a good reason not to roll CS into ES13:32
niemeyerfwereade: Sounds good as well.13:32
fwereadeniemeyer, ok, great, I'll have a go at that -- and that then means the errors collapse back down to ErrCannotEnterScope, I think13:34
fwereadeniemeyer, it will also demand a RelationUnit.Subordinate method, I think, but I don't need that quite yet (in fact I will only want it for testing)13:35
fwereadeniemeyer, anyway I will try it out and let you know how it goes13:35
fwereadeniemeyer, oh: crack check: I shouldn't bother to check related service life state because, if the relation is alive, both its services must also be alive13:36
niemeyerfwereade: Hmm.. good point13:38
fwereadeniemeyer, (and, yay, that is a statement of truth not just of intent)13:38
fwereadeniemeyer, cool, cheers13:38
fwereadeniemeyer, just in case, do you know if anyone knows what next spring's UDS dates will be?14:21
niemeyerfwereade: Not yet.. have you checked the UDS website?14:21
fwereadeniemeyer, all it seems to have is copenhagen14:22
niemeyerTheMue: Review sent14:23
TheMueniemeyer: Great, thanks.14:24
niemeyerTheMue: np, please let me know if it makes sense14:27
niemeyerHeading to lunch now14:28
TheMueniemeyer: Yes, first look is fine, just started to adopt it. For the approach we have to thank William and his steadiness. It has been a great help.14:29
TheMueniemeyer: Enjoy your luch.14:29
fwereadeTheMue, a pleasure, thanks for your patience, I'm not sure I was always very clear :)14:32
TheMuefwereade: It has been fine to tame this pretty nice beast, a good experience.14:34
mgzis there a neat way to run a single live test? I'm failing at finding the right go test spelling.14:43
Aram-gocheck.f <regexp>14:47
Aramwhere regexp matches the test function name.14:47
Arammgz: ^ ^14:48
mgzah, that was it, need to remember -gocheck not -test flags14:49
mgzthanks Aram14:49
Aramcheers.14:49
mgzokay, fixing this bug the way I would like will be annoying14:54
mgzideally I'd write a way in the goamz fake server thing that reproduced this behaviour, so running the problematic live test failed in the correct manner, then fix the live test itself14:55
mgzbut that's two different projects and custom behaviour for a specific test...14:56
TheMueSo, AFK again.15:12
fwereadeniemeyer, rolled subordinate creation into EnterScope in https://codereview.appspot.com/6906046/15:40
fwereadeniemeyer, (I also addressed your comments in https://codereview.appspot.com/6845120/ -- I would love it if you had a moment to take a look before you depart...)15:41
fwereadeTheMue, a second look at https://codereview.appspot.com/6906046/ would be appreciated: it's changed pretty significantly since you saw it last15:41
niemeyerfwereade: Yo15:46
niemeyerfwereade: Will look at both15:47
niemeyerNow15:47
niemeyerfwereade: "This'd be Unit.EnsureDead's job, but it doesn't do it."15:48
niemeyerfwereade: Should we adapt comments in the respective places so they reflect what we want to happen then?15:48
fwereadeniemeyer, yeah, that's a good idea15:48
fwereadeniemeyer, I thought of that just after I submitted :/15:49
niemeyerfwereade: Super15:49
niemeyerfwereade: "Nothing -- but it was a single-use method that I factored back into the single15:49
niemeyercaller... and then forgot to delete."15:49
niemeyerfwereade: So the method is now unused?15:49
fwereadeniemeyer, isn't it gone in that CL?15:49
fwereadeniemeyer, ah, yes, it is deleted now15:50
fwereadeniemeyer, yeah15:50
niemeyerfwereade: Cool, sounds good then15:51
niemeyerfwereade: I think there was some misunderstanding regarding the name15:52
niemeyerfwereade: I was suggesting isAliveDoc for the bson.D document15:52
fwereadeniemeyer, oh, sorry?15:52
fwereadeniemeyer, ha!15:52
fwereadesorry15:52
niemeyerfwereade: np15:52
niemeyerfwereade: and isDeadDoc, respectively15:54
fwereadeniemeyer, notDeadDoc I presume15:54
niemeyerfwereade: Ugh, yes15:54
fwereadeniemeyer, sgtm15:54
niemeyerfwereade: Nice to see how much simpler the logic is since we don't have to consider errors15:54
niemeyerfwereade: I mean, we don't have to figure what happened to return the proper error15:55
fwereadeniemeyer, isn't it-- although EnterScope is some where near the edge my comfortable-complexity limit15:55
niemeyerfwereade: Indeed, it's probably the most complex function we have in state ATM15:55
fwereadeniemeyer, at least I can't think of any others that'll be that bad15:56
niemeyerfwereade: Agreed. And the logic is also readable, I think15:57
niemeyerfwereade: Perhaps requiring some context, though15:57
fwereadeniemeyer, ah, I tried to do that :(15:57
niemeyerfwereade: Should LeaveScope kill the subordinate unit?15:58
fwereadeniemeyer, nope, don't think so -- it has an independent existence and agent and its own shutdown sequence15:58
fwereadeniemeyer, setting the prinicpal to dying should do the same to its subordinates, and then we should just sit back and wait15:59
niemeyerfwereade: Hmm..15:59
niemeyerfwereade: What kills the unit when the relation is departed then?15:59
fwereadeniemeyer, good point16:01
fwereadeniemeyer, I still don't think it's LeaveScope's job16:01
fwereadeniemeyer, I think if anything that a subordinate unit should also be watching for its relation's death16:02
fwereadeniemeyer, s/death/Dying/16:02
fwereadeniemeyer, just as all units do with their services16:02
niemeyerfwereade: Sounds sensible, but isn't LeaveScope precisely the final cue that the relation is gone?16:02
niemeyerfwereade: Perhaps the action should take in the subordinate, though, rather than the principal16:03
niemeyers/take/be taken/16:03
niemeyerfwereade: Perhaps not.. if the relation is removed earlier the subordinate will never enter it16:04
fwereadeniemeyer, yeah, I'm still thinking it through16:04
fwereadeniemeyer, in general LeaveScope happens pretty late though16:04
fwereadeniemeyer, I think I'd like the subordinate agents to start clearing themselves up at the right point independently of what the principal does16:05
niemeyerfwereade: Sure, but let's think about a worse case scenario16:05
niemeyerfwereade: It's entirely possible that by the time the subordinate unit runs, the relation doesn't even exist anymore16:05
niemeyers/worse/worst/16:05
niemeyerfwereade: Right?16:06
niemeyerfwereade: +1 on your last comment16:06
fwereadeniemeyer, yeah, you're right16:06
fwereadeniemeyer, this is a dependency I had not hitherto considered :/16:08
niemeyerfwereade: I think it's all good, though.. we just need specific logic in the subordinate unit agent that observes the right moment to suicide16:09
fwereadeniemeyer, yeah, indeed -- it's just that there's no very obvious way to be sure which relation the subordinate exists as a consequence of16:10
fwereadeniemeyer, I *think* the easiest way to handle that is to tag subordinate units with the relation ID they exist because of16:11
fwereadeniemeyer, but that has not been thought through with any rigour16:11
niemeyerfwereade: Every subordinate unit has a principal field16:11
niemeyerfwereade: Either there must be a relation with that unit, or its life is compromised16:12
niemeyerA container relation, specifically16:12
fwereadeniemeyer, true -- so we *can* figure out the two services involved, and thereby figure out the relation, maybe-probably, because I am suspicious of what happens if that relation is discarded and recreated16:12
fwereadeniemeyer, IMO an additional field meaning "this unit's life is also contingent on that of this relation" feels like a more certain way to do it16:13
niemeyerfwereade: That'd probably be a situation in which it'd be fine for the unit to stay around16:13
niemeyerfwereade: That'd open the potential for other races, though16:14
niemeyerfwereade: Such as having two subordinate units16:14
fwereadeniemeyer, *probably*, yeah, but it's the sort of chain of suppositions that I am suspicious of16:14
niemeyerfwereade: For the same service16:14
fwereadeniemeyer, I don't *think* that can happen16:14
fwereadeniemeyer, but I am not willing to swear that there will be no surprising consequences16:15
fwereadeniemeyer, I would prefer to keep the chains of logic as short as possible16:15
niemeyerfwereade: Sounds good, but I'm not sure of what you mean by that16:16
fwereadeniemeyer, principal -> principal's service -> figure out the relation16:17
fwereadeniemeyer, vs16:17
fwereadeniemeyer, relation16:17
fwereadeniemeyer, there are a lot more opportunities for bugs in the former16:17
fwereadeniemeyer, given two services we cannot necessarily uniquely determine the relation between them16:19
fwereadeniemeyer, but, ha, that's enough to sink my proposal16:19
fwereadeniemeyer, there's nothing stopping us having two distinct container relations between the same two services, is there?16:20
fwereadeniemeyer, not that that's a *nice* thing to do16:20
niemeyerfwereade: Nope16:20
niemeyerfwereade: I think it's a fine thing to do16:20
niemeyerfwereade: For the same reason that it's fine to have more than one relation between arbitrary services16:21
fwereadeniemeyer, indeed so16:21
fwereadeniemeyer, ok, maybe you're right16:21
niemeyerfwereade: Either way, I'm vaguely convinced that being able to ask whether two named units are part of a common relation must not be a hard question16:21
fwereadeniemeyer, if *any* Alive container relation exists between the subordinate's service and its principal, the subordinate should be Alive16:22
niemeyerfwereade: Given that a uniter already maintains tight control of remote participant units on any given relation16:22
niemeyerfwereade: That's right16:22
fwereadeniemeyer, I think that's a subtly different question16:22
niemeyerfwereade: Ah, you're right, yes16:23
niemeyerfwereade: It doesn't really matter whether the relation is established or not16:23
niemeyerfwereade: It matters if it exists16:23
fwereadeniemeyer, yeah, exactly16:23
fwereadeniemeyer, but, still, I think it's less hard than I feared two minutes ago16:24
niemeyerfwereade: Yeah, thinking in terms of a database query, it's "foo:.* bar:.*" || "bar:.* foo:.*" exist and is alive16:25
fwereadeniemeyer, (and, fwiw, this CL is very firmly focused on creation rather than removal -- subordinates we can't delete are suboptimal but (?) on par with python)16:25
niemeyerexists16:25
fwereadeniemeyer, yep, exactly16:25
niemeyerfwereade: I know.. it's approved already16:25
fwereadeniemeyer, ah, nice :)16:25
* fwereade can be slow at times16:25
niemeyerfwereade: I just raised the issue as a brainstorm for future steps16:25
fwereadeniemeyer, yeah, much appreciated16:25
fwereadeniemeyer, but we're agreed that it's not LeaveScope then? (the only bug I am aware of in LeaveScope is that it doesn't delete services when it needs to)16:27
niemeyerfwereade: Yeah, agreed16:31
fwereadeniemeyer, perfect16:32
niemeyerfwereade: next one is good to go too16:51
fwereadeniemeyer, sweet :D16:54
niemeyerTheMue: https://codereview.appspot.com/6875053/ reviewed too16:57
fwereadeniemeyer, would you expand a little on "deploying agent" vs "deploying unit" -- my heart still favours the first17:05
fwereadeniemeyer, (I'm fine changing it, I'm just not sure why :))17:05
niemeyerfwereade: DeployUnit does significantly more than deploying an agent17:05
niemeyerfwereade: An agent is jujud process running17:05
niemeyerfwereade: DeployUnit can do whatever it pleases to put the agent to run17:05
fwereadeniemeyer, bingo, thanks17:06
niemeyerfwereade: Including creating a container, downloading an image, running a container, etc17:06
TheMueniemeyer: Thx for review.17:09
fwereadeniemeyer, ok, well, now that deployer's in, the how-to-merge-question comes up: I'm still not convincer that a MachinerWorker is a good reason to start a Deployer worker17:19
fwereadeniemeyer, it feels a bit off to me17:19
niemeyerfwereade: So let's do the change we discussed the other day and have flags there instead17:19
fwereadeniemeyer, task-per-flag? <317:19
fwereadeniemeyer, upgrader I presume remains implicit?17:20
niemeyerfwereade: Not task per flag.. flag per flag :).. the idea is precisely to avoid the 1-to-1 relationship between code and run mode17:20
niemeyerfwereade: Flags can possibly change the way that code run, instead of adding a new task17:21
fwereadeniemeyer, ah, ok, I wasn't really quite expecting you to have changed your mind there17:22
niemeyerfwereade: We had already gotten to that point in our last conversation IIRC17:22
fwereadeniemeyer, but the idea has not quite clicked with me, I'm afraid, and I'm a little nervous that I will do something completely unlike what you expect17:22
fwereadeniemeyer, yeah, but I did some independent thinking last weekend and accidentally dragged my comprehension of the problem back towards my initial viewpoint17:23
niemeyerfwereade: Okay, so how does it stand now?17:23
fwereadeniemeyer, basically I've confused myself -- I ran with an Agent idea for a bit and I think it's nice but I can't really justify it yet :(17:25
fwereadeniemeyer, or, at least, I don't have the time or emotional fortitude necessary to convince you before you go on holiday even if I am right ;p17:26
niemeyerfwereade: Hehe :)17:26
fwereadeniemeyer, and I am reluctant to sneak it past you while you're away17:26
fwereadeniemeyer, because I doubt you would appreciatethat too much ;)_17:26
niemeyerfwereade: So let's try to reach some quick agreement.. feel free to sneak it in as we go17:26
fwereadeniemeyer, haha17:27
niemeyerfwereade: What we have now is a document in the database representing the machine17:27
niemeyerfwereade: That document has a field with a few names that we map 1-to-1 to what we call workers, which are really packages under the worker directory which tend to do relevant and mostly independent tasks within an agent17:27
niemeyerfwereade: agent being the name we give to a jujud process that we run to control stuff up in situations where one or more workers are necessary17:28
niemeyerfwereade: So far so good?17:28
fwereadeniemeyer, yep17:28
niemeyerfwereade: Cool.. so the discomfort we're sitting in happens because we rightfully renamed one of our workers to adapt the code17:29
fwereadeniemeyer, indeed17:30
niemeyerfwereade: and the fact we have fields which are tied to code name rather than the intended semantics for the running logic means we're forced to swallow a mismatch, or fix it, or change the way we refer to that kind of semantics so that we avoid future mismatches17:30
niemeyerfwereade: I'm suggesting the latter17:30
niemeyerfwereade: and part of my motivation is that I think the 1-to-1 mapping between package name and semantics is too artificial to survive over time17:30
fwereadeniemeyer, ok -- I guess my own discomfort here is that I'm not clear on what the intended semantics are17:31
niemeyerfwereade: Understood. That's easy to solve, I think.17:31
fwereadeniemeyer, you have stated the problem helpfully though17:31
* fwereade is all ears17:31
niemeyerfwereade: We have three different flags today:17:31
niemeyerfwereade: Flag 1) "I want this agent to manage the firewall for the environment"17:32
niemeyerfwereade: Flag 2) "I want this agent to manage the provisioning of machines for the environment"17:32
niemeyerfwereade: Flag 2) "I want this agent to manage the hosting of units for that machine"17:32
niemeyers/2/3/ on the last, of course17:32
fwereadeniemeyer, right, yes, agreed17:33
* niemeyer holds off a bit17:33
niemeyerfwereade: Welcome back17:34
niemeyerfwereade: So17:35
fwereadegrar, sorry17:35
niemeyerLOL17:35
fwereadesorry, that time the actual client crashed :/17:35
niemeyerfwereade: No worries17:36
niemeyerfwereade: So!17:36
niemeyer:)17:36
niemeyerfwereade: We have these three stated semantics17:36
* fwereade sits very still17:36
niemeyerfwereade: My proposal was to find a way to name the intended semantics without actually referring to worker, or task17:36
niemeyerfwereade: But rather as a property of the machine itself17:37
niemeyerfwereade: and at the agent side, we map these flags to workers, tasks, or whatever we please17:37
fwereadeniemeyer, ok, that SGTM -- and that reduces the current problem to a naming question really, just a different one to that I had previously imagined17:38
niemeyerfwereade: Cool.. so how do we name those flags? Hmmm17:40
* fwereade is still a touch baffled by this question17:41
niemeyerfwereade: Hm?17:41
niemeyerfwereade: I'm baffled by your baffledness :-D17:42
fwereadeniemeyer, I don't know what we should name them17:42
fwereadeniemeyer, well, Firewaller and Provisioner are a bit too close to the worker names for comfort -- the implication is that flags *do* map onto workers17:43
fwereadeniemeyer, and I really don't like "machiner"17:43
niemeyerfwereade: Strawman: HostProvisioner, HostFirewaller, HostUnits17:44
fwereadeniemeyer, ok, I think I can work with those :)17:45
niemeyerfwereade: Although HostFirewaller is still not great17:45
niemeyerfwereade: Because we'll likely have local firewall management soonish17:45
fwereadeniemeyer, I think the big issue there is ... exactly17:45
fwereadeniemeyer, I'm almost tempted to roll firewalling into provisioning again17:46
niemeyerfwereade: ManageEnvironFirewall, ManageEnvironProvisioning, HostUnits17:46
fwereadeniemeyer, ie if HostProvisioner, we run both P and FW workers17:46
niemeyerfwereade: Hmm17:47
niemeyerfwereade: Interesting17:47
fwereadeniemeyer, or HostEnvironStuff ;p17:47
fwereadeniemeyer, (bad name, just saying I'm not attached ot the specific chars that make it up)17:47
niemeyerfwereade: Sounds like a good idea.. there's no great reason to separate those17:48
fwereadeniemeyer, ok, fantastic -- that feels like enough to be going on with17:49
fwereadeniemeyer, I am being encouraged to be a monster, and I think I should be off17:50
fwereadeniemeyer, have a very happy christmas with much joy and adequate sleep -- see you in the new year, I expect :)17:50
niemeyerfwereade: UnitsMachine and ControlMachine?17:50
fwereadeniemeyer, ...ambivalent, I will take those under consideration :)17:51
niemeyerfwereade: With int flags, so we can tweak names over time as we see fit17:51
niemeyerfwereade: Thanks a lot man :-)17:51
fwereadeniemeyer, ok, sounds sensible17:51
niemeyerfwereade: Have a great break as wel17:51
niemeyerl17:51
fwereadeniemeyer, always a pleasure, take care :)17:51
niemeyerfwereade: Tell Laura there's a little friend coming17:52
niemeyerfwereade: ;_)17:52
fwereadeniemeyer, will do :)17:52
niemeyerfwereade: I'll just have to make an effort for them to be able to communicate :_017:52
niemeyer:-)17:52
=== TheMue_ is now known as TheMue

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