/srv/irclogs.ubuntu.com/2012/08/21/#juju-dev.txt

niemeyerfwereade_: The charm being upgraded to and the old charm are both in the same location00:00
niemeyerfwereade_: When we resolve, we read it to tell what's in there00:01
niemeyerfwereade_: If the user moved backwards, the metadata will have moved backwards with it00:01
niemeyerfwereade_: and juju will automatically put it back to work, and then upgrade it again if necessary00:01
fwereade_niemeyer, ok, yes, that makes sense... I'm going to have a lie down and a think about this for a bit, and if I'm lucky I won;t come back until tomorrow :)00:07
niemeyerfwereade_: I'll be wishing for the best :-)00:08
niemeyerfwereade_: Have a good night00:08
niemeyerdavecheney: Heya01:00
davecheneyniemeyer: howdy!01:01
niemeyerdavecheney: Sorry for being a bit behind on your reviews.. I know you have some good stuff in there01:01
davecheneynp, i know you have your hands full01:01
davecheneyi've got pleanty of bugs (most that I have registered :) to keep me busy01:02
davecheneyniemeyer: how is your transaction stuff going ?01:02
niemeyerdavecheney: Pretty good.. working on it right now, finishing insert/remove01:03
niemeyerdavecheney: The rest seems solid01:03
davecheneyawesome01:03
niemeyerdavecheney: What are you up to?02:04
davecheneyniemeyer: working on the final part of https://bugs.launchpad.net/juju-core/+bug/102565602:05
niemeyerdavecheney: Neat02:06
niemeyerdavecheney: Do you have plans for what to do after that?02:06
davecheneyapart from fixing bugs, i'm looking to you and mark to provide direction02:07
niemeyerdavecheney: Cool, I was wondering if you might appreciate working on being a bit of an integration champion for the next couple of months02:08
davecheneyniemeyer: i would love that02:08
niemeyerdavecheney: I appreciated a lot the stuff you've done in the sprint and after that to make it work for real02:08
davecheneyaww shucks02:08
niemeyerdavecheney: Having you actively looking for the missing pieces of the puzzle, and chasing down broken parts either directly or by poking people to fix stuff, will be invaluable02:09
davecheneyspeaking of that, i tried to run juju on arm yesterday02:10
davecheneywith mixed results02:10
davecheneyniemeyer: i heard you have a juju intergratino testing tool02:11
davecheneyyou were talking about that in the sprint02:11
davecheneywould you like to hand that over ?02:11
niemeyerdavecheney: I have a half baked functional test runner that I think we should revive, but it's nothing to sweat at02:11
niemeyerdavecheney: lp:~juju/juju/ftests02:12
niemeyerInternal compiler error.. boom03:37
niemeyerSilly one, though03:37
rogpeppemornin' all07:10
TheMuemorning07:30
rogpeppeTheMue: hiya07:36
TheMuerogpeppe: hi, how has your free day been?07:36
rogpeppeTheMue: good thanks. it was our first wedding anniversary - we went for a nice walk and for a meal at a nice restaurant.07:37
TheMuerogpeppe: oh, congratulations07:38
TheMuerogpeppe: we'll have our silver anniversery in two years ;)07:38
rogpeppeTheMue: i see the release meeting was postponed to today, so i didn't miss anything, right?07:38
rogpeppeTheMue: wow!07:38
TheMuerogpeppe: yep, yesterday no meeting, and mark felt ill07:39
davecheneyrogpeppe: he had been at PyCon07:59
rogpeppedavecheney: ah, *that* sort of ill :-)07:59
davecheneyand you remember that story he told us at that Bar across the road from the Pirate Cafe in Lisbon ?07:59
rogpeppedavecheney: mornin' BTW!07:59
davecheneythat might have been related07:59
davecheneyrogpeppe: yes hello08:00
davecheneyi'm just about to sign off for a bit, gotta get the dinner on08:00
rogpeppedavecheney: k08:00
rogpeppedavecheney: enjoy - see you for the meeting in a little bit08:00
Arammoin.09:35
TheMueAram: moin09:38
TheMueso, merged trunk into my three open branches, now start a new one09:39
TheMueAram: regarding life, when calling State.RemoveMachine() you set the state of the machine to Dying. how do you remove a machine? IMHO one should Kill() and later Die() a machine before RemoveMachine() is checking that it's dead and then removes the machine from the state.09:46
AramI don't understand the question, yes, you should call Kill + Die (or just die, alive -> die is valid now) before calling RemoveMachine.09:47
Aramis this not so?09:47
TheMueAram: not in trunk09:47
TheMueAram: here RemoveMachine() in mstate searches the machine with life = Alive and sets it to Dying09:48
Aram?!?09:48
Aramlet me take a look09:48
Aramaaah09:49
Aramyes09:49
Aramremovemachine09:49
TheMuestate line 71ff09:49
Aramfor some stupid reason I though you were talking about RemoveRelation.09:49
Aramyes, lifecycle for relation is not done yet.09:49
Aramerm09:49
TheMueAram: hehe, no09:49
Aramfor machine09:49
Aramonly relations have full lifecycle in mstate ATM.09:49
TheMueAram: ah, ok, so i'm still right with our Kill() -> Die() agreement09:50
Aramyes.09:50
TheMue*pheeew*09:50
TheMue+109:50
Aramin fact, lifecycle for machines is what I should do right now, after I push confignodes.09:50
TheMueAram: i only stumbled about it when doing a cross-check. sate has lifecycle now for relations as well as a life watcher and a service relation watcher (all in the review queue) and today i'm starting with units09:52
Aramwhy units before machines?09:52
Aramor are you talking about the unit watcher?09:53
TheMueAram: i'm going bottom up, as discussed with niemeyer. relations, units, services, machines09:54
TheMueAram: before you free a machine everything else has to be done09:54
TheMueAram: another question. Relations() of Service returns only alive relations in mstate. i thought we always return all, individual life state can then be retrieved with Relation.Life()10:18
Aramyou're right, I haven't done that yet because I didn't want to modify the tests.10:19
Aram(yet).10:19
TheMueAram: ok10:24
Arambtw, confignodes were beautiful.10:24
Aramthe implementation is really nice.10:24
Aramit takes advantage of the dynamic, schemaless nature of mongodb.10:25
TheMueAram: i'm pretty sure that it will be more elegant than the zk counterpart10:30
Arammeeting in 4 minutes?10:56
davecheneyyy10:56
AramI'll be late ~10 minutes, start without me.10:57
davecheneymate, we'll all be late10:58
davecheneyain't no mramm yet10:58
Aramhhe.10:58
davecheneynor niemeyer10:58
TheMuedavecheney: not yet awakened11:01
niemeyerGoooood morning!11:03
davecheneyheeeelo11:03
TheMueniemeyer: heeeeeeya11:04
niemeyerIs it party time?11:04
TheMueniemeyer: indeed, but mramm is not yet here11:04
niemeyerOkay, I'm sending invites then11:04
rogpeppeniemeyer: seems to be.11:04
niemeyerrogpeppe: Hey!11:05
niemeyerrogpeppe: Welcome back11:05
rogpeppe fwereade__: ping11:07
fwereade__rogpeppe, pong11:07
rogpeppefwereade__: meeting time...11:08
fwereade__rogpeppe, oh, so it is :)11:08
davecheneymramm is in my time zone11:08
davecheneyshould I call him ?11:08
rogpeppedavecheney: good plan11:08
davecheneyimma skype him11:08
rogpeppedavecheney: youa doa thata11:08
niemeyerAram: ping?11:09
Aramsorry for being late guys11:16
Aramhad an emergency11:16
davecheneyare we all also going to UDS ?11:45
davecheneyI only have an invite for the pre UDS kegger11:45
davecheneyand that was all anyone wrote11:49
mrammhttps://bugs.launchpad.net/juju-core/+bug/102843712:04
mrammhttps://launchpad.net/juju-core/+milestone/1.312:12
mrammthanks again everybody!12:43
mrammI know that putting those two meetings together made it very long12:44
rogpeppeanyone fancy having a chat about the design of the upgrade command?12:45
rogpeppeniemeyer, fwereade__, davecheney: ^ ?12:45
fwereade__rogpeppe, a little focused elsewhere atm but I'll try to keep half an eye on one if it happens :)12:46
rogpeppefwereade__: ta12:46
rogpeppeniemeyer: does this LGTY, or had you just not finished the complete review yet? https://codereview.appspot.com/6463057/12:49
niemeyerrogpeppe: I'm just grabbing some chimarrĂ£o..12:50
rogpeppeniemeyer: nop12:50
rogpeppenp12:50
davecheneynight lads, pumpkin time12:51
mrammnight all12:56
niemeyerrogpeppe: I haven't reviewed it after you fixed.. will check it out again now12:57
rogpeppeniemeyer: thanks12:57
niemeyerrogpeppe: Well, and you fixed it 2h ago.. so that's not too surprising :-)12:58
rogpeppeniemeyer: np. it just seemed like there might have been some more substantial comments waiting in the wings. i'm glad that there aren't!12:58
niemeyerrogpeppe: Ah, cool, that was mainly it really12:59
niemeyerrogpeppe: LGTM, thanks!13:00
rogpeppeniemeyer: lovely, thanks a lot13:00
rogpeppeniemeyer: any chance we could have a brief discussion about the juju upgrade command?13:00
rogpeppeniemeyer: because that's what i'm doing next, i think.13:01
niemeyerrogpeppe: Of course13:03
niemeyerrogpeppe: Let's go13:03
rogpeppeniemeyer: i've been wondering about two commands13:04
rogpeppeniemeyer: juju upload-tools and juju upgrade13:04
rogpeppeniemeyer: and i've been wondering how the flags to upgrade might work (if we decide to provide some capability to upgrade at finer granularity than "everything all at once")13:05
niemeyerrogpeppe: We already have an --upload-tools flag in bootstrap.. what about upgrade --upload-tools?13:05
rogpeppeniemeyer: the thing is that upload-tools is useful independently of upgrade13:05
rogpeppeniemeyer: (for instance if you want to make tools for several different platforms available)13:06
niemeyerrogpeppe: The only moment I can foresee upload-tools being used independently is to build the public bucket13:06
niemeyerrogpeppe: Otherwise, there's nothing wrong with doing upgrade --upload-tools on the different platform too13:07
rogpeppeniemeyer: because nobody will ever do cross-platform stuff with a development version?13:07
niemeyerrogpeppe: I'm sure Dave will :-)13:07
niemeyerrogpeppe: upgrade --upload-tools should work13:08
rogpeppeniemeyer: hmm, i suppose it doesn't really matter that we'll get half the upgrade done first, then half later.13:08
niemeyerrogpeppe: Right13:08
rogpeppeniemeyer: but i was thinking about building the public bucket too13:08
niemeyerrogpeppe: Yeah, for that it may be useful, but the semantics may be different.. we don't need an environment running for that13:08
rogpeppeniemeyer: true.13:09
niemeyerrogpeppe: So I suggest getting --upload-tools working first, since that gets us going development wise..13:10
niemeyerrogpeppe: The command should probably be called "upgrade-juju", btw13:10
rogpeppeniemeyer: ok. what about --version? do we allow the specification of a desired version or  not?13:10
rogpeppeniemeyer: +113:10
niemeyerrogpeppe: To avoid the ambiguity with upgrading charms13:10
niemeyerrogpeppe: Not for now, at least13:11
rogpeppeniemeyer: and another thing: it would be nice to support this workflow: change source; juju-upgrade; test; change source; juju-upgrade; test13:11
TheMueniemeyer: if i scanned the code right the ServiceUnitWatcher is not been used today. where will it be used later?13:12
rogpeppeniemeyer: but we won't be able to do that unless the version number changes each time.13:12
rogpeppeniemeyer: so i was wondering about --bump-version or something like that.13:12
niemeyerrogpeppe: Yeah, sounds nice to have something like this.. I wonder about the details, though13:13
rogpeppeniemeyer: which would force to version to be one more than the current max version available in the private storage.13:13
niemeyerrogpeppe: Ah, ok, without touching the local version13:13
rogpeppeniemeyer: yeah13:13
niemeyerrogpeppe: Sounds sensible13:13
niemeyerTheMue: There were a bunch of things that were going to use it.. watching upgrade flags, watching agent version, ...13:14
niemeyerTheMue: Funny enough, they both were moved in different directions13:14
TheMueniemeyer: ic13:15
rogpeppeniemeyer: i had some thoughts about major-version upgrades too, but i think they can wait13:16
niemeyerrogpeppe: +113:16
TheMueniemeyer: just ask because of lifecycle13:16
niemeyerfwereade__: Do we have any need for the unit watcher nowadays in the uniter?13:16
TheMueniemeyer: the watcher has to be changed to deliver alive, dying and dead units13:16
rogpeppeniemeyer: so for now, here's the plan: juju upgrade-juju [--upload-tools] [--bump-version]13:16
niemeyerfwereade__: Or anything you can foresee?13:16
niemeyerrogpeppe: +1!13:17
rogpeppeniemeyer: cool, will do13:17
fwereade__niemeyer, what TheMue said, I think13:17
niemeyerrogpeppe: So neat13:17
fwereade__niemeyer, it will want to know when it's Dying/Dead13:17
niemeyerfwereade__: Ah, of course13:18
niemeyerTheMue: ^13:18
TheMuefwereade__: yes13:18
TheMuefwereade__: so if we'll have a user of the watcher once it's worse change it (like the service relation watcher)13:18
TheMuefwereade__: but today it's unused ;)13:19
fwereade__TheMue, +113:19
rogpeppeniemeyer: one other little twist occurs to me: the upgrade-juju command will need to know the series and architecture of the machine that each agent is running on. i'm *thinking* that it will find this out by looking at the agent's proposed tools (which should be set before the agent is assigned to a machine). does that sound reasonable?13:22
niemeyerTheMue: If we do the mstate migration fast enough we don't have to worry about that in state13:22
niemeyerrogpeppe: Yeah, sounds like a reasonable way forward13:23
niemeyerrogpeppe: We'll need constraint support in the near future, but we're not there yet, and it's not clear it'd be any better either way13:24
TheMueniemeyer: ok, so i'll stop here now and continue with mstate after lunch ;)13:24
rogpeppeniemeyer: yeah, i think that when we *do* have constraints, the proposed agent tools will still encapsulate the solved constraint in exactly the way that the tools require, so won't need changing.13:25
TheMuelunchtime (today a bit later)13:25
niemeyerTheMue: Please synchronize carefully with Aram13:26
niemeyerTheMue: It's easy to parallelize, and it's also very easy to step on each other's toes13:27
niemeyerrogpeppe: Agreed13:27
niemeyerTheMue: Enjoy13:27
rogpeppeniemeyer: great.13:27
fwereade__niemeyer, https://codereview.appspot.com/644116913:38
niemeyerfwereade__: looking13:44
fwereade__niemeyer, when you're done, I think I also need to talk about upgrades a bit more, I'll go make a sandwich and try to marshal my thoughts13:44
niemeyerfwereade__: Done13:45
niemeyerfwereade__: It looks good, but my first impression is that it could be a lot slimmer with a config node and no new ServiceCharm type13:46
niemeyerfwereade__: Pretty much: 1) read config node; 2) return value a value b13:48
fwereade__niemeyer, hm, maybe -- but the watcher needs a single type to return13:48
fwereade__niemeyer, and, honestly, the fiddling around with types seems to cost as many lines as just doing it with a serviceNode does13:48
niemeyerfwereade__: ServiceCharmChange..13:48
fwereade__niemeyer, yeah, fair enough13:49
niemeyerfwereade__: I don't get your comment regarding fiddling with types13:49
niemeyerfwereade__: There's a lot of logic there that can go away entirely13:49
fwereade__niemeyer, casting stuff to strings/bools, dealing with what happens if they're not right13:49
niemeyerfwereade__: Well, just don't.. that's what you're doing now13:50
fwereade__niemeyer, you mean the retryChange on the serviceNode? that's only there because I thought you'd prefer it in case we added more fields13:50
fwereade__niemeyer, what, just panic if I get rubbish in the node?13:50
niemeyerfwereade__: Using such a type is no different than doing "v, _ := i.(bool)"13:50
fwereade__niemeyer, yeah, I guess, it just seemed like ConfigNode was overkill for two totally predictable fields13:51
fwereade__niemeyer, anyway, happy to do it as you suggest13:52
niemeyerfwereade__: I'd agree if we weren't doing non-fun stuff by hand as an alternative13:52
fwereade__niemeyer, heh, the confignode seemed to me like the unfun way there13:53
fwereade__niemeyer, anyway sgtm13:53
* fwereade__ remembers why he'd put the toaster away in the cupboard in the first place, you need to watch the damn thing like a hawk :/13:53
niemeyerfwereade__: Unfun as in significantly more logic, in exchange for ... ?13:54
niemeyerfwereade__: I may be on crack13:54
niemeyerfwereade__: Let's see how it looks like13:54
fwereade__niemeyer, it'll probably actually trun out better, your instincts are usually solid :013:59
niemeyerfwereade__: Cheers! :)14:01
fwereade__niemeyer, ok, should be ready to propose again in a mo, but I think I need another chat about charm upgrade errors14:28
fwereade__niemeyer, so, when we get an error, it's because there was a conflict trying to pull into the charm tree from the charms repo14:29
niemeyerfwereade__: Right14:30
fwereade__niemeyer, but I'm still not sure about how we handle it -- what does juju resolved imply here?14:31
fwereade__niemeyer, ISTM that it just means the user has done *something*, and they might themselves have updated the charm to the desired version and they might have reverted and made some more changes that should allow the upgrade to go ahead14:32
niemeyerfwereade__: We could make it do "bzr resolved --all + bzr commit -m ..."14:32
fwereade__niemeyer, and then we just try to pull again, which might do nothing or might upgrade successfully or might cause a new error14:33
fwereade__?14:33
fwereade__niemeyer, and from that operation we determine what the new state of the charm really is?14:33
niemeyerfwereade__: I think we can just allow the charm to run again if the operation succeeds14:34
niemeyerfwereade__: Oh, wait.. we can't14:34
niemeyerfwereade__: Because we need to take a decision regarding whether to run the hook or not14:35
fwereade__niemeyer, ok, and the success is what determines what the version is? oh, bother14:35
fwereade__niemeyer, ah ok, yeah, that should be easy though14:35
niemeyerfwereade__: Yeah, I was just thinking that we could put the charm back in normal working mode and allow it to re-run the upgrade, but we can't.. we really have to take a decision right there if the upgrade is happening or not14:36
fwereade__niemeyer, yeah, I think that once we've started upgrading we shouldn't stop until we succeed14:36
niemeyerfwereade__: Allowing for a rollback also seems fine.. if diskVersion == oldVersion { abort upgrade and restart normally }14:37
fwereade__niemeyer, sorry, I'm not following14:39
fwereade__niemeyer, what causes us to do that?14:39
niemeyerfwereade__: We're saving the charm version within the bzr branch we use to prepare the upgrade, right?14:39
fwereade__niemeyer, perhaps; but where exactly?14:40
fwereade__niemeyer, and can we depend on that if it's something the user has access to?14:41
niemeyerfwereade__: I assumed it would be part of the charm directory itself.. we talked about unit.SetCharm(charm) when the unit is running, to report the version actually in use, right?14:41
fwereade__niemeyer, the second part, yes14:41
niemeyerfwereade__: Well, the user has access to the kernel of the machine too :-)14:41
fwereade__niemeyer, sure, but we aren't telling the user "hey, go and fix the kernel"14:42
niemeyerfwereade__: This is metadata that should be in a dot file of some sort within the charm directory.. if the user hacks that manually, good luck :)14:42
niemeyerfwereade__: Are we not? If the kernel breaks, we definitely say that14:43
fwereade__niemeyer, my instinct says that we should be storing it somewhere outside the charm directory and updating it based on our knowledge of the success of change operations, just as I expected we would the installing/upgrading/installed state of the charm14:43
niemeyerfwereade__: I don't get the contention in this bit.. you're saving the whole charm and snapshotting it.. how come it feels bad to save the version being snapshotted with it?14:44
fwereade__niemeyer, I'm not entirely sure it does, I just was expecting to leave the charm directory as the user's playground as much as possible14:46
fwereade__niemeyer, and to keep the state we depend upon separate14:47
fwereade__niemeyer, but I'm pretty comfortable either way14:47
niemeyerfwereade__: I think it's fine to have the state, as in, what's going on with the charm, somewhere else14:48
niemeyerfwereade__: But being able to tell what charm version is that thing we're looking at feels very convenient14:49
niemeyerfwereade__: It's much more likely that a version being snapshotted with the content will be right than something we keep ourselves independently14:49
niemeyerfwereade__: Otherwise, "bzr revert".. boom.. state is wrong14:50
fwereade__niemeyer, ok, that seems good then14:50
fwereade__niemeyer, so external state controls how we interpret internal state14:51
niemeyerfwereade__: Right.. external state tells what we've been doing about it.. internal state simply says what it is ATM14:51
niemeyerfwereade__: Well.. version really.. let's avoid one more "state" :-)14:51
fwereade__niemeyer, ok, I have some lurking uncertainty but I won't know what is is or whether it's real until I've implemented a bit more :)14:53
niemeyerfwereade__: I can sympathize14:53
fwereade__niemeyer, anyway, reproposed https://codereview.appspot.com/6441169 :)14:54
niemeyerfwereade__: How did it feel?14:55
fwereade__niemeyer, just as good -- not convinced it's really better but I don;t think it's any worse :)14:55
fwereade__niemeyer, it probably did get a little smaller though, I didn't count14:56
niemeyerfwereade__: Yeah, a few types/functions/closures less, thanks14:57
niemeyerfwereade__: Reviewed15:07
niemeyerfwereade__: Glad to see 100 lines going away15:08
fwereade__niemeyer, yeah, always nice :)15:08
fwereade__niemeyer, thanks15:08
fwereade__niemeyer, all looks sound15:09
niemeyerLunch16:34
rogpeppefwereade_: ping18:23
niemeyerSomewhat of a quiet day..19:45
rogpeppeniemeyer: i hope to remedy that tomorrow, but i'm off now....20:13
rogpeppeniemeyer: see you tomorrow20:13
niemeyerrogpeppe: A calm day is good every once in a while..20:13
niemeyerrogpeppe: Have a good time!20:13

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