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

=== nijaba_ is now known as nijaba
TheMuemorning07:58
fwereade_heya TheMue08:13
fwereade_heya wrtp08:14
wrtpfwereade_: moanin'08:14
wrtpTheMue: hiya08:14
TheMuefwereade_, wrtp: hi08:14
Aramhello.09:22
TheMueAram: hi09:28
Aramso, the MongoDB tailable cursors are a piece of shit.09:31
TheMueAram: tailable?09:44
AramTheMue: http://www.mongodb.org/display/DOCS/Tailable+Cursors09:44
Aramthe thing I wanted to use to avoid polling.09:45
Arambut it's a piece of crap. truth is MongoDB doesn't have this simple feature, and encapsulates server side polling inside a tailing API.09:45
Arambut it's not a real, fast, delivery mechanism, in fact it's slower then polling.09:46
TheMueAram: ic, yes, would be nice for queues.09:46
Aramif you starve the data from mondogb it will sleep on the server side for about 10 seconds.09:46
Aramit doesn't really block and wait for new data.09:46
Aramit just creates a thread that wakes after 10 seconds to do a new query.09:46
TheMueAram: *sigh* instead of really pushing it to an open connection.09:48
AramI spent a day debugging why my watcher made tests take about one minute per test.09:48
Aramyeah.09:48
niemeyerMorning all!09:58
fwereade_niemeyer, heyhey10:04
TheMueniemeyer: hiya10:09
niemeyerReviews are clean.. I'll jump right into proposal implementation for presence.. got a nice design yesterday, which should scale to a reasonable level.10:29
niemeyerfwereade_: Do we have any place that checks for liveness in-place with Alive instead of AliveW?10:54
niemeyerfwereade_: Or, can you imagine why we'd do that?10:54
fwereade_niemeyer, hmmm, I'm not sure we do10:54
fwereade_niemeyer, Unit.AgentAlive10:55
niemeyerfwereade_: Cool, I'll try to go with a more conservative design10:55
fwereade_niemeyer, it's used in status10:55
niemeyerfwereade_: Ah, good point, cheers10:55
fwereade_niemeyer, (and Machine.AgentAlive too)10:56
niemeyerfwereade_: Yeah, for the same reason I expect10:56
fwereade_niemeyer, yeah10:56
wrtpniemeyer: "11:25
wrtpIt'd be nice to avoid yet another place where the environment configuration is11:25
wrtpmanipulated magically. What's wrong with doing it when that configuration is11:25
wrtpcreated?11:25
wrtp"11:25
wrtpniemeyer: i thought it was nice to ensure that the agent tools version was always correctly set11:25
niemeyerwrtp: It is nice, but that's not the agent tools version11:27
wrtpniemeyer: i could easily change things so that jujud bootstrap-state (and dummy.Environ.Bootstrap) is responsible for setting the version, but that leaves a small window where if you do: {juju bootstrap; juju upgrade} the upgrade might not see the agent version, so must fail11:27
wrtpniemeyer: proposed agent tools version?11:27
niemeyerwrtp: Exactly.. we have a setting for the current agent tools version, and it lives elsewhere11:28
wrtpniemeyer: sorry, all this is talking about the proposed version, not the current version.11:28
niemeyerwrtp: Exactly11:28
niemeyerwrtp: That's why the suggested location seems awkward11:28
niemeyerwrtp: There's such window, actually11:29
wrtpniemeyer: so what should upgrade-juju do if it sees that the version has not yet been set? my inclination is for it just to fail, as it's a marginal case.11:29
niemeyerwrtp: Why would the version not 'be set?11:29
niemeyerwrtp: That configuration that you're manipulating in initialization is coming from somewhere11:29
wrtpniemeyer: hmm, of course11:30
wrtpniemeyer: doh!11:30
niemeyerwrtp: :)11:30
niemeyerI'll get some coffee and bbiab11:31
wrtpniemeyer: should be better now: https://codereview.appspot.com/649405712:28
TheMueniemeyer: any good idea on how to invalidate the environment w/o writing direct to ZK? sadly JujuConnSuite embeds only ZkSuite to start ZK, but doesn't expose a ZK connection to use.12:29
wrtpTheMue: can't you get the zk connection from the State?12:30
TheMuewrtp: different package, the provisioner_test.12:31
niemeyerwrtp: Sorry, I think we're still not understanding each other..12:31
wrtpniemeyer: oh, darn12:31
wrtpniemeyer: should agent-version be set when reading environments.yaml?12:31
wrtpniemeyer: that seemed wrong to me12:31
niemeyerwrtp: Please check out environs/ec2/ec2.go:24512:31
wrtpniemeyer: in my branch?12:32
niemeyerwrtp: In trunk12:32
wrtpniemeyer: i thought about that too, but it didn't seem quite right somehow12:33
niemeyerwrtp: See the tools there, two lines below it?12:33
niemeyerwrtp: It's all there12:33
niemeyerwrtp: What's wrong is that there's something generic being done in the provider12:34
niemeyerwrtp: But that's pending even despite this change12:34
niemeyerpublicAttrs is really supposed to be generic12:34
wrtpniemeyer: are you thinking of something like this: http://paste.ubuntu.com/1175776/12:35
wrtp?12:35
wrtpniemeyer: or do you think the agent-version should be in the Config that the Environ was created with?12:36
niemeyerwrtp: I'm thinking about something like environs.BootstrapConfig(e environ.Environ, tools *Tools)12:36
niemeyerwrtp: That is mainly publicAttrs, plus the new agent version logic12:37
niemeyerwrtp: The former, from your two options, except it'd be within publicAttrs, which is in fact BootstrapConfig12:39
wrtpniemeyer: that seems like a reasonable thing to do. not entirely sure that it shouldn't be environs.BootstrapConfig(p EnvironProvider, cfg *config.Config, tools *Tools)12:41
wrtpniemeyer: which gives the provider potential leave to manipulate the config before it goes out into the cloud. but... it probably doesn't matter much.12:42
niemeyerwrtp: e is what's calling BootstrapConfig..12:43
wrtpniemeyer: i realise that12:43
niemeyerwrtp: It means it manipulate the result..12:43
niemeyerit can12:44
wrtpniemeyer: but all BootstrapConfig will use e for is to get its Config, no?12:44
wrtpniemeyer: and the provider12:44
niemeyerwrtp: e is the thing that "sends t'he config into the cloud"12:44
niemeyerwrtp: It has the result of BootstrapConfig in its hands12:44
wrtpniemeyer: oh, hold on - will BootstrapConfig actually call Environ.Bootstrap? no, it couldn't.12:45
wrtpniemeyer: environs.BootstrapConfig(e environ.Environ, tools *Tools) *config.Config12:45
niemeyerwrtp: No.. it will call e.Config()12:45
wrtppresumably12:45
niemeyerwrtp: and e.SecretAttrs12:45
niemeyere.Provider().SecretAttrs, actually12:46
wrtpniemeyer: yes - SecretAttrs is a method on EnvironProvider12:46
niemeyerwrtp: Yep, and Config is in e12:46
niemeyerwrtp: It has all it needs12:46
wrtpniemeyer: if all BootstrapConfig needs is the provider and the config, why not just pass those in explicitly12:46
wrtpniemeyer: makes it easier to test, for one thing.12:46
niemeyerwrtp: Sure.. that works too12:47
wrtpniemeyer: cool.12:47
wrtpniemeyer: that type sig makes it more obvious what it's doing too.12:47
TheMueYEAH!12:52
TheMueFound my missing function that helps me.12:53
wrtpniemeyer: a quick question: ec2.environProvider.publicAttrs uses UnknownAttrs not AllAttrs. i *think* that's a bug - do you concur?13:01
niemeyerwrtp: Looking13:02
niemeyerwrtp: yeah, looks like a bug. Good catch13:04
wrtpniemeyer: it would be caught by tests soon enough :-)13:04
wrtpniemeyer: i'm a bit surprised it wasn't caught already13:04
niemeyerwrtp: Yeah, you've probably saved Dave quite a bit of head-scratching13:05
niemeyerwrtp: I've filed a bug about updateSecrets yesterday13:05
niemeyerwrtp: It's still sending the full config ATM.. that's why the bug isn't visible yet13:05
wrtpniemeyer: this is my initial stab at BootstrapConfig: http://paste.ubuntu.com/1175826/13:05
wrtps/providerInstance/p/ obviously :-)13:06
niemeyerwrtp: Beautiful!13:06
fwereade_GAAAAH it's testing.HTTPServer that occasionally hangs the Uniter tests13:21
* fwereade_ has a relieved13:21
* fwereade_ is going for a giggie13:21
fwereade_ciggie13:21
niemeyerfwereade_: Woohay :)13:28
* wrtp wants a cobzr branch feature that lists branches in time-last-modified order.13:54
Aramit's easy to create a script that does this.13:55
wrtpAram: comparing times isn't that easy in a script, but yeah, i could write a program to do it.13:56
wrtpAram: actually, the timestamps used are easy to compare lexicographically, so not too bad.13:57
Aramit would be great if it could print unix time or some other simple integer13:57
=== mramm2 is now known as mramm
niemeyerAll going well.. review queue is empty, lots of things being merged..15:06
niemeyerPresence is well in progress too15:07
niemeyerI'll step out for a slightly extended lunch (I expect ~1:30) to run some errands, and will continue on that15:07
wrtpfwereade_, TheMue: do you think it should be an error if State.AddService is called twice with exactly the same arguments?15:16
fwereade_wrtp, hmm, that's a bit philosophical ;p15:16
wrtpi.e. a service with the same name and charm being created twice?15:17
Aramyes.15:17
fwereade_wrtp, yeah, I *think* it should be15:17
wrtpfwereade_: currently it seems to create a new service with an identical name. i don't think that's right.15:17
fwereade_wrtp, whoa, that definitely sounds screwed up15:17
TheMuewrtp: I would say so.15:17
Aramin mstate it good15:17
wrtpfwereade_: FirewallerSuite.TestNotExposedService does it.15:17
Aramit's15:17
wrtpfwereade_: but i haven't actually checked what's happening - i'm just assuming from a brief look at the code15:18
wrtpbut the test passes, so it must be doing something15:18
fwereade_wrtp, heh, sorry, I'm not familiar with that bit15:18
wrtpTheMue: any particular reason that that test calls AddService("wordpress", s.charm) twice in the same test?15:18
fwereade_wrtp, (the perspective that gives me pause is "well, at the end of the call there is a service named wordpress with the right charm, everyone should be happy")15:19
fwereade_wrtp, if there are *two* services with the same name, yeah, that's just wrong15:19
wrtpfwereade_: ahem, yeah, but service names should be unique15:19
TheMuewrtp: where exactly do you see it? i see it only once.15:19
wrtpi think there must be15:19
TheMuewrtp: line 7415:20
wrtpTheMue: oh drat! i'm just mistaking my own copy and pasted stuff for the original15:21
* wrtp hangs head15:21
wrtpsorry, false alarm!15:21
TheMue*ROFL*15:21
wrtpcould've sworn i checked15:22
fwereade_haha, I'm pretty sure I've done worse :)15:22
TheMuewrtp: btw, the environ config stuff is in15:22
wrtpTheMue: brilliant, thanks!15:22
wrtpTheMue: would appreciate if you could have a look at this. i hope that your tests are still fundamentally the same although i've shuffled things around a little. https://codereview.appspot.com/649905615:54
TheMue*click*15:55
TheMuewrtp: LGTM, only one smaller note.16:01
wrtpTheMue: thanks16:01
wrtpTheMue: tbh i'm not sure it's even worth keeping that check around - it's just checking that StartInstance works, which we test in other places.16:02
wrtpTheMue: it looks to me like it was a debugging remnant16:02
wrtpTheMue: i left it in in case it was important - what do you think?16:03
TheMuewrtp: Yeah, I think it's by Dave and it's just to get sure that the instance is started.16:06
wrtpTheMue: ok16:06
wrtpTheMue: i'll delete it i think16:06
* niemeyer waves17:13
wrtpniemeyer: ping17:53
niemeyerwrtp: yo17:53
wrtpniemeyer: one little wrinkle to our upgrade scheme change17:53
niemeyerwrtp: Uh oh :)17:53
wrtpniemeyer: i think the dev flag has to be in the environ config17:54
wrtpniemeyer: rather than an argument to upgrade-juju17:54
niemeyerwrtp: Why's that?17:54
wrtpniemeyer: because the agents need to know if they can upgrade to a dev version or not17:54
niemeyerwrtp: Not that it sounds bad.. it actually sounds reasonable, but just curious17:54
niemeyerwrtp: Ah, interesting17:54
wrtpniemeyer: and that's the best (i think) way of communicating that17:54
wrtpniemeyer: it actually works out quite well i think17:55
niemeyerwrtp: Yeah, it sounds good17:55
wrtpniemeyer: unfortunately all these changes mean i am unlikely to make tomorrow's deadline :-(17:55
niemeyerwrtp: Well, it'd be awesome if we have that well aligned by the end of the day tomorrow at least17:56
wrtpniemeyer: to prepare for the other change, i'm changing FindTools to and BestTools to look like this:17:56
wrtpniemeyer: http://paste.ubuntu.com/1176355/17:57
niemeyerwrtp: That flag will likely be used for other stuff as well, btw17:57
wrtpniemeyer: the "Highest" flag is useful because we don't want the version of the client to determine the highest version that can be deployed17:58
wrtpniemeyer: and i'm happy to lose the bool tbh17:58
niemeyerwrtp: Why would we not want that?17:59
wrtpniemeyer: why would we? if there's a version later than my current client in the cloud, i'd want it to be used when i bootstrap, i think18:00
wrtpniemeyer: it's the same semantics we had previously18:00
wrtpniemeyer: the <= semantics are only important when upgrading, i think18:00
niemeyerwrtp: Why? What's the logic?18:01
wrtpniemeyer: if the logic *always* selects the highest version, then we can never downgrade.18:01
niemeyerwrtp: Uh.. now I'm even more lost :)18:02
niemeyerwrtp: Hmm18:02
wrtpniemeyer: ok. so what we *did* have was that BestTools always selected the highest available version with the same major number.18:02
wrtpniemeyer: now clients are using BestTools to choose a suitable set of tools when told to upgrade to a particular version number.18:03
wrtpniemeyer: so we make sure (your idea) that they don't upgrade to a higher version number than requested.18:03
niemeyerwrtp: The idea was also to ensure compatibility with the client, but I guess it doesn't matter.. we have to preserve it either way18:04
wrtpniemeyer: but the old semantics are still applicable IMHO when initially deploying18:04
wrtpniemeyer: yes18:04
niemeyerwrtp: Okay.. can we please just tweak the flag names a bit.. Dev is too generic.. we need some kinds of prefix/suffix such as DevTools18:05
wrtpniemeyer: sure, suggestions welcome. DevTools, HighestTools?18:05
wrtpHighestVersion?18:05
niemeyerwrtp: You mean DevVerison as well?18:06
wrtpniemeyer: i hadn't, but actually that could work well18:07
niemeyerwrtp: NewestVersion and NewestCompatVersion18:07
niemeyer?18:07
wrtpniemeyer: the flags are orthogonal18:08
niemeyerwrtp: Or VDev VNewest VNewestCompat18:08
niemeyerwrtp: So VNewest and VCompat18:08
niemeyerwrtp: (or NewestVersion and CompatVersion)18:09
wrtpniemeyer: i'm not sure i like Compat18:09
niemeyerwrtp: Suggestions/18:09
niemeyer?18:09
wrtpniemeyer: because dev versions *are* compatible with non-dev versions18:09
wrtpniemeyer: (or should be)18:09
wrtpniemeyer: we already have Version.IsDev18:09
niemeyerwrtp: Yep, the point of compat is that 4.0 is newer than 3.018:09
wrtpniemeyer: ah, currently it *always* chooses a compatible version, so that's not an option18:10
niemeyerwrtp: Yes, but it is18:10
wrtpniemeyer: i'd like to add that later, if i may18:10
niemeyerwrtp: Sure, but we don't have to wait until later to fix the flag name18:10
wrtpniemeyer: sure, but DevVersion, NewestVersion, and CompatVersion would work ok18:10
wrtpniemeyer: as orthogonal flags18:11
wrtpniemeyer: CompatVersion to be added later18:11
niemeyerwrtp: Compat is the behavior you're introducing right onw18:11
niemeyerwrtp: The lack of Compat is what will come later18:11
wrtpniemeyer: ah, so maybe we should make the flag opposite in meaning18:12
wrtpniemeyer: AllowIncompatibleVersion :-)18:12
niemeyerwrtp: I don't see why.. the three flags above look nice and are orthogonal as you suggest18:12
wrtpniemeyer: if i add the flag now, then i have to add loads more tests, and i'd prefer not to for the time being. there are so few calls to BestVersion and FindTools that it's trivial to add CompatVersion later18:13
wrtpniemeyer: (like about 4 calls)18:13
niemeyerwrtp: Sorry, I don't get it.. you don't need any new tests in addition to what you'd have anyway18:13
niemeyerwrtp: I'm not suggesting you change the logic, I'm suggesting we have the real flags we want since there's zero cost in that18:14
wrtpniemeyer: yes, i have to test what happens when that flag is *not* specified18:14
niemeyerwrtp: if flag not specific { panic("not yet") }18:14
niemeyerwrtp: !?18:14
wrtpniemeyer: ok, i'll do that18:14
niemeyerwrtp: Cheers18:16
wrtpniemeyer: https://codereview.appspot.com/6500052/18:36
wrtpniemeyer: i apologise for the size - i haven't had time to split it into several CLs.18:36
wrtpniemeyer: i have to go now. see you tomorrow!18:37
niemeyerwrtp: np, I'll try to have it reviewed before the EOD18:37
niemeyerwrtp: Have a good evening18:37
wrtpniemeyer: that would be marvellous!18:37
mrammsent an e-mail about the sprint19:29
mrammplease book travel as soon as you can (and definitely before the weekend!!!) to save costs19:30

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