/srv/irclogs.ubuntu.com/2013/07/29/#juju-dev.txt

bigjoolswallyworld_, thumper: should have you a working maas in about an hour, need to download 300MB of updates and re-commission nodes00:41
wallyworld_rightio00:42
* thumper noticed that the ubuntu edge igg has stalled just under 7m01:39
thumperbigjools: if you could fling wallyworld_ and me the details for the environments.yaml file, that'd be swell (when it's ready)01:40
bigjoolsI will01:40
davecheneywhat is a MIR ? https://blueprints.launchpad.net/ubuntu/+spec/servercloud-s-mongodb01:46
* thumper looks01:48
thumperdavecheney: where is MIR mentioned?01:49
thumperah01:50
thumperMain Inclusion Request01:50
thumperAFAIK01:50
thumperat least that is what I think it is01:50
davecheneyI only know MRE01:51
thumperwhich is?01:51
davecheneyMeals Ready to Eat01:52
thumperhaha01:54
thumperwallyworld_: I noticed today that when I started up a second machine on ec2, and it had two ccontainers on it01:56
thumperwallyworld_: when the lxc provisioner task started, it didn't get told about the new containers01:56
thumperso they never started01:57
thumperthe two containers on machine 0 started01:57
thumperbut their machine agent would have been running first01:57
bigjoolsthumper: which ssh key of yours should I put on here?01:57
thumperwhereas the machine 1 would have been booted after the two containers in state01:57
* thumper looks01:57
wallyworld_it should have queried state01:57
thumperwallyworld_: I agree, it should have01:58
thumperwallyworld_: but it does that by starting the watcher01:58
wallyworld_you think this is a new bug?01:58
thumperwallyworld_: what I'm saying is that something is screwy there01:58
thumperprobably01:58
thumpermay need some more poking01:58
wallyworld_afaik the watcher returns the inital state of play01:59
thumperyes it should01:59
thumperbut it seems in this case, it didn't01:59
thumperI probably need some extra tracing...01:59
wallyworld_so i wonder what has changed. i can't recall any of us touching this stuff01:59
thumperno01:59
thumperbut the machine agent has had some messing around with the state -> api stuff recently01:59
wallyworld_hmmmm02:00
thumperalso, general watchers have seen change since this worked before02:00
bigjoolsthumper: ?02:00
thumperbigjools: I dm'ed you the key02:00
bigjoolsah nm got it02:00
bigjoolswas looking on LP  and you have loads02:00
thumperyeah02:00
thumperjake is the current machine02:00
thumperelwood was the last one02:00
bigjoolsjake is my eldest twin's name02:01
thumper:)02:01
thumperwhat did you call the other?02:01
bigjoolshe's getting better, thank goodness02:01
bigjoolsHarley02:02
thumperyou missed an opportunity there02:02
bigjoolss/missed/avoided/02:02
thumperthere was a funny facebook message the other day about nature names02:02
thumperDragonhunter FTW02:02
bigjools /o\02:02
thumperluckily for the children, i can't have any more02:03
thumperunless advances in stem cell research changes things02:03
jtvthumper: any chance you could review this branch for me: https://codereview.appspot.com/11923043/ ?02:43
thumperjtv: there is always a chance02:43
* jtv rolls dice02:43
jtvdavecheney: my information is that MRE stands not for Meal Ready to Eat, but Meal Rejected by Ethiopians.02:44
* thumper starts reviewing02:55
thumperdone, school pickup, back shortly03:01
* thumper considers a branch that allows setting log levels remotely03:26
axw*sigh* gotta go see the neighbour, fence fell over03:45
axwbbs03:45
thumper:(03:54
=== thumper is now known as thumper--afk
=== tasdomas_afk is now known as tasdomas
rvbaMorning guys… I've got a tiny branch up for review… in case someone is free to review it: https://codereview.appspot.com/11913043/07:38
TheMuemorning07:58
axwmorning07:59
rogpeppervba: reviewed08:00
rogpeppeaxw, TheMue: mornin'08:00
rvbaThanks a lot rogpeppe.08:01
axwhey rog08:01
=== TheRealMue is now known as TheMue
rogpeppedimitern, fwereade: thanks for the reviews; responded. https://codereview.appspot.com/11932043/09:07
dimiternrogpeppe: me too :) (replied to one of your comments)09:12
rogpeppedimitern: i like the idea of reusable constructs for writing tests, but not when using them is more work than doing the basic version.09:13
rogpeppedimitern: i don't think statetesting.AssertStop gains us anything at all09:14
dimiternrogpeppe: how can it possibly be more work?09:14
dimiternrogpeppe: don't you use code completion? :)09:15
rogpeppedimitern: is that why it's less work?09:15
rogpeppedimitern: it's also less obvious than the basic version09:15
rogpeppedimitern: and i like to keep test code as simple as possible09:15
rogpeppedimitern: it should really be called AssertThatStopSucceeds09:16
dimiternrogpeppe: ohh..09:16
dimiternrogpeppe: :) well, ignore me then, but my point was to enforce consistency when possible09:17
dimiternrogpeppe: otherwise each module can be its own world because it makes sense there and then, rather than having a codebase-wide uniformity09:17
jtvHi folks — how's tarmac doing today?09:18
dimiternjtv: still dead i think09:18
* jtv wipes away tear09:18
jtvDid I hear mention of a workaround?09:19
rogpeppedimitern: Assert(x.Stop(), IsNil) seems about evenly balanced with AssertStop in the code base09:19
dimiternjtv: manual landing09:19
jtvI don't think I have privileges for landing.  :(09:19
dimiternmgz: can you explain jtv about how can he land his code manually?09:19
* rvba listens09:20
* jtv turns on the water heater in anticipation09:20
dimiternrogpeppe: and if it was s.AssertStop(c, w) would it be better?09:20
rogpeppedimitern: not really.09:20
rogpeppedimitern: i like to see the Stop call directly in the code.09:21
dimiternrogpeppe: so you're not complaining about the length of the idents09:21
jtvFWIW for me as an outsider, Assert(x.Stop(), IsNil) is a lot easier to understand.  Might I suggest a compromise of "AssertStopSucceeds"?09:21
rogpeppedimitern: not really. just the fact that it's a single line of code which i think is clearer written out each time than calling a function to do it09:22
dimiternrogpeppe: how about statetesting.AssertCanStopWhenSending then?09:22
rogpeppejtv: exactly.09:22
rogpeppejtv: thanks09:22
fwereaderogpeppe, dimitern: fwiw you can also defer AssertStop without dropping errors on the floor09:22
dimiternfwereade: ah! very good point09:22
rogpeppefwereade: now *that* is a good reason for using it09:22
fwereaderogpeppe, dimitern: and once you're using it in one place you may as well keep doing so IMO09:22
dimiternexactly09:23
dimiternjtv, rvba: well don't know if mgz is around, but basically the process goes as follows09:23
fwereaderogpeppe, dimitern, jtv: and while we're bikeshedding -- AssertCleanStop?09:24
jtvThe hard part is expressing both the side effect and the assertion.09:24
rogpeppejtv: yeah09:25
dimitern1) switch to trunk, 2) pull, 3) bzr merge lp:~user/juju-core/yourbranch, 4) go build ./... && go test ./... (in juju-core/), 5) if all pass (and assuming no live testing is needed), 6) commit locally, setting the commit message as in LP, 7)bzr push bzr+ssh://go-bot@bazaar.launchpad.net/~go-bot/juju-core/trunk09:25
dimiternjtv: rvba ^^09:25
dimitern8) set MP to Merged + set revision in LP09:26
mgzdimitern: I odn;t think red squad have hte bot creds09:26
dimiternstep 7) requires you to have access to go-bot's branch09:26
mgzor rather, red squad's ssh keys aren't on the launchpad bot accout09:27
dimiternmgz: ah, right, but did i summarize it well?09:27
mgzypu09:27
jtvdimitern: thanks, that push URL was the part I was missing of course.09:27
jtvShould I give it a try anyway?09:27
mgzyou can bzr info i09:28
mgz*it09:28
dimiternjtv: perhaps after all is done, you could push it to lp:~user/juju-core/trunk and let me or mgz push it to trunk for you until the ssh keys are sorted09:28
mgzrunning the test suite after merge and setting commit message in the mp will do09:29
mgzI can land pretty easily after that09:29
jtvmgz: "bzr info" says permission denied.  :(09:30
mgzright.09:30
jtvBut yes, I guess I could just merge all my approved branches into a personal trunk for the time being.09:30
jtvI think bzr has just implemented netsplits.09:30
mgzoh, that would work too09:30
jtvI thought that was what you meant when you said "push it to lp:~user/juju-core/trunk".. ?09:31
jtvSorry, what Dimiter meant.09:31
mgzwell bundling lots of changes up there saves some time09:32
* fwereade_ is going to try to find somewhere with coffee, bbiab09:33
dimiternjtv: but please, get in line so we won't introduce conflicts/breakages09:34
dimiternideally, after bzr pull on trunk, run go build ./... && go test ./... before starting to merge to make sure trunk is sane09:34
rogpeppeperhaps we could make lbox submit work again for the time being09:34
dimiternrogpeppe: I don't think this is a good idea09:35
rogpeppedimitern: ok09:35
dimiternrogpeppe: doing it manually will enforce some discipline and when the bot comes it'll be easier to switch09:36
rogpeppedimitern: at least lbox submit checks that the code builds and is gofmt'd09:36
jtvdimitern: no need for that command line when just the age-old conventional "make check" will do.  :-)09:36
jtvIt has the added advantage of giving clear failure output at the end if the tests failed.09:36
jtvWith the manual command, any test failures may have scrolled out of view.09:37
jtvOr "make build check format" to combine building, testing, and formatting.09:38
jtvAnybody willing to review https://codereview.appspot.com/12018043 ?09:43
dimiternjtv: i'll take a look09:43
jtvThanks09:44
TheMueAnd another review from my side: https://codereview.appspot.com/11910043/ ?09:45
jtvLooking09:45
jtvOh, I already approved that one so I don't qualify.  :)09:46
dimiternTheMue: will take a look after jtv's review09:47
TheMuedimitern: great, cheers09:48
wallyworld_fwereade_: making a juju validate super command didn't work out very well. there were a number of dead ends, especially wrt flag processing for sub commands. the juju cmd infrastructure is really only designed for only one level of sub command off juju. so it will be easier just to land as is for now10:01
rogpeppedimitern: i got this error trying to push to trunk as suggested:10:02
rogpeppebzr: ERROR: Server sent an unexpected error: ('error', 'AppendRevisionsOnlyViolation', 'Operation denied because it would change the main history, which is not permitted by the append_revisions_only setting on branch "chroot-74851280:///~go-bot/juju-core/trunk/".')10:02
dimiternjtv: reviewed10:02
rogpeppeanyone got any idea what that error means?10:03
jtvThanks dimitern10:03
mgzrogpeppe: you messed up the merge :)10:03
dimiternrogpeppe: hmm, not really - perhaps mgz or some lp/bzr guys?10:03
rogpeppemgz: ok, so *how* did i mess up the merge?10:04
jtvMight it mean that somebody pushed something during your pull/merge/commit/push?10:04
mgzif for instance you merge trunk into your branch, then try pushing your branch over trunk, you get10:04
jtvWhich then wouldn't be in the revisions you were trying to push?10:04
rogpeppejtv: i'd have expected a "branch has diverged" error in that case10:04
mgzyou have all the revs, history hasn't diverged, but you rearranged it's order10:04
rogpeppeah, i know what i did wrong!10:04
axwif anyone cares about debug-hooks, I've got it working now: https://code.launchpad.net/~axwalk/juju-core/lp1027876-implement-debug-hooks/+merge/17735310:05
axwI'll add more tests tomorrow, and hopefully propose it10:05
jtvThanks for the review dimitern10:05
rogpeppei forgot to pull from trunk before merging10:05
dimiternjtv: yw, tried to adhere to the way you prefer reading them :)10:06
rogpeppeaxw: nice one!10:06
jtvdimitern: I noticed.  Thoughtful of you — it really helps.10:07
axwgtg, night folks10:07
jtvnn axw10:08
dimiternjtv: it's strange that even though I put a blank line before every comment, not all of them appear like that in the mail10:08
jtvNo, Rietveld is sneaky and likes to remove them when you edit them.10:08
dimiternjtv: aahh! good to know10:08
TheMuedimitern: seen your s/.  Foo /. Foo/ statements in a review. it seems to be a convention for some of us to use two spaces after a point. i already wondered too.10:11
dimiternTheMue: That's madness :)10:12
dimiternTheMue: the only way I've seen this happen is when I use M-q in emacs to auto-format and align a comment block10:12
TheMuedimitern: dunno, maybe it's normal in some countries. but not in Germany.10:12
TheMuedimitern: ah, emacs, may be a reason.10:13
dimiternTheMue: when you have // ...something.\n// something else. M-q will make it // ...something.  something else.10:13
dimitern(2 spaces after the .)10:13
TheMuedimitern: strange behavior, would like to know the reason10:14
dimiternTheMue: perhaps, as with everything in emacs, it's configurable, but I don't know10:18
jtvIt's something I learned in my typing course.  I find it greatly helps legibility, especially with the weird stuff we type with lots of dots that aren't full stops.10:19
dimiternha! I found it10:19
dimiternit's called "sentence-end-double-space", and if set to nil won't do it10:20
jtvThere is a rant on the internet that says it's nonsense, and people who oppose double-spacing invariable point to it with no more than the implication that since it's on the internet, it's the unassailable truth.10:20
jtvThe rant starts out with a few inobtrusive assumptions:10:20
jtv(1) There is no such thing as monospace fonts, anywhere in the world, ever.10:21
dimiternLOL10:21
TheMuehehe10:21
dimiterni'd stop reading after (1) :)10:21
dimiterni know possibly only one person ever who used proportional fonts while editing code10:21
jtv(2) Software such as LaTeX can reliably tell the difference between a dot and a full stop, despite the fact that it regularly needs help telling them apart.10:22
rogpeppedimitern: :-)10:22
rogpeppedimitern: i know quite a few :)10:22
jtvSo do I...  Never could quite bring myself to try it.10:22
jtvShould I proceed with assumption (3)?10:22
dimiternwhy try it - it's *evil*10:22
rogpeppedimitern: ha ha10:23
rogpeppedimitern: you get more legible text in less space. what's not to like?10:23
jtvSometimes I think I'd like an IDE to render unformatted block comments as flowing, proportionally-kerned text.10:23
TheMueFunnily Smalltalk environments often use non-monospace fonts and still format their methods (because that's what you see in the code browser) in a very  aesthetic way.10:23
jtvSmallTalk.  So far ahead the rest of the world will never catch up.  :)10:23
TheMuejtv: Smalltalk, not SmallTalk :P10:24
dimiternreading fiction and reading code is quite a different thing and requires different focus10:24
jtvI believe it.10:24
TheMuejtv: A wonderful language for some domains, sadly very bad regarding concurrency and distribution. *sigh*10:24
dimiternwhen i'm reading code I notice characters, then words, in fiction, I rarely notice such things, because they won't induce a compile error :)10:25
TheMuedimitern: NOT? *rofl*10:25
jtvMaybe "fiction" is not quite the right word.10:25
jtvBecause some code is fictional, and much non-code writing is nonfiction.10:25
dimiternok then, natural text?10:25
jtvSure.10:25
jtvRunning text.  Human-readable text.  Prose.10:25
jtv(Prose isn't so good because it raises the question: what about poetry?)10:26
TheMueIsn't code pure ficction? The idea of something that happens? :D10:26
jtvNo, in code we oppose a sea of troubles and by opposing end them.10:26
jtvWhich I feel is nobler in the mind than suffering the guns and roses of outrageous fortune.10:27
TheMueAnd introduce new troubles.10:27
jtvI don't think the Bard mentioned secondary bugs.10:27
dimiternreminds me of wordpress' moto "code is poetry" :)10:27
jtvThen again, he didn't actually say "guns 'n' roses" either.10:28
jtvAll code should be in dactylic hexameter.  That'll stop idiots from knocking out crud without thinking.10:28
jtvQuidquid id est timeo danaos et dona  ferentes.10:28
TheMueOuch10:28
dimitern:D10:29
TheMueNext round: Isn't LISP the pure incarnation of poetry?10:29
TheMue*duck*10:29
dimiternI prefer Scheme10:29
TheMuedimitern: me too10:30
jtvCommon Lisp!  Variables!10:30
dimiternwhy do you need variables when you have lambdas? :)10:30
jtvIch weiß nicht was soll es bedeuten / das ich so traurig bin / eine Routine aus ur-alten Zeiten...10:30
dimiterneven I got most of this10:31
TheMuejtv: Hey, wow10:31
dimiternit my poor german10:31
jtvTheMue: sorry, didn't mean to insult your cultural heritage.  :-)10:31
dimitern*with10:31
jtvBut I do feel like that sometimes when I read ancient functions.10:32
TheMuejtv: no problem, only have been surprised10:35
rogpeppetrivial CL (func rename and arg reorder) https://codereview.appspot.com/12021043/10:35
dimiternTheMue: reviewed10:35
jtvTheMue: what surprised me is that quite possibly the most beautiful German I've ever heard was an American reciting that poem off the cuff...10:36
TheMuedimitern: cheers10:36
TheMuerogpeppe: question about godoc10:36
rogpeppeTheMue: go on10:36
TheMuerogpeppe: the line break after // ...directory. (line 54 in upgrader.go).10:37
TheMuerogpeppe: will it be visible in the godocs too? your intention seems to be a paragraph, isn't it?10:37
rogpeppeTheMue: godoc will reformat the whole thing into one paragraph10:37
rogpeppeTheMue: i should probably cfmt the comment10:38
jtvrogpeppe: you have my vote.10:38
rogpeppejtv: thanks10:38
TheMuerogpeppe: that's what I expected.10:38
TheMuerogpeppe: won't an empty line render as a new paragraph?10:38
rogpeppeTheMue: yes10:38
rogpeppeTheMue: i didn't really intend them to be different paras10:39
TheMuerogpeppe: ah, ok10:39
TheMuerogpeppe: reviewd10:39
rogpeppeTheMue: thanks10:39
* TheMue => lunch11:03
mgzhm, no mail since friday, must be imapclean day11:03
rogpeppeanother pretty trivial CL: https://codereview.appspot.com/1202504311:05
dimiternrogpeppe: does the upgrader now use the API?11:09
rogpeppedimitern: yes11:10
rogpeppedimitern: although cmd/jujud doesn't yet use worker/upgrader11:10
dimiternrogpeppe: ok (updating the blueprint)11:10
dimiternrogpeppe: also, you've got a review11:10
rogpeppedimitern: thanks11:10
natefinchHi all. In theory I am joining the juju dev team today, though HR/IT/whoever has not actually given me any login information. So I figured I'd just come here and say hi.11:22
dimiternnatefinch: hey! welcome aboard!11:24
dimiternnatefinch: so you'll be working on juju-core or on some related project, like the gui, etc. ?11:25
fwereade_natefinch, welcome!11:26
natefinchHi, thanks.  You'll have to forgive me if I am not up on my IRC skills... it's been... oh god, like 15 years since I was last on irc, in college.11:26
natefinchI'll be on juju-core, from what Mark Ramm said11:27
fwereade_natefinch, not to worry :)11:27
fwereade_dimitern, hey, did the last one we released actually use the api for the machiner? or did that not get in in time?11:28
dimiternfwereade_: I think it did11:28
fwereade_dimitern, oh bugger11:29
fwereade_dimitern, ah well, not to worry11:29
natefinchmramm:  Morning, Mark. This appears to be the only place I can access currently, FYI.11:31
mrammok11:31
dimiternfwereade_, rogpeppe, wallyworld_: standup11:32
wallyworld_i would if the stupid google plugin would upgrade11:33
TheMuenatefinch: heya, welcome here in the channel too11:33
dimiternnatefinch: if you want to join the daily standup: https://plus.google.com/hangouts/_/f497381ca4d154890227b3b35a85a985b894b47111:33
natefinchawesome, thanks11:33
natefinchTheMue: plugin installing... forgot I hadn't done that yet11:34
ehghope i'm not intruding, but is there anyway to do https://bugs.launchpad.net/juju-core/+bug/1089291 manually atm? like modifying the mongo db?11:43
_mup_Bug #1089291: terminate-machine --force <juju-core:Triaged> <https://launchpad.net/bugs/1089291>11:43
mgzmramm, natefinch: IS has the ticket for nate's new staff task, but it seems no one is on to get started with it yet.11:54
natefinchalexlist is giving me a hand11:55
mrammmgz: yea I see nobody is on vanguard yet11:55
mgzace, if alex is handling it that's fine.11:55
alexlistNobody around until deej starts working today ... looks very holiday-ish today ...11:56
* dimitern lunch12:09
mgzdear go, have working juju on lcy02 finally12:37
mgzthat was painful12:37
rogpeppelunch13:16
mgzwarning all, the bot is up but not yet tweaked into happiness13:27
mgzI'll mail the list when I get it rolling properly again13:27
TheMuemgz: thanks for your effort already13:43
rogpeppefwereade_: how about this for an API in common to both the machine and unit agent? http://paste.ubuntu.com/5925443/14:30
fwereade_rogpeppe, LGTM14:31
rogpeppefwereade_: thanks14:31
=== tasdomas is now known as tasdomas_afk
fwereade_rogpeppe, are you likely to be implementing a state.Agent interface roughly matching that? because I find myself heading in a very similar dirction, I think15:03
rogpeppefwereade_: i've just done the front end bits. i'm just about to do the server side.15:04
rogpeppefwereade_: i'm not sure quite what you mean by the state.Agent interface15:04
fwereade_rogpeppe, as Authenticator, Remover, Lifer, whatever15:04
fwereade_rogpeppe, ISTM that making unit and machine's agenty methods accessible via a State.Agent() call using state.entity() would fit nicely15:05
rogpeppefwereade_: perhaps. i'm not sure.15:05
rogpeppefwereade_: i thought i might do Jobs as a special case15:05
rogpeppefwereade_: as it doesn't really make sense to implement Unit.Jobs15:05
rogpeppefwereade_: the other methods aren't really Agent - they're *used* by the agent API, which i think is a bit of a different thing15:06
fwereade_rogpeppe, fwiw I think that "a unit is an agent with just one job" is quite a neat model15:06
rogpeppefwereade_: i considered it, but i don't think it helps much15:06
fwereade_rogpeppe, and remeber this isn't about how the API looks, it's about how it's convenient to present state to the API layer for clarity/convenience15:07
rogpeppefwereade_: it makes the unit agent code more complex (what's the point of having a Jobs method that you don't consult?)15:07
fwereade_rogpeppe, it eliminates the distinction between machine and unit agent15:07
rogpeppefwereade_: ah, is that your intention?15:08
fwereade_rogpeppe, except we're talking about different things still15:08
fwereade_rogpeppe, long-term, maybe15:08
fwereade_rogpeppe, but the jobs thing seems like the biggest issue15:08
rogpeppefwereade_: it seems pretty trivial to me15:08
rogpeppefwereade_: i'd just put a dynamic type check in the Job API entry point15:08
fwereade_rogpeppe, indeed, and so "an agent is a thing that runs jobs on behalf of some entity" becomes an nice clear accurate explanation15:09
rogpeppes/Job/Jobs15:09
rogpeppefwereade_: i like the fact that the unit agent code is simpler than the machine agent code15:09
rogpeppefwereade_: because it doesn't need to inspect dynamic jobs to run15:09
fwereade_rogpeppe, but the thing I'm thinking about today is state.Agent, which would have a whole bunch of methods used by various bits of the api, eg uniter machiner upgrader15:10
fwereade_rogpeppe, if that's not on your mind then all the better, we won't collide and you can see if you like it when I propose ;)15:11
rogpeppefwereade_: i think it's probably better to have separate interfaces for each piece of the API15:11
rogpeppefwereade_: rather than one agent interface to rule them all15:12
rogpeppefwereade_: tbh i'd prefer it if each of those interfaces was defined in the respective API server package15:12
rogpeppefwereade_: rather than in state15:12
rogpeppefwereade_: i think that matches Go's post-hoc interface definition idiom better15:12
fwereade_rogpeppe, I am not talking about the interfaces exposed by the API, I am talking about the interfaces exposed *to* the API15:12
rogpeppefwereade_: that's what i'm talking about too15:13
rogpeppefwereade_: i don't think the state package should need to second-guess the interfaces needed by the APIs built on top of it15:14
fwereade_rogpeppe, in my mind, it's not second-guess, it's responding to clear need15:14
rogpeppefwereade_: it's unnecessary - each of those API packages can define their own interface to abstract out the relevant parts of the state package15:15
rogpeppefwereade_: AFAICS15:15
rogpeppefwereade_: of course, state needs to define interfaces when it actually returns those interfaces (e.g. Lifer), but i'm not sure that it needs to know about Agent, for example. that seems like something built on top of it, at a different level.15:17
rogpeppefwereade_: but i'm interested to hear your take on it too15:17
fwereade_rogpeppe, I dunno, I think that the agent concept is already more than a little embedded in state15:18
fwereade_rogpeppe, AgentTools15:18
fwereade_rogpeppe, SetAganetAlive15:18
fwereade_er whatever15:18
rogpeppefwereade_: yes, there are bits and pieces15:18
fwereade_rogpeppe, I think that collecting them together will actually be pretty clear15:19
rogpeppefwereade_: as is necessary - those are pieces of agent-specific state15:19
rogpeppefwereade_: calling the interface "Agent" is wrong though15:19
rogpeppefwereade_: perhaps AgentEntity15:19
rogpeppebut i don't like that either15:20
fwereade_rogpeppe, like LiferEntity and UAuthenticatorEntoty today, you mean ;p15:20
fwereade_god my typing is shot today15:20
rogpeppefwereade_: you started to remind me of an ex-coworker who had notoriously bad typing :-)15:20
rogpeppefwereade_: Lifer defines an object with a Life method15:21
rogpeppefwereade_: Authenticator defines an object with authentication methods15:22
rogpeppefwereade_: Agent would *not* define an object with agent methods15:22
rogpeppefwereade_: but it would simply have some methods that happen to be used by agents15:22
rogpeppefwereade_: and i don't really see why that interface should be defined in state itself.15:22
rogpeppefwereade_: in general we don't predefine all possible interfaces in Go, but leave it up to the client code to do that.15:23
fwereade_rogpeppe, the distinction between "agent methods" and "methods that happen to be used by agents" does not seem to me to present an overwhelming practical difference15:23
fwereade_rogpeppe, ISTM that if we do that we end up with the funky downcasting we already have in apiserver15:24
rogpeppefwereade_: they're totally different. an agent method would be something like MachineAgent.Run.15:24
fwereade_rogpeppe, "meh, everything we're calling here will have hat method, let's just use a Lifer"15:24
fwereade_rogpeppe, what we're getting kinda needs to be defined at the state level15:25
fwereade_rogpeppe, lots of little interfaces make sense where overlap is limited15:25
fwereade_rogpeppe, bigger interfaces also make sense where there's a lot of overlap, I think15:25
fwereade_rogpeppe, *even if* and given client of an Agent uses only one or two methods on it15:26
fwereade_s/and/any/15:26
fwereade_rogpeppe, anyway, I'm going to go and see if the plan comes off coherently anyway ;p15:27
fwereade_rogpeppe, cheers15:27
dimiternfwereade_, rogpeppe: https://codereview.appspot.com/12034043 - names package15:27
rogpeppefwereade_: ok15:27
dimiterna lot of files are changed, but most changes are just renames15:28
rogpeppedimitern: i think i'd put all the code into one file in names - i don't think the sizes are big enough to justify the separate files, and i'd find it easier to read like that.15:29
dimiternrogpeppe: i could do that, but I think separation is a good thing15:30
rogpeppedimitern: why so?15:30
rogpeppedimitern: i don't see that it helps anything really15:30
rogpeppedimitern: other than meaning i need to flip back and forth to see what things are referring to15:31
dimiternrogpeppe: we could expand it later to include more stuff15:31
rogpeppedimitern: we could split it into multiple files as appropriate if that happens15:31
rogpeppedimitern: i find it much easier to see the whole lot on a single page15:31
dimiternrogpeppe: then check LP's diff :)15:31
rogpeppedimitern: what about it?15:32
dimiternrogpeppe: but seriously, I'm not insiting on it staying like this - fwereade_ what do you think?15:32
rogpeppedimitern: if nothing else, the related constants should go into the relevant files.15:33
dimiternrogpeppe: this makes more sense to me, ok15:33
fwereade_dimitern, rogpeppe: I rather liked the bite-size nature of those files15:33
fwereade_dimitern, rogpeppe: well, maybe, having all the constants in one place also has its benefits15:34
rogpeppefwereade_: really?15:34
fwereade_dimitern, rogpeppe: I found it very easy to absorb that package as it was15:34
dimiternrogpeppe: once it lands, using godef to jump to each definition is trivial15:34
rogpeppefwereade_: i found myself flipping back and forth between constant and code15:34
fwereade_dimitern, rogpeppe: the conceptual dividing lines are clear, and the simplicity of each chunk is also pretty clear IMO15:35
rogpeppefwereade_, dimitern: constants.go blurs the conceptual dividing line15:35
fwereade_rogpeppe, dimitern: the question is kinda what to do about the bits that are common15:35
rogpeppefwereade_: what bits?15:36
fwereade_rogpeppe, dimitern: numbers, service names15:37
dimiternrogpeppe: having separate constants.go made sense when I did it, but as I said, I can move them into their relevent files instead15:37
fwereade_dimitern, rogpeppe: I would be fine with that though15:37
dimiternrogpeppe: not all of them are specific, some are common15:37
rogpeppefwereade_: if we're staying in separate files (which i can live with) then service.go seems like the right place for service names15:37
fwereade_dimitern, rogpeppe: OTOH, unit.go will use it too, and one day perhaps relation.go15:38
dimiternrogpeppe: how about NumberSnippet and others, which are used more than once?15:38
rogpeppealthough a whole file for a 3 line function does seem like overkill15:38
fwereade_dimitern, rogpeppe: having one file that describes in a very compact way all the data, and one file per entity that handles the tedious manipulation of each kind, seems to me like a reasonable balance15:39
dimiternrogpeppe: it's better so separate them early, rather than ending up with a monstrous module like state15:39
fwereade_dimitern, rogpeppe: but I'm happy calling dealer's choice on this, this is the very definition of a bikeshed15:39
rogpeppei'd really like to see the whole lot in one place, but perhaps i'm old fashioned like that. i never programmed in java.15:39
rogpeppedimitern: for NumberSnippet, i'd just choose an arbitrary place15:40
dimiternyeah, I forgot to say <bikeshed> earlier (until we reach an agreement </bikeshed> ) :)15:40
rogpeppedimitern: nicer to have the rest of the constants nearer to where they're used15:40
dimiternrogpeppe: so compromise: having common bits in constants.go and entity-related stuff in their respective files?15:41
rogpeppedimitern: i guess.15:42
rogpeppedimitern: 115 lines doesn't seem like too much for a file though.15:44
rogpeppe</bikeshed>15:44
dimiternrogpeppe: "divide and conquer" wasn't invented for java15:45
dimiternrogpeppe: it's generally a good practice for structuring code I think15:45
* rogpeppe prefers each file to be worth its weight15:46
dimiternrogpeppe: how big a file should be at least?15:47
dimiternrogpeppe: is less than 50 lines the limit? or 20?15:47
rogpeppedimitern: it totally depends15:47
dimiternrogpeppe: of course15:47
rogpeppedimitern: in this case, i think everything would fit very neatly into one file, and the common patterns in the code would be more evident that way15:48
dimiternrogpeppe: and mixing responsibilities in the same place is a bad idea for the sake of having less files imho15:48
rogpeppedimitern: all this code is doing a very similar thing. that for me is a good indicator that it belongs together.15:49
dimiternrogpeppe: not really, the packge has very well defined goal, that's why it looks like that15:49
rogpeppedimitern: whatever15:49
rogpeppedimitern: i didn't mean this to turn into a bikeshed argument15:50
rogpeppedimitern: i've stated my preference15:50
dimiternrogpeppe: ok15:50
dimiternrogpeppe: let's agree to disagree on that one15:51
dimiternrogpeppe: :) no need to argue about minor stuff like this15:51
rogpeppedimitern: yeah15:51
rogpeppedimitern: one thought: instead of returning (string, error), i'm wondering if (string, bool) might be better15:51
rogpeppedimitern: i dunno though15:52
dimiternrogpeppe: I was thinking about it, but we already have Is*(string) bool, and most of the code that handles externally received strings is using it15:52
rogpeppedimitern: yeah15:53
dimiternrogpeppe: only a few places expect to pass a tag and get and id/name, which is wrong I think - the tag should be checked before15:53
dimiternrogpeppe: and moreover, not checking the format and getting an error allows you to "defer the responsibility" of deciding what to do to your caller15:55
rogpeppedimitern: yeah - it's just the single error thing - when there's only one kind of expected error, i wonder if a bool is more useful15:56
dimiternrogpeppe: I could do that, but then in the few cases when there's a possible error, we have to define and return that error, so potentially it creates a bit of duplication15:57
dimiternrogpeppe: in the place it was called15:57
=== natefinch is now known as natefinch-lunch
rogpeppedimitern: yeah, that's true. i have mixed feelings.15:58
=== natefinch-lunch is now known as natefinch
mgzcan I have some help working out what my last batch of test failures on the bot relate to?16:12
mgzhttps://code.launchpad.net/~themue/juju-core/035-bootstrap-autosync/+merge/177119/comments/399419/+download16:15
mgzone is obvious...16:15
mgzI guess the others may be related?16:15
TheMuemgz: that branch is not yet approved16:16
mgzI've been approving it as a test16:16
mgz..is it not approved as in I should be approving it?16:16
mgzI thought it was the one you wanted to land...16:16
mgzno harm done if so, but I guess I should have used a less-real branch16:17
mgz^*shouldn't16:17
TheMuemgz: I have to land changes first;)16:18
mgzokay, I'll stop using that as a g-pig16:19
TheMuemgz: the BootstrapSuite now show a failure it hadn't before :(16:19
mgzI'm proposing a trivial branch I can test with instead16:28
mgztook too long to find a comment change, darn william and rog being native english and not screwing up grammar enough16:28
rogpeppedimitern: reviewed16:28
dimiternrogpeppe: cheers16:29
mgzand bah, we've broken 1.0 compat again16:29
* mgz adds the ppa16:30
mgzmuh, and it doesn't pass go fmt16:33
mgzrogpeppe: how did you manage that?16:33
rogpeppemgz: perhaps i ran a different gofmt on it16:33
mgzI guess that's my trivial change to land16:34
rogpeppemgz: gofmt passes ok against trunk for me16:34
mgzcompalins about trailing whitesapce on a comment for me16:35
rogpeppemgz: what gofmt are we using as standard?16:36
rogpeppemgz: i've been using go-1.0.2's gofmt for ages now16:36
mgz1.0.2 is good, but not if we also break 1.0.2 compat >_<16:36
rogpeppemgz: but go 1.1's does indeed complain about trunk16:37
rogpeppemgz: i thought gwacl had already broken 1.0.2 compat16:37
dimiternfwereade: ping16:38
rogpeppemgz: and yes, oops, i didn't test against 1.0.2 before submitting, and i missed a return statement16:38
fwereade_dimitern, pong16:38
fwereade_dimitern, blast, I should finish reviewing that16:38
dimiternfwereade: thanks :)16:38
fwereade_dimitern, quick question -- would dropping "Name" across the board lead to less stuttering? names.IsUnitName etc16:38
rogpeppefwereade_: i've made a bunch of comments which you might want to take in before you continue16:38
rogpeppefwereade_: that sounds good to me16:39
mgzI'm self-approving my trivial bot testing branch16:39
dimiternfwereade: makes sense16:40
dimiternTheMue: I can't see the changes you said you did?16:52
mgzokay, my one remaining test failure is commented by rogpeppe as bug 116398316:52
_mup_Bug #1163983: some tests take an unnecessarily long time waiting for the poll interval <tech-debt> <juju-core:Triaged> <https://launchpad.net/bugs/1163983>16:52
mgzis there anything I can do to mitigate that on the bot?16:52
dimiternmgz: what go version is the bot using?16:53
dimiternmgz: I think that failure is intermittent16:53
mgzfrom the ppa, 1.1.116:53
mgzbot has just hit it twice in a row...16:54
* mgz reapproves to see how consistent that is16:54
TheMuedimitern: not yet pushed16:55
dimiternmgz: it seems the issue is [LOG] 19.20390 ERROR juju worker: fatal "deployer": remove /etc/init/jujud-machine-3:unit-tarmac-0.conf: permission denied16:55
mgzthanks16:55
mgzthat seems like an isolation issue...16:56
dimiternmgz: seems likely, it the test should be creating /tmp/gocheck-*/etc/init or something16:58
* dimitern bbiab16:58
mgzblame on that change is you? :P16:59
mgz...there's nothing obviously wrong...17:02
mgzfiled bug 120619517:08
_mup_Bug #1206195: TestDyingMachine fails when unit agent is running on machine <juju-core:Confirmed> <https://launchpad.net/bugs/1206195>17:08
dimiternmgz: does it fail on your machine? on mine it doesn't17:20
mgzare you on a juj-deployed machine with a running unit-agent?17:20
dimiternwell, obviously not :)17:20
mgzI'd not expect it to break for you then :)17:21
dimiternhow does that matter?17:21
mgzbecause that's what the error is saying17:21
mgzthe test is trying to talk to the bot's unit-agent, which obviously tells it to sod off, confusing the test17:21
dimiternhow can this happen?17:22
mgzit really shouldn't :)17:22
mgz(I have no idea)17:23
dimiternis there a JUJU_* or ~/.juju/environments.yaml there?17:23
mgzin good news, the bot is now live again17:23
mgzdimitern: no.17:23
dimiternalive, like working properly?17:23
mgzyup.17:23
dimiternexcept for that issue above17:24
mgzI shall summarise to the list17:24
mgzthat issue is gone for now, I skipped out the test17:24
dimiterngreat! thanks17:24
dimiternhmm, ok, i guess for the time being that's acceptable17:25
=== natefinch is now known as natefinch-lunch
TheMuemgz: fantastic, thx17:29
dimiternfwereade: sorry to bug you again17:33
rogpeppe1dimitern, fwereade, anyone else interested: https://codereview.appspot.com/1203804517:44
rogpeppe1and i need another review of https://codereview.appspot.com/12025043/ please17:45
dimiternrogpeppe1: looking17:45
rogpeppe1that's me for the night17:45
rogpeppe1dimitern: ta!17:45
dimiternrogpeppe1: nn then17:45
rogpeppe1dimitern: it has the ChangeAgentTools CL mixed in unfortunately, but it's separate enough that i think it's ok for the time being17:48
rogpeppe1dimitern: 'cos i'd prefer to avoid a prereq17:48
dimiternrogpeppe1: no worries17:49
rogpeppe1right, i really am off now, to pick some peas from the garden17:49
rogpeppe1g'night all17:49
mgzokay, I'm done for the day, email me if stuff blows up18:00
=== natefinch-lunch is now known as natefinch
Beretcan someone bump the priority of https://bugs.launchpad.net/juju-core/+bug/1188126 please?18:33
_mup_Bug #1188126: Juju unable to interact consistently with an openstack deployment where tenant has multiple networks configured <canonistack> <juju:New> <juju-core:Triaged> <https://launchpad.net/bugs/1188126>18:33
=== tasdomas_afk is now known as tasdomas
sidneiuhm, anyone around that can take a look at https://bugs.launchpad.net/juju-core/+bug/1205112 ? it's blocking me :(20:50
_mup_Bug #1205112: panic while setting a config value <juju-core:Triaged> <https://launchpad.net/bugs/1205112>20:50
=== thumper--afk is now known as thumper
thumperhi sidnei21:00
thumpersidnei: I don't suppose you have made it reproducable on the local provider?21:01
* thumper woners which nick nate is21:01
thumperand I see he left 19 minutes ago21:02
thumperoh well21:02
thumperarosales: do you know how I can get access to the test MAAS?21:11
sidneithumper: well, i deployed a new service and got it again21:20
sidneithumper: i wonder if it's charm-specific21:20
thumpersidnei: could be a good bug for us to give to axw21:20
thumperhe seems to be hammering through them21:20
thumperI'll pass on the info when he gets on21:21
* thumper is attacking maas21:21
sidneithumper: i suppose there's nothing like pdb for golang?21:21
thumperfor a stack trace?21:21
thumperor to just stop21:21
sidneithumper: no, to step through21:21
thumperdepends how hard core you are21:21
thumperI have heard that there is a go part for gdb21:22
thumpernot tried it though21:22
sidneii've poked around gdb and pyframes once21:22
sidneii could just add some prints around the comparison line i guess21:23
thumperwhen in the SFO go meetup, someone asked what people used for debugging21:24
thumperprint statements was the common answer21:24
thumper:-(21:24
sidneiits choking on:21:24
sidneiif new == old {21:24
sidneicontinue21:24
sidnei}21:24
sidneiin settings.go21:24
thumperit seems to me, having not looked at the code...21:25
thumperthat it is failing to coerse the command line strings into int values21:25
thumperso comparing an int to a string representation of an int21:26
thumperare you changing an int value?21:26
thumperor numeric / bool21:26
thumperie. non-string21:26
sidneithumper: nope, it's a string21:39
sidneione of the commands was: juju set u1-stream host_environment_name=dc -e local21:40
sidneiand the error is:21:40
sidneipanic: runtime error: comparing uncomparable type map[string]interface {}21:40
sidneiim suspecting it might be choking on a previously set value21:40
sidneithe service was deployed with deploy --config <config.yaml>21:41
sidneithere was no error during deploy (at least in the command line)21:42
sidneiit seems only half of the values from the --config config.yaml got set21:42
andreas__guys, I got a "panic" from juju-core, is this a low memory situation? http://pastebin.ubuntu.com/5926829/21:46
=== andreas__ is now known as ahasenack
thumpersidnei: sounds very suspect21:46
thumperahasenack: possibly21:47
ahasenack500Mb RAM, no swap21:47
ahasenack2013-07-29 21:48:21 ERROR juju uniter.go:352 worker/uniter: hook failed: fork/exec /var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/install: cannot allocate memory21:48
ahasenackhah21:48
arosalesdpb1, looking at the bug 120546621:57
_mup_Bug #1205466: deploy charm uses cached copy even when all services are removed <papercut> <juju-core:Triaged> <https://launchpad.net/bugs/1205466>21:57
dpb1arosales: yup, need something?21:59
arosalesdpb1, nope sorry I was catching up on backscroll22:01
arosaleslooks like mramm already commented on this bug and discussed it here22:01
dpb1arosales: cool22:02
wallyworld_thumper: how's things?22:52
thumperotp22:52
wallyworld_ok22:52
thumperwallyworld_: hangout?23:12
wallyworld_sure23:12
wallyworld_https://plus.google.com/hangouts/_/f497381ca4d154890227b3b35a85a985b894b471?v=137471793223:13

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