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

davecheneywallyworld: is there a page on the wiki describing the days the company is closed this year ?00:52
wallyworlddavecheney: not sure, i know there was something about the 28th. let me see if i have anything in my email00:53
wallyworlddavecheney: this is all i know - it says company closed between xmas and new year https://wiki.canonical.com/PeopleAndCulture/Policies/Leave00:55
davecheneyi love how out of date this information is00:55
wallyworldbut there's a separate page somewhere with reference to the 28th being a free day00:55
davecheneyit makes it really useful00:55
wallyworldyeah00:55
davecheneythere is an up to date pdf on the page00:56
davecheneythanks00:56
wallyworlddavecheney: i think that pdf is the one with the free day etc00:58
TheMueMorning06:48
=== TheMue_ is now known as TheMue
fwereadeTheMue, rogpeppe: heyhey07:19
TheMuefwereade: Hi07:19
TheMuefwereade: The improved firewaller is in at https://codereview.appspot.com/6875053/07:21
fwereadeTheMue, cool, looking07:21
TheMuefwereade: Cheers07:21
fwereadeTheMue, what happens when a machine has a unit removed after initGlobalPorts and createMachineData?07:42
fwereades/and/and before/07:42
TheMuefwereade: This is catched by the error check for an unassigned machine.07:43
fwereadeTheMue, and what happens in response?07:44
fwereadeTheMue, I don't get how you can distinguish between "this unit is not assigned to the machine I'm looking at: keep it around until we find the machine that does"07:45
TheMuefwereade: Today the unit is skipped, but you're right, it should be dropped from those temporary stored units.07:45
fwereadeTheMue, but then the first machine you process will trash all the others, won't it?07:46
TheMuefwereade: Why?07:46
fwereadeTheMue, because it will go through all the valid data saying "nope, not mine, trash it" -- won't it?07:47
TheMuefwereade: Each machine data, when created, is scanning the remaining units from the initial scan and checks, if that unit is assigned to the machine the data is representing.07:47
TheMuefwereade: No, I only should trash those without any assigned machine id. Today I just skip it.07:47
fwereadeTheMue, yes07:47
fwereadeTheMue, and you *have* to07:48
TheMuefwereade: Line 228.07:48
fwereadeTheMue, because that unit might be assigned to another machine07:48
TheMuefwereade: So far it's by accident as good as it is. ;)07:48
fwereadeTheMue, ok, what I'm afraid I'm saying is that you have I think rearranged the problems but not fixed them07:49
TheMuefwereade: I had this when during testing units have been created while init runs in background and those units are not yet assigned.07:49
fwereadeTheMue, the fundamental problem is that you cannot effectively take a delta between the initial-scan state and the state at the point where you've started all the watches you need07:50
TheMuefwereade: machineData and unitData are proper initialized before returning to the loop. I had masses of runs with debugging statements. They shown that, depending on who is faster, init, adding or mixed, the state afterwards is always correct.07:51
TheMuefwereade: Yes, you never can, because scanning it initially takes time, especially when state is large, and during this time state can be changed.07:52
TheMuefwereade: So this CL fetches its initial state as good as it can and at the time machineData and unitData are created it looks if those initial units match to them.07:54
fwereadeTheMue, so how are you in a position to assume that the initial-changes state that you build up corresponds to the globalUnitPorts state you built up before?07:54
fwereadeTheMue, ISTM that a removed unit will stay in globalUnitPorts forever07:55
TheMuefwereade: Yes, that's the only problem I still have. I have no kind of safe signal that says "Now you can clean it up, guy."07:56
fwereadeTheMue, yeah07:56
fwereadeTheMue, and this is an inescapable consequence of the decision to separate the initial scan from the creation of the watchers, isn't it?07:57
TheMuefwereade: One way could be a kind of timer checking those entries from time to time if they are removed.07:57
fwereadeTheMue, it's just another layer of paper over the problem07:57
TheMuefwereade: Sure.07:57
TheMuefwereade: We need the initial scan to look if the current open ports are those we need when the Firewaller starts.07:58
TheMuefwereade: And the initial scan needs time.07:58
TheMuefwereade: And during this time the state can (and will) change.07:59
fwereadeTheMue, understood -- but why don't you also create the *Datas at that point?07:59
fwereadeTheMue, they hold the watchers which have properties that allow us to avoid this problem07:59
TheMuefwereade: Thought about it, niemeyer disliked it.07:59
TheMuefwereade: But here it's the same problem.07:59
TheMuefwereade: Starting those watchers still produces a gap while scanning.08:00
fwereadeTheMue, the initial events from those watchers *give* you the initial state, don't they?08:04
TheMuefwereade: At least if I start the right ones which may possibly not happen because the state changes while I'm scanning to know which watchers I have to start.08:05
fwereadeTheMue, er, don't you just need to start the machines watch and handle the initial event?08:06
TheMuefwereade: That's what the firewaller has done in his first "release", just that.08:07
TheMuefwereade: :/08:07
fwereadeTheMue, I've never seen the FW setting up initial UD state by consuming the first event from the unit watcher before starting the watchLoop08:08
fwereadeTheMue, did it really do that>08:08
fwereadeTheMue, AFAICS the only way to do this reliably is to follow that model08:09
rogpeppefwereade, TheMue: morning!08:09
TheMuefwereade: Please rephrase the UD sentence.08:09
TheMuerogpeppe: Morning.08:09
fwereadeTheMue, if everything in the data tree makes sure it's initialized via initial event before starting its watch loop08:09
fwereadeTheMue, then all you need to do the global port open/close (just once) at the end of the first machinesw.Changes event08:10
fwereades/need to/need is to/08:10
fwereadeno that s/ is crack08:11
fwereadewhoops, no, it's what I meant08:11
fwereadeTheMue, er, am I making any sense?08:11
TheMuefwereade: I have to think about it more.08:13
TheMuefwereade: It would avoid possibly remaining removed units in that one map, yes.08:13
TheMuefwereade: But it would totally change the way of initialization and have to check how this effects the instance mode, because we here talk about the global mode.08:14
TheMuefwereade: *sigh*08:14
fwereadeTheMue, yeah, I'm sorry :(08:19
TheMuefwereade: Fridays discussion ended with this proposal, but seems it falls too short.08:19
fwereadeTheMue, I was always trying to communicate that separating watcher setup from initial scanning was intrinsically broken -- sory I haven't been very effective at that08:22
TheMuefwereade: Funnily it works really fine, it only has the I-dont-know-if-those-left-units-are-removed-during-startup-in-global-mode-problem.08:22
fwereadeTheMue, which is exactly the bug we're concerned about08:22
fwereadeTheMue, fwiw, you've also introduced a goroutine-unsafety bug in unitData.watchLoop08:23
fwereadeTheMue, ud.ports is used on the main goroutine08:23
TheMuefwereade: Could you point me to the line?08:24
fwereadeTheMue, old: line 542 removed; new: lines 612, 615 changed08:24
TheMuefwereade: IMHO the goroutine is started after initialization (btw opposit to the former solution).08:25
fwereadeTheMue, sorry, rephrase please?08:25
TheMuefwereade: Seems to be independent, sorry. I have a deeper look. Thought you meant something different.08:26
dimiternjam, wallyworld, rogpeppe: PTAL https://codereview.appspot.com/6877054/08:27
TheMuefwereade: But I see the problem, yes. I stumbled about the same naming ports as field (where it's just used by the Firewaller itself) and the local variable. Shit, has been intended, but not lucilly.08:28
TheMueluckilly08:28
TheMueHehe, this word doesn't exist.08:28
TheMueJust lucky.08:28
fwereadeTheMue, sorry, I'm still a bit confused :)08:28
TheMuefwereade: In the old version the unitData has a field named ports and in watchLoop() a variable named ports. I thought that this has been a mistake, but that has been intended.08:30
TheMuefwereade: So my "correction" has been wrong.08:30
fwereadeTheMue, yeah, it's definitely required, but it demands close reading -- probably worth a comment for future reference08:30
TheMuefwereade: Yes.08:30
fwereadeTheMue, otherwise people will definitely try the same "correction" in future :)08:30
TheMuefwereade: Maybe also a better naming. Dunno, will think about it. First I'll mark it again as WIP.08:31
fwereadeTheMue, cool, thanks08:32
TheMuefwereade: Done08:32
TheMuefwereade: So the problem now is, that following your/our approach is a larger change.08:33
TheMuefwereade: And starting the datas based on the initial event is independent of instance or global mode.08:34
TheMuefwereade: The later ony is interesting to mark ports as opened and to manage the ref count.08:34
TheMuefwereade: Which can be handled during this startup phase.08:35
TheMuefwereade: So, before entereing the firewaller loop, init is called waiting for the first machine watcher event.08:36
TheMuefwereade: It starts the machines, but then? Hmm, how do I know that all unit watchers and service watchers are set up based on it?08:37
TheMuefwereade: All machines have to notify the init via a channel when they are done and the same with units and services, bottom up.08:38
TheMuefwereade: Does that makes sense?08:38
fwereadeTheMue, sorry, I'm still processing08:39
* TheMue thinks of a concurrently initializing tree which at least has to signal the firewallers init that it's done so that it can continue and enter the loop.08:40
fwereadeTheMue, the trouble is partly that I haven't ever analysed the non-global mode08:40
TheMuefwereade: Hehe08:41
fwereadeTheMue, but I *think* that the "initial scan" can be perfectly synchronous if the MD creation goes something like...08:42
fwereadew := m.WatchUnits()08:42
fwereadeunits := <-w.Changes()08:42
fwereadefor _, u := range units {08:42
fwereade    // create unit data similarly08:42
fwereade}08:42
fwereadego md.loop(w)08:42
fwereadeTheMue, (very poorly sketched ofc)08:43
TheMuefwereade: When are the ud loops started?08:44
fwereadeTheMue, exactly the same model as the MD ones08:44
TheMuefwereade: Then it's very similar to my thought, only expressed in code. ;)08:45
fwereadeTheMue, so, after you've created all your MDs (synchronously) in the first event08:45
fwereadeTheMue, sorry -- it's the thought I've been trying to communicate for a week or 2 ;p08:46
TheMuefwereade: *rofl*08:46
TheMuefwereade: To come back to the mode question.08:46
TheMuefwereade: IMHO independent of the mode the startup of the watcher is always the same. What differs is, how the firewaller itself (the type Firewaller) handles those informations based on the mode.08:47
TheMuefwereade: And here instance and global mode have to be handled differently, yes.08:48
fwereadeTheMue, yes, indeed -- in global mode you can do a flush-everything at the end of the first machine event, and in instance mode just flush each machine as it's handled08:48
TheMuefwereade: +108:49
fwereadeTheMue, I *think* this also means you can drop everything global* except globalPortRef08:49
TheMuefwereade: A ref != 0 means true, yes08:50
fwereadeTheMue, you just need to be a little bit careful about updating it for initial events in create methods *only* before the first init run has completed08:50
fwereadeTheMue, and subsequently doing so only as a consequence of flushes08:50
fwereadeTheMue, ...or maybe I'm overcomplicating it08:51
TheMuefwereade: Could you please explain your thoughts more.08:51
fwereadeTheMue, I think that I misspoke -- you never need to touch the refcounts while you're doing the "initial scan", they can be handled purely on the main goroutine as they currently are08:53
TheMuefwereade: Am I right you're thinking of a kind of "init" argument set to true during startup and later being false and internally work as described above only when it's true?08:54
fwereadeTheMue, I *was*, but I don't think it's needed by anything except the main FW loop, so it can just be a var therein08:54
fwereadeTheMue, sorry, bbiab08:55
TheMuefwereade: Hmm, I need the refcounts at the end of the startup to compare the needed ports to the currently open ports.08:55
fwereadeTheMue, you can build the refcounts during the initial global flush, can't you?08:55
TheMuefwereade: Pardon?08:56
fwereadeTheMue, sorry, back09:02
TheMuefwereade: NP09:02
fwereadeTheMue, when you first do the initial global mode flush, won't you have a complete set of MDs and UDs available?09:03
fwereadeTheMue, so you can just build the refcounts from that data09:03
fwereadeTheMue, I think?09:04
TheMuefwereade: So you think of an explicit flush at the end of the init? Otherwise I have somewhere to remember that it's the first time.09:05
fwereadeTheMue, yeah, exactly -- I'm saying that I think the only place you need that information is within the main FW loop09:05
fwereadeTheMue, I could well be wrong though -- I'm hardly conversant with all the details of the FW09:07
TheMuefwereade: In the loop? Opposit to a firewaller field?09:07
fwereadeTheMue, yeah -- I can't see when else you'd need it -- but you know the FW better than I do09:07
TheMuefwereade: We're still talking about the ref count? Just to make sure.09:08
fwereadeTheMue, maybe "initial global mode flush" is the wrong term?09:08
fwereadeTheMue, yeah, we're talking about the refcounts09:08
fwereadeTheMue, they can be build up in initGlobalMode09:08
TheMuefwereade: I need access to it in the method flushGlobalPorts().09:09
fwereadeTheMue, but *that* only needs to be called, once, at the end of the first machines change09:09
fwereadeTheMue, doesn't initGlobalMode call flushGlobalPorts? I may be confused09:09
TheMuefwereade: Not today, but I would do it at the end of the init after the change we talked about and when global mode is active.09:10
fwereadeTheMue, ah, no, I'm on crack, sorry09:10
fwereadeTheMue, so "flush" was the wrong term09:10
TheMuefwereade: But it's also needed later, it is the alternative to flushInstancePorts()09:10
TheMuefwereade: You smoke too much. *lol* And maybe the wrong stuff.09:10
TheMuefwereade: *scnr*09:11
fwereadeTheMue, what I'm trying to say is that if you call initGlobalMode after handling the first machines change09:11
fwereadeTheMue, you can use all the MD/UDs that have been built up -- and never have to hit state at all09:11
fwereadeTheMue, it's a simple loop through all the units to count up the port refs09:11
fwereadeTheMue, and then do the usual open/close as you currently do at the end of initGlobalMode09:12
TheMuefwereade: Yes, that's right, here I would update the refcounts based on the datas, compare it to the open ports and handle the needed opens and closes.09:12
fwereadeTheMue, ...and then you're done, because you *know* that any changes from that state are already being watched for09:12
fwereadeTheMue, and will be handled sanely once you hit the main loop select again09:13
TheMuefwereade: Bingo!09:13
fwereadeTheMue, the only wrinkle about which I am still uncertain is service exposure09:14
TheMuefwereade: If that changes during init?09:15
fwereadeTheMue, just in general -- I know there's code to handle it but I've never needed to tease out the details09:15
fwereadeTheMue, but, yes, the same general strategy needs to be used, I think09:15
TheMuefwereade: We're watching the expose flag to see if a service is exposed. That's covered today in init (what will change) and during runtime (by the watches).09:16
fwereadeTheMue, yeah -- my point is that you need to unify init and watcher setup in the same way we discussed for MD/UD09:18
TheMuefwereade: Yep, the whole chain MD/UD/SD.09:19
fwereadeTheMue, I think it's pretty easy so long as you're careful to make sure all your *Data creation is done on the main goroutine09:20
fwereadeTheMue, including for subsequent events09:20
TheMuefwereade: Yes, sounds reasonable.09:21
fwereadeTheMue, cool :)09:21
TheMuefwereade: So I think I'll exactly do this now.09:22
fwereadeTheMue, great09:22
fwereadeTheMue, tyvm for your time on this, I'm sorry it's such a hassle09:22
TheMuefwereade: No, it's absolutely great to do this kind of design review.09:23
TheMuefwereade: I have to thank you.09:23
fwereadeTheMue, always a pleasure :)09:25
fwereadebtw TheMue, or rogpeppe, I need another review on https://codereview.appspot.com/6864050/ if either of you has a moment09:41
rogpeppefwereade: looking09:43
rogpeppefwereade: you've got a review10:06
rogpeppefwereade: BTW i don't *think* it's possible for the transaction mechanism to determine which op failed.10:07
rogpeppefwereade: because the asserts are executed in a distributed way10:07
fwereaderogpeppe, I'm still not sure it's a good idea -- but it should at least be able to figure out the doc, right?10:07
rogpeppefwereade: i'm not sure10:07
rogpeppefwereade: because it can't do the check and write the doc in the same moment10:08
rogpeppefwereade: if someone else happens to execute the transaction, how do we get that information back to the entity that started that transaction?10:09
fwereaderogpeppe, you could be right10:12
fwereaderogpeppe, I suspect it would still be possible, but almost certainly not worth the effort :)10:12
rogpeppefwereade: i'm not sure actually. seeing when a transaction fails and writing some information about it is non-atomic, and it needs to be atomic to work.10:13
fwereaderogpeppe, maybe so, I certainly don't claim to understand all the nuances of txn's implementation10:16
rogpeppefwereade: neither me :-)10:17
fwereaderogpeppe, TheMue: I have a couple of responses to the reviews, would appreciate your thoughts10:31
fwereaderogpeppe, (I'm not disagreeing that a comment is called for, btw, I'm explaining the logic in case I'm on crack)10:31
TheMuefwereade: Already writing.10:31
fwereademorning Aram10:33
Aramyo10:33
rogpeppefwereade: replied10:40
rogpeppeAram: hiya10:41
Aramhey there10:41
fwereaderogpeppe, TheMue, cheers guys10:41
TheMuefwereade: YW10:41
TheMueAram: Hiay10:41
TheMueHiya10:41
Aramhello.10:41
TheMueGrmpf, fingers too fast.10:42
fwereadeoh, bugger, doc appointment, bb after lunch10:44
wallyworlddimitern: hi, i just commented on your mp11:33
dimiternwallyworld: hey, 10x11:33
wallyworldsorry about the delay, i was eating dinner and having a few tasty drinks :-(11:33
wallyworld:-) i mean11:33
dimiternwallyworld: no worries :)11:34
dimiternwallyworld: the FlavorDetail used internally is enough to return lists of either Entity or FlavorDetail with the HTTP API11:34
wallyworlddimitern: ok, so long as the current goose nova client can unmarshall the data as returned by the double, then i;m happy :-)11:36
dimiternwallyworld: certainly11:36
wallyworlddimitern: i'll plug in the live/local tests once this lands and we can see how it all pans out11:37
dimiternwallyworld: yep, can't wait already11:38
dimiternrogpeppe: when you can, could you look at my CL please?11:39
rogpeppewallyworld: i've just sent another review of your errors CL11:39
wallyworlddimitern: yeah, when you have worked on a branch for a little while, you just want it to land!11:39
rogpeppewallyworld: perhaps we could have a chat about it some time11:39
rogpeppedimitern: which one?11:39
wallyworldrogpeppe: ok, let me take a look11:40
dimiternrogpeppe: https://codereview.appspot.com/6877054/11:40
rogpeppedimitern: looking11:40
wallyworldrogpeppe: happy to chat when you have a moment, after you finish reviewing. just ping me11:43
rogpeppedimitern: sorry, "d" is shorthand for "delete this line" (ed(1) syntax :-])11:46
dimiternrogpeppe: I see :)11:47
niemeyerHello all11:47
rogpeppeniemeyer: mornin'11:47
dimiternniemeyer: hiya11:47
rogpeppedimitern: you've got another review12:15
rogpeppewallyworld: ping12:15
dimiternrogpeppe: thanks!12:16
wallyworldrogpeppe: mumble?12:16
rogpeppewallyworld: what *is* mumble??12:16
wallyworldoh, maybe google hangout?12:16
wallyworldrogpeppe: mumble is a chat program, like skype12:16
rogpeppewallyworld: i'd be happy to use mumble if i knew what it was :-)12:16
wallyworldexcept free, open source etc12:16
rogpeppewallyworld: ah12:16
rogpeppewallyworld: i'll give it a go. presumably i can apt-get it?12:17
wallyworldyeah, believe so. but you need a passwrd etc for the server - it's on y=the wiki12:17
wallyworldi'll see if i can dig up a link12:17
wallyworldrogpeppe: https://wiki.canonical.com/StayingInTouch/Voice/Mumble12:18
rogpeppewallyworld: ok, i'm on mumble12:27
rogpeppewallyworld: which space do you use?12:28
wallyworldrogpeppe: goto cloud engineering kitchen?12:28
dimiternrogpeppe: settings links to []nova.Link{} prevents AddFlavor/Server from generating them (it does that when links == nil). Not setting them will cause DeepEquals  to fail and will force the unnecessary IMHO creating the full list of links every time I need to compare what's in the state vs. what I set there.12:33
dimiterns/settings/setting12:34
* niemeyer => reboot12:50
niemeyerfwereade: ping13:12
fwereadeniemeyer, pon13:12
fwereadeer, pong13:12
niemeyerfwereade: Heya :)13:12
niemeyerfwereade: pon is great, though13:12
fwereadeniemeyer, how's it going?13:12
niemeyerfwereade: We should totally switch over13:12
niemeyerpin.. pon13:13
fwereadeniemeyer, yeah, think how much typing we'd save :)13:13
fwereadeniemeyer, thanks for your reviews last night, very helpful13:13
niemeyerfwereade: No worries.. that's actually what I'm pinging about.. is there anything you'd like to chat on to unblock?13:14
fwereadeniemeyer, I think I'm good, thanks13:15
fwereadeniemeyer, I'm still marshalling my thoughts re testing methods13:16
niemeyerfwereade: Coolio13:17
fwereadeniemeyer, I guess the differing perspective may be that I see the testing methods as implying "do all required busywork to get to the point where I can call, say, RemoveService"13:17
fwereadeniemeyer, but the current uses are not very compelling13:18
fwereadeniemeyer, I'm fine dropping AddAnonymousService, but I reserve the right to get it out and wave it around if and when I spot a situation that deserves it, even if it probably never deserves to go on a shared test case13:19
fwereades/case/suite/13:19
fwereade;)13:20
niemeyerfwereade: Hehe :)13:22
niemeyerfwereade: Sounds good :)13:22
TheMuelunchtime, biab13:38
niemeyerrogpeppe: Regarding this comment:14:00
niemeyer"""14:00
niemeyerone possibility would be to allow forcing the version number only, and have14:00
niemeyerversion.Current always report the current series.14:00
niemeyer"""14:00
niemeyerrogpeppe: I don't get the idea14:00
niemeyerrogpeppe: version.Current.Series already does report the current series14:00
rogpeppeon a call, back in mo14:01
niemeyerrogpeppe: Suppa14:02
rogpeppeniemeyer: version.Current.Series doesn't report the current series if the version is forced, i think14:06
rogpeppeniemeyer: i may be wrong, let me check14:07
rogpeppeniemeyer: no, that's right14:07
niemeyerrogpeppe: Ah, I see what you meant14:07
niemeyerrogpeppe: Hacking the hack sounds a bit hackish :-)14:08
rogpeppeniemeyer: actually we'd be making the hack slightly smaller14:08
rogpeppeniemeyer: by making it change the version number only14:08
niemeyerrogpeppe: I guess so14:09
niemeyerrogpeppe: I'll have a look at this14:09
fwereadebrb cleaner cleaning14:12
niemeyerrogpeppe: Actually, on a second thought, I don't understand why that matters for that particular CL14:18
rogpeppeniemeyer: aren't you trying to verify that an instance with the given series is actually started?14:18
niemeyerYes, and where's current series picked from?14:19
niemeyerAh, from the system14:19
niemeyerThat's slightly unexpected (by me)14:19
rogpeppeniemeyer: where else could it come from?14:20
niemeyerIt basically means what we get out of the agent tools is reporting the machine, not the actual running tools14:20
niemeyerNot sure which way is more useful, though14:21
rogpeppeniemeyer: they're both potentially useful14:22
niemeyerYeah14:22
rogpeppeniemeyer: but it's hard to bake the current series into the compiled executable14:22
niemeyerrogpeppe: Well.. I'm coding a change right now to *avoid* doing it, so it shouldn't be so hard.. 8)14:22
niemeyerrogpeppe: Either way, we'd be guessing in both directions.. so we don't have to make any changes to that right now14:23
niemeyerI'll just do that one side-change as an independent CL and see how it looks14:23
niemeyerAfter lunch, though14:24
niemeyerbiab14:24
fwereadedimitern, wallyworld, jam: is http://paste.ubuntu.com/1416964/ expected? I just updated goose...14:59
dimiternfwereade: well, that seems you're missing some openstack env vars15:00
fwereadedimitern, surely the tests should pass on a clean system?15:01
dimiternfwereade: if you don't pass -live to the tests it should not matter15:01
fwereadedimitern, I'm pretty certain my env vars should not be able to cause tests to either fail or succeed :)15:01
fwereadedimitern, I didn't, though15:01
fwereadedimitern, I concede the point re -live though :)15:02
dimiternfwereade: hmm.. well, I don't know if wallyworld is around - that are his last changes15:02
fwereadedimitern, bah, I never know whether to dive in and fix myself, or revert, or flag and move on15:03
dimiternfwereade: as a workaround until fixed, you'll need to set these to non-empty strings: OS_USERNAME, OS_PASSWORD, OS_TENANT_NAME, OS_REGION_NAME15:04
dimiternfwereade: if tests are failing I think revert is the best bet15:05
fwereadedimitern, yeah, probably sensible :)15:06
fwereaderogpeppe, TheMue: https://codereview.appspot.com/6864050 comments addressed I think15:06
fwereade(fwiw, does anyone know best practice for reversing a merge into trunk? absent better ideas I'm just going to copy the old version over the top and ask for a trivial LGTM on trust)15:08
fwereadebah, it's not the latest15:09
rogpeppefwereade: last time i did it, i used patch with a revert diff15:09
rogpeppereverse diff15:09
rogpeppefwereade: LGTM  BTW15:10
fwereaderogpeppe, yeah, I'm *sure* bzr would do it for me if I knew what I were doing :)15:10
TheMuefwereade: Review is in.15:13
rogpeppeniemeyer: next stage in bottom-up API implementation: https://codereview.appspot.com/691304315:27
niemeyerrogpeppe: Cheers15:28
niemeyerdimitern: Can you give a hand there and propose a fix to avoid the issue for the moment?15:39
dimiternniemeyer: what fix?15:40
niemeyerdimitern: One that unbreaks tests15:40
dimiternniemeyer: ok, I'll take a look15:40
niemeyerdimitern: Thanks a lot15:40
fwereadeniemeyer, dimitern: I just proposed a branch with that commit straight-up reverted -- https://codereview.appspot.com/690704915:40
fwereadeniemeyer, dimitern: I'll go ahead and reject it if a fix is incoming15:41
niemeyerfwereade: I'm assuming that a trivial temporary fix for this would be under 10 lines of code.. if it seems any controversial, +1 on reverting15:41
dimiternfwereade: I have no idea what the fix should be yet, looking..15:41
fwereaderogpeppe, fwiw, `bzr diff -r-2..-3` gave me a patch that I could just apply15:41
rogpeppefwereade: yeah, that's what i was suggesting15:42
fwereadeniemeyer, gut says it's a bit of trivial test setup15:42
rogpeppefwereade: sorry if i wasn't clear enough15:42
fwereaderogpeppe, not to worry15:42
dimiternfwereade: i cannot even compile the tests from trunk - go test -i in environs/openstack says: ../../state/open.go:72: undefined: mgo.DialWithInfo; mgo.DialInfo15:43
fwereadedimitern, if it looks like it'll be complex then maybe just give my CL a quick check and let me know if it's sane15:43
fwereadedimitern, go get -u labix.org/v2/mgo/...15:44
niemeyerdimitern: Update your mgo15:44
niemeyerWhat fwereade says15:44
niemeyerdimitern: How long since you last run tests, btw? :-)15:44
dimiternfwereade: ok I'll check out the CL in the mean time15:44
fwereadeniemeyer, I think he's been on goose :)15:44
niemeyerAh, that'd explain it15:44
dimiternniemeyer: a week probably - been working on goose mostly, not juju-core15:44
niemeyerfwereade: Can we do that on our side maybe, if we know what to do? Is it just a matter of putting those vars in the env?15:45
fwereadeniemeyer, no idea, it probably is15:46
fwereadeniemeyer, I was trying to avoid distracting myself... didn't actually manage that, though :)15:46
niemeyerfwereade: If it is, +1 on adding them next to a TODO: This is wrong as the test shouldn't have to hack the environment to work out-of-the-box. Please fix at next chance.15:46
niemeyerfwereade: LOL15:46
dimiternfwereade: the CL looks fine to me15:47
fwereadedimitern, I'll see if there's an easy fix -- we can race :)15:47
dimiternfwereade: I don't think the revert was premature - ListServers() for example in the test I have has some arguments in the provider, but not in goose, so I think it's half-baked anyway15:49
fwereadedimitern, yeah, looking at the tests I haz a bit of a confuse, it looks like it *ought* to work15:50
rogpeppeit's going to be interesting keeping goose and juju-core in sync15:52
niemeyerSlightly unfortunate but if the APIs are diverging, there's no other way15:52
niemeyerrogpeppe: Feels pretty easy15:52
niemeyerrogpeppe: We've been doing that with every other package for quite  awhile15:53
rogpeppeniemeyer: true, but the external packages weren't perhaps changing quite as fast15:53
niemeyerrogpeppe: Sure, but the idea is still the same.. merge only when both as ready to go in15:53
niemeyers/as/are15:53
niemeyerrogpeppe: https://codereview.appspot.com/690705015:58
niemeyerdimitern: It doesn't look like the API is broken, though?16:04
niemeyerdimitern: It seems to compile fine here16:04
dimiternniemeyer: maybe I'm not getting something right then16:04
fwereadedimitern, ah, no, it's just a broken string (and tests which appear to run twice), plus whatever the deal is with local_test which I don't really get at all16:06
dimiternfwereade: I think the local tests are supposed to use the test doubles16:06
fwereadedimitern, yeah, but none of those tests actually hit anything let alone the test double16:08
dimiternfwereade: no idea, wallyworld would know I haven't looked at them yet16:09
rogpeppeniemeyer: looking16:09
fwereadedimitern, ISTM that they're failing to construct an env and trying to get the provider from that16:09
niemeyerfwereade: I have a fix.. pushing16:11
fwereadedimitern, it looks like that's what we do in ec2, though, although I can't figure out *why*16:11
dimiternfwereade: probably it needs both tenant and region, which is not needed for ec2?16:13
fwereadedimitern, it doesn't need an env at all :/16:13
fwereadedimitern, it's creating one for absolutely no reason16:14
dimiternfwereade: I see, so it shouldn't?16:14
rogpeppeniemeyer: LGTM16:14
fwereadedimitern, AFAICT it should just be doing Provider("openstack").PrivateAddress()16:15
fwereadedimitern, PrivateAddress has to work with no credentials or it's worthless16:15
niemeyerfwereade, dimitern: https://codereview.appspot.com/691204716:15
fwereadeniemeyer, LGTM as far as it goes, but it might be nice to drop the redundant Test() func in config_test.go16:16
niemeyerfwereade: Yep, there's no point in having credentials there16:16
fwereadeniemeyer, and frankly local_test.go should just be deleted16:16
niemeyerfwereade: DOing it16:17
dimiternniemeyer: LGTM16:18
fwereadeniemeyer, LGTM16:19
niemeyerdimitern, fwereade: Thanks. I've sent an improvement to the comment as well, to point out that what was done there is a temporary hack to get things building, but definitely not the right thing to do.16:21
dimiternok16:21
fwereadeniemeyer, lovely, cheers16:21
fwereadeniemeyer, ah, sorry, I thought you were submitting - LGTM again, I guess, but really almost all that file is useless and confusing16:26
fwereadeniemeyer, hard to fault the implementer, though, it looks exactly like the ec2 version -- I think I'll propose my own on top when you've submitted16:28
niemeyerfwereade: Yes, my attempt is not to fix anything other than doing the smallest possible to help unrelated work to continue16:31
fwereadeniemeyer, actually it's not quite as simple as it looks16:31
fwereadeniemeyer, yeah, sensible16:31
niemeyerfwereade: What's that?16:31
fwereadeniemeyer, I think the *Address tests should have their own metadataHost patching16:32
fwereadeniemeyer, and I don;t think any of the other tests have any justification for doing so16:33
niemeyerfwereade: Agreed on both counts16:33
fwereadeniemeyer, ok, it is pretty easy, I'll dash it off a bit later16:35
rogpeppeniemeyer: i was in the process of implementing jujud server (to serve the API) then realised that perhaps it might be good as another machine worker. what do you think?16:39
rogpeppefwereade: ^16:39
fwereaderogpeppe, I don't *think* so16:46
fwereaderogpeppe, but would you expand?16:47
rogpeppefwereade: i started doing it separately and then realised that it had almost everything in common16:47
fwereaderogpeppe, hum, interesting -- if you can pull it out cleanly then that would probably be a Good Thing then16:47
rogpeppefwereade: it looks at state and does stuff to it. almost the same as any other worker.16:48
rogpeppefwereade: the only thing i'd want to do (to make things consistent) is to remove the --ca-cert argument from jujud16:48
rogpeppefwereade: and have it pull the file from a known file within data-dir16:48
fwereaderogpeppe, +1 to that for sure16:48
rogpeppes/the file/the cert/16:48
rogpeppefwereade: then the API worker can look in data-dir too to get the server cert and key16:49
rogpeppefwereade: hmm, maybe it's crack though actually16:50
rogpeppefwereade: they are almost identical *now*16:50
fwereaderogpeppe, I'm still a bit confused by it, it is true, but laura is shouting persistently in the other room so I am finding it tricky to concentrate16:50
rogpeppefwereade: but in the future, the agents will need to talk to the API server, not the db16:51
fwereaderogpeppe, ah, yes, good point16:51
rogpeppefwereade: yeah, so the upgrader loop must be different, because they're talking to two different kinds of state server.16:52
rogpeppefwereade: i mean the state-reconnect loop16:53
fwereaderogpeppe, maybe best to keep them separate for now then16:53
rogpeppefwereade: definitely16:53
rogpeppefwereade: thanks for the feedback16:53
fwereaderogpeppe, it's always nice to be thanked for saying "er... dunno" :)16:54
rogpeppefwereade: it could be worse, you might be a teddy bear16:54
rogpeppefwereade: it will be a little weird though, 'cos i think the API server agent will need to listen to itself...16:56
fwereaderogpeppe, haha16:56
rogpeppefwereade: the worker does need an entity name though, as it needs to store its password in state and in a directory. how about just "server" for the entity name, and having State.SetAPIServerPassword ?17:00
rogpeppefwereade: oh bugger, that doesn't work17:05
rogpeppeanyone wanna have a look at this CL? https://codereview.appspot.com/691304317:10
fwereaderogpeppe, niemeyer: can I get a trivial LGTM on https://codereview.appspot.com/6907051 please? I ran all the tests :)17:23
niemeyerfwereade: Looking17:23
niemeyerfwereade: That seems rather controversial17:23
fwereadeniemeyer, :p17:23
niemeyerfwereade: LGTM :-)17:23
fwereadeniemeyer, cheers17:24
rogpeppefwereade: how did that compile before?17:24
fwereaderogpeppe, it didn't, niemeyer owes us cookies :p17:24
niemeyerrogpeppe: Probably didn't.. the guy was incompetent17:24
niemeyer:-)17:24
rogpeppeha ha17:24
fwereaderogpeppe, niemeyer: the trouble is I didn't spot it when I did the full test run for my previous submit17:25
rogpeppeniemeyer: that probably cancels out a few cookies i owe you :-)17:25
niemeyerrogpeppe: I'm not sure.. I should write down a footnote about the effects of the rule on build fixes17:25
* niemeyer laughs in an evil way17:25
niemeyerReminds of that game where we make up rules as we go17:26
niemeyerWe should play that at some point17:26
fwereaderogpeppe, niemeyer, I don't suppose there's a way to get go test to put the bad output, that I care about, at the end where I see it more obviously?17:26
niemeyerfwereade: Can I get a second review on this easy one: https://codereview.appspot.com/690705017:26
fwereadeniemeyer, looking17:27
niemeyerfwereade: Hmm.. not that I know of17:27
fwereadeniemeyer, just a NO YUO or something, that's all I ask :)17:27
niemeyerThat's the game, btw: http://en.wikipedia.org/wiki/Mao_(card_game)17:29
fwereadeniemeyer, can you briefly explain the context? code looks good but I don't quite understand what it helps us do17:29
niemeyerfwereade: It's a pre-req of..17:29
niemeyerfwereade: https://codereview.appspot.com/6868070/17:29
fwereadeniemeyer, ah, ok17:30
fwereadeniemeyer, LGTM17:31
niemeyerfwereade: Cheers17:33
fwereadeI think I'm done for the day17:34
fwereadedimitern, I think we're all going down to get ribs at la rive, join us if you fancy it, they're pretty good :)17:34
dimiternfwereade: cool, when?17:35
fwereadedimitern, imminently :)17:35
dimiternfwereade: :) be there in 20m17:35
fwereadesweet, see you shortly then :)17:35
fwereadehappy weekends everyone17:35
dimiternfrom me too :) happy weekend!17:36
fwereadeniemeyer, (don't quite know how I failed to get to the deployer rework today :( -- it'll be there soon though :))17:38
niemeyerfwereade: All good17:39
niemeyerfwereade, rogpeppe: I'll be off on Monday, btw, in exchange for the 28th that I missed.. Back Tuesday and on17:52
rogpeppefwereade: have a good one!17:53
rogpeppeniemeyer: ok, have a great weekend17:53
niemeyerfwereade, rogpeppe: A great weekend to all as well17:54
niemeyerrogpeppe: api-server LGTM17:57
rogpeppeniemeyer: cool, thanks17:57
rogpeppeniemeyer: next up is adding a conventional Stop method, then adding a jujud server command.17:57
niemeyerrogpeppe: Sweet, sounds sensible17:58
rogpeppeniemeyer: i'm wondering how we should manage the api server's state password17:59
rogpeppeniemeyer: it probably needs its own entity management stuff in state, which i'm not too keen on doing, as it seems a lot of work for not much gain18:00
rogpeppeniemeyer: i've been toying with the idea of making the state server part of the machine agent18:01
niemeyerrogpeppe: How do you mean18:01
niemeyer?18:01
rogpeppeniemeyer: it can't *quite* be "just another worker" but maybe not far off18:01
niemeyerrogpeppe: Soryr, let me be more specific18:01
niemeyerrogpeppe: Why state password would the API server need?18:02
niemeyers/Why/what18:02
rogpeppeniemeyer: i think we probably want to keep mongodb password access18:02
rogpeppeniemeyer: even after the API server is done18:03
niemeyerrogpeppe: I see18:03
niemeyerrogpeppe: The API server is a bit of an interesting case18:03
rogpeppeniemeyer: and so we still need to go through the same initial password dance that we do now18:03
rogpeppeniemeyer: yeah, it is. but it's perhaps not as special as we might initially think.18:04
niemeyerrogpeppe: It can be, depending which way we go18:04
rogpeppeniemeyer: yea18:04
niemeyerrogpeppe: We could opt to use a unix socket, for example18:04
rogpeppeh18:04
niemeyerWhich isn't supported by mgo right now18:04
niemeyerrogpeppe: I'm not sure about how much that'd make things easier/nicer, though18:05
rogpeppeniemeyer: i don't think that works so well, as i think we want to be able to have a state server fan out to several mongos, perhaps18:05
rogpeppeniemeyer: and the state server might implement some caching, so it might make sense to have more state servers than mongods18:05
niemeyerrogpeppe: Yeah, that's an interesting schema to keep in the sleeve, even if we don't do it right away18:06
rogpeppeniemeyer: i'm thinking that in fact, if we choose it to be, the state server is actually very similar to a normal worker.18:07
rogpeppeniemeyer: except that, eventually, it will act on the mongo state rather than the api state18:07
niemeyerrogpeppe: Agreed18:07
niemeyerrogpeppe: Sounds like a good way to put it18:08
rogpeppeniemeyer: and thinking that way, perhaps it makes sense to make it just another worker in the machine agent's arsenal.18:08
niemeyerrogpeppe: Yep18:08
rogpeppeniemeyer: there will be an interesting little dance for machine agents that also happen to be api servers, but i *think* it's possible18:09
rogpeppeniemeyer: the upgrade logic will want to talk to the api that's being served by the same machine agent, for example, but that will probably work ok.18:10
niemeyerrogpeppe: Yeah, it might work alright18:15
rogpepperight, time for me to go too18:25
rogpeppenight all! have great weekending.18:25
=== carif_ is now known as carif

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