[07:42] <rogpeppe> dimitern: mornin'
[07:42] <dimitern> rogpeppe: morning :)
[07:42] <dimitern> rogpeppe: say, where can I get the 'propose' command to setup lbox for goose?
[07:43] <rogpeppe> dimitern: i think you can just apt-get lbox, assuming you've added the right repository
[07:43] <rogpeppe> dimitern: except... what's goose?
[07:43] <dimitern> rogpeppe: the go openstack exchange - lp:goose
[07:44] <rogpeppe> dimitern: ah
[07:44] <rogpeppe> dimitern: have you already got lbox?
[07:44] <dimitern> rogpeppe: no, just apt-getting it
[07:45] <rogpeppe> dimitern: i think you can just use it - no setup required
[07:46] <dimitern> rogpeppe: ok, I got lbox now, but looking into juju-core, there's the .lbox file, containing: propose -cr -for lp:juju-core
[07:46] <rogpeppe> dimitern: that's actually optional, but you probably want to create it and commit it
[07:46] <dimitern> rogpeppe: if I create a similar one for goose in the root dir, it should be "propose -cr -for lp:goose" right?
[07:46] <rogpeppe> dimitern: yup
[07:47] <dimitern> rogpeppe: and then how do I actually use it? just run $ lbox propose ?
[07:47] <rogpeppe> dimitern: yeah. i usually do "lbox propose -wip" first, so i can look at the changes on codereview before sending mail to people
[07:48] <rogpeppe> dimitern: you might also want to copy the .lbox.check file
[07:48] <rogpeppe> dimitern: which makes some checks before allowing the proposal
[07:49] <rogpeppe> dimitern: in particular it doesn't allow you to propose code that's not gofmt'd
[07:49] <rogpeppe> dimitern: which is a Good Thing
[07:49] <dimitern> rogpeppe: ok, now after committing, running lbox propose -wip opens chrome at some lp authorize token url, which is blank..
[07:50] <rogpeppe> dimitern: hmm, nothing you can enter your lp id/password into?|
[07:50] <dimitern> rogpeppe: nah, just an empty Untitled page
[07:50] <rogpeppe> dimitern: weird. what has it printed?
[07:51] <rogpeppe> dimitern: lbox, that is
[07:52] <dimitern> rogpeppe: hmm.. it seems the chrome-unstable i'm using is borked today
[07:53] <dimitern> rogpeppe: in ff it works and asks what perms should I give to lpad
[07:53] <dimitern> rogpeppe: Change Anything?
[07:53] <rogpeppe> dimitern: i guess so
[07:55] <TheMue> God morning, gophers.
[07:57] <rogpeppe> TheMue: hiya
[07:57] <dimitern> rogpeppe: any idea why lbox is insisting on launching chrome, when ff is my default browser?
[07:57] <dimitern> TheMue: hey
[07:57] <TheMue> rogpeppe, dimitern: Hi.
[07:57] <rogpeppe> dimitern: no idea, sorry - it never launches any web browser for me
[07:59] <TheMue> dimitern: Interesting, here it also never opens any browser. You do a "lbox propose" and it opens?
[07:59] <dimitern> TheMue: I did propose -wip, and it says:  Go to your browser now and authorize access to Launchpad.
[07:59] <dimitern> Press [ENTER] after authorization is confirmed...
[08:01] <dimitern> TheMue: after which it opens a somehow broken chrome window with an authorize token link, but the page is empty, in fact any other page I try to open in the same chrome window is empty, but if I copy the url to firefox, it works and I authorized "lpad" there, but "lbox propose -wip" then still opens chrome!
[08:02] <TheMue> dimitern: That's indeed strange. Have to dig into my old notices how I authorized access to LP.
[08:06] <dimitern> TheMue: so, digging into lp:lpad's go source it seems it tries to call something called "sensible-browser" - never heard of it :) but that's the broken chrome
[08:06] <TheMue> dimitern: Me neither.
[08:12] <TheMue> dimitern: My notes sadly only say that lbox asks for access to LP. But it seems it found the right browser when I've done it. Because I haven't made any further notices.
[08:13] <dimitern> TheMue: I fixed it! it seems even though firefox is a default browser, chrome managed to set itself as a gnome-www-browser and x-www-browser :)
[08:14] <TheMue> dimitern: So there are multiple default browsers, interesting behavior.
[08:17] <dimitern> rogpeppe: when I try "lbox propose -wip" now, after doing the oauth stuff successfully, it says: error: Failed to load data for branch lp:~/goose/client-auth-refactoring: resource not found (and I did push the branch)
[08:18] <rogpeppe> dimitern: hmm, odd
[08:18] <rogpeppe> dimitern: have you tried running it with --verbose --debug ?
[08:18] <dimitern> no, i'll
[08:20] <dimitern> rogpeppe: so it produces a whole lot of logs, but what to look for?
[08:20] <rogpeppe> dimitern: good question - i haven't debugged it for ages :-)
[08:21] <dimitern> rogpeppe: wanna see the paste of it?
[08:21] <rogpeppe> dimitern: go on then.
[08:21] <rogpeppe> dimitern: i probably won't be able to help though, i'm afraid
[08:22] <dimitern> rogpeppe: http://paste.ubuntu.com/1369607/
[08:23] <fwereade> morning all
[08:23] <dimitern> fwereade: morning
[08:23] <rogpeppe> fwereade: yo!
[08:25] <dimitern> fwereade: maybe you can help me with lbox?
[08:25] <fwereade> dimitern, perhaps :)
[08:25] <dimitern> :)
[08:25] <fwereade> dimitern, what's up with it?
[08:26] <dimitern> so I installed it, added the .lbox and .lbox.check from juju-core, changed to lp:goose in .lbox, and then did propose -wip, launched a browser, I authorized it and then wanted to propose that branch (which has only these 2 files added)
[08:27] <dimitern> and the verbose output I got, along with the error is pasted above
[08:27] <fwereade> dimitern, lp:~dimitern/goose/client-auth-refactoring?
[08:28] <dimitern> fwereade: well, it seems correct to me
[08:28] <dimitern> and the branch is there
[08:28] <fwereade> dimitern, oh hold on, it has lp:~/goose/...
[08:29] <rogpeppe> fwereade: well spotted
[08:29] <fwereade> rogpeppe, I'm suspicious that it doesn't actually matter though
[08:29] <dimitern> fwereade: yes, but before I did bzr push lp:~/something... and it worked, i mean it resolved it to ~dimitern
[08:30] <fwereade> dimitern, ah!
[08:30] <rogpeppe> dimitern: it's quite possible that lbox doesn't work properly with that
[08:30] <fwereade> dimitern, ok, cool, I had no idea you could do that :)
[08:30] <rogpeppe> fwereade: neither me
[08:30] <dimitern> fwereade: I asked jam and the guys before that bzr supports the ~ shortcut
[08:30] <fwereade> dimitern, nice
[08:31] <dimitern> fwereade: anyway, I should use the full name then probably, how to change it? .bzr/ something?
[08:31] <rogpeppe> dimitern: try push --remember lp:~dimitern/goose/client-auth-refactoring
[08:31] <rogpeppe> dimitern: and propose again and see what happens
[08:31] <fwereade> +1
[08:32] <dimitern> rogpeppe: well, did that, and then lbox propose -wip -v -debug and it again tried to push lp:~/goose/client-auth-refactoring :(
[08:32] <rogpeppe> dimitern: hmm.
[08:33] <rogpeppe> dimitern: how about deleting the branch within launchpad
[08:33] <rogpeppe> dimitern: what does bzr info print?
[08:34] <rogpeppe> dimitern: hmm, it's possible that the ~/ was baked into the original oauth request, i suppose
[08:34] <dimitern> dimitern@kubrik:~/work/goose$ bzr info
[08:34] <dimitern> Lightweight checkout (format: 2a)
[08:34] <dimitern> Location:
[08:34] <dimitern>   light checkout root: .
[08:34] <dimitern>    checkout of branch: .bzr/cobzr/client-auth-refactoring
[08:34] <dimitern>     shared repository: .bzr/cobzr
[08:34] <dimitern> Related branches:
[08:34] <dimitern>     push branch: lp:~/goose/client-auth-refactoring
[08:34] <dimitern>   parent branch: .bzr/cobzr/master
[08:34] <dimitern> and I did delete the branch and launched lbox propose again, same error, but the branch was pushed
[08:34] <rogpeppe> dimitern: i know almost nothing about oauth though
[08:35] <rogpeppe> dimitern: hmm, looks like it hasn't remembered properly
[08:36] <dimitern> rogpeppe: seems so yes, but how to fix it?
[08:37] <rogpeppe> dimitern: are you using cobzr?
[08:37] <dimitern> rogpeppe: yes
[08:37] <fwereade> dimitern, ~/.lpad? something like that to clear the stored auth, perhaps?
[08:37] <fwereade> dimitern, delete it I mean
[08:37] <rogpeppe> dimitern: in that case, try editing .bzr/cobzr/<branch name>/.bzr/branch/branch.conf
[08:38] <rogpeppe> dimitern: and delete the push location. (in fact, what does the push location say there?)
[08:38] <dimitern> push_location = bzr+ssh://bazaar.launchpad.net/~dimitern/goose/client-auth-refactoring/
[08:38] <rogpeppe> hmm, that looks fine
[08:38] <dimitern> :( man, these things always happen to me
[08:39] <rogpeppe> dimitern: yeah, try deleting $HOME/.lpad_oauth
[08:39] <rogpeppe> dimitern: they happened to me a lot until i learned not to tickle lbox's bugs
[08:40] <dimitern> rogpeppe: I did delete it, run it again, same error
[08:40] <rogpeppe> dimitern: did it ask you to authenticate again?
[08:41] <dimitern> rogpeppe: yes, and I did
[08:41] <rogpeppe> dimitern: was it still talking about ~/goose ?
[08:41] <dimitern> 2012/11/19 09:40:04 Pushing branch: lp:~/goose/client-auth-refactoring
[08:41] <dimitern> 2012/11/19 09:40:08 Branch pushed successfully.
[08:42] <dimitern> and later on: 2012/11/19 09:40:09 Loading data for branch lp:~/goose/client-auth-refactoring...
[08:42] <rogpeppe> dimitern: what does your .lbox file hold?
[08:42] <dimitern> which fails
[08:42] <dimitern> propose -cr -for lp:goose
[08:43] <rogpeppe> dimitern: has a merge proposal been created in launchpad?
[08:43] <dimitern> rogpeppe: no, does it have to be?
[08:43] <rogpeppe> dimitern: no
[08:44] <rogpeppe> dimitern: that's what lbox should create
[08:44] <rogpeppe> dimitern: i'm just grasping at straws here
[08:44] <dimitern> rogpeppe: maybe because -wip was passed?
[08:44] <rogpeppe> dimitern: -wip shouldn't make any difference here
[08:44] <rogpeppe> dimitern: it's failing before it gets to that stage
[08:45] <dimitern> rogpeppe: so I don't have to propose it first from lp
[08:45] <rogpeppe> dimitern: nope
[08:45] <rogpeppe> dimitern: lbox should do all that
[08:45] <dimitern> rogpeppe: yeah, I thought so
[08:50] <rogpeppe> dimitern: hmm, i still think the root problem is that bzr info is printing the ~/ url
[08:50] <dimitern> rogpeppe: ok, but even so it lbox still manages to push it correctly
[08:51] <rogpeppe> dimitern: that'll be because it's using bzr to push it, and bzr understands the ~/ syntax
[08:51] <dimitern> rogpeppe: so I found a but in lbox, as such
[08:51] <dimitern> :)
[08:51] <dimitern> s/but/bug/
[08:52] <rogpeppe> dimitern: i am just speculating here. i don't know for sure.
[08:54] <dimitern> rogpeppe: I think the problem is around here: http://bazaar.launchpad.net/~niemeyer/lpad/trunk/view/head:/branch.go#L16
[08:55] <rogpeppe> dimitern: yeah, i'm looking in that area
[08:57] <rogpeppe> dimitern: it's quite possible that launchpad doesn't handle the ~/ prefixes in getByUrl
[08:58] <dimitern> rogpeppe: so then patching lpad slightly to cater for lp:~ -> lp:~user before calling getByUrl should work?
[08:58] <rogpeppe> dimitern: i'm not sure it's the right fix, but i'd try it anyway - if it works, we know we're on the right track
[08:59] <rogpeppe> dimitern: just hack it so it replaces ~/ by ~dimitern/
[08:59] <rogpeppe> dimitern: 'cos i don't know that the Root knows the user name at that point
[09:01] <rogpeppe> dimitern: what happens if you pull the branch under a different name?
[09:01] <rogpeppe> dimitern: i.e. bzr branch lp:goose/trunk test-branch
[09:01] <rogpeppe> dimitern: bzr switch test-branch
[09:02] <rogpeppe> dimitern: lbox propose -for lp:goose -wip
[09:02] <rogpeppe> dimitern: i wonder if that might work
[09:03] <dimitern>  rogpeppe: I'm trying to patch lpad branch.go first
[09:03] <rogpeppe> dimitern: ok
[09:04] <dimitern> rogpeppe: after I change it, how can I recompile it?
[09:04] <rogpeppe> dimitern: go install
[09:04] <rogpeppe> dimitern: rather, go install launchpad.net/lbox
[09:06] <dimitern> rogpeppe: but it's lpad actually
[09:06] <rogpeppe> dimitern: if you've changed lpad, go instlling lbox will use the changed lpad
[09:07] <dimitern> rogpeppe: ok, it worked so far
[09:07] <dimitern> rogpeppe: It works with the patch!
[09:08] <rogpeppe> dimitern: cool
[09:08] <rogpeppe> dimitern: so we know what the culprit is!
[09:08] <rogpeppe> dimitern: in the meantime, you could work around it, i think, by re-branching
[09:08] <dimitern> rogpeppe: yeah
[09:08] <dimitern> rogpeppe: rebranching?
[09:09] <rogpeppe> dimitern: doing a cobzr branch, as i suggested above
[09:10] <dimitern> rogpeppe: ok, btw it asked for www.google.com password at some point, and I used my @canonical one, but it seems it didn't like it
[09:11] <rogpeppe> dimitern: hmm, have you used codereview.appspot.com before?
[09:11] <dimitern> rogpeppe: no
[09:11] <rogpeppe> dimitern: try going to that site - you may need to authorize with it separately
[09:20]  * TheMue has to test code with root rights, somehow not nice.
[09:38] <TheMue> Ah, found it, a little script is helping.
[09:43] <TheMue> fwereade: ping
[09:58] <fwereade> TheMue, pong
[09:58] <fwereade> TheMue, sorry, didn't see the notification
[09:58] <fwereade> TheMue, what can I do for you?
[09:58] <TheMue> fwereade: NP, good morning btw.
[09:58] <fwereade> TheMue, and yourself :)
[09:59] <TheMue> fwereade: If I'm right you share Arams interest in a container abstraction between machine and unit in the state package. Am I right?
[09:59] <fwereade> TheMue, yeah, I think so
[10:00] <TheMue> fwereade: Could you please tell me more about your motivation behind it?
[10:00] <fwereade> TheMue, it's mostly based on a feeling that it is a more "correct" model of the actual situation
[10:01] <fwereade> TheMue, and that the principal stuff is kinda tacked on to unit
[10:01] <fwereade> TheMue, and that it would probably be happier in its own type
[10:02] <fwereade> TheMue, but I understand that such a change will have other consequences, and I'm open to being convinced otherwise
[10:05] <fwereade> TheMue, what's your position?
[10:06] <fwereade> TheMue, (I can also see advantages to the principal stuff on unit, so it's not 100% clear cut)
[10:07] <TheMue> fwereade: One moment, I'm coming back in a few minutes here. Just helping my daughter, sorry.
[10:07] <fwereade> TheMue, np
[10:13] <TheMue> fwereade: So, back again, sorry again.
[10:14] <fwereade> TheMue, np :)
[10:14] <TheMue> fwereade: To me having the container as an extra type is more natural.
[10:16] <TheMue> fwereade: Today the assignments of units are distributed, but a container could group them better and a machine could then manage/run/contain one or more containers.
[10:16] <TheMue> fwereade: Additionally the implementation of the watchers would be more easy.
[10:19] <fwereade> TheMue, doesn't the unit already have a list of its subordinates?
[10:19] <fwereade> TheMue,     Subordinates   []string
[10:20] <fwereade> TheMue, and the machine has a list of principals already
[10:20] <fwereade> TheMue, so in either case a watcher can be implemented by watching a single entity (and then death-watching its dependants)
[10:20] <fwereade> niemeyer, heyhey
[10:21] <TheMue> fwereade: Yes, and the new approach would be that a Machine has a slice of Containers and each Container has a slice of units.
[10:22] <niemeyer> fwereade: Good morning!
[10:22] <fwereade> TheMue, I understand that, but I'm not sure that this change allows for a better implementation
[10:22] <fwereade> TheMue, I'm with you on the "more natural" argument
[10:22] <TheMue> fwereade: Each container would have one principal and the according subordinates.
[10:23] <fwereade> TheMue, in this instance I don't see what we gain from the additional layer
[10:23] <TheMue> fwereade: That's why I'm collecting different views and opinions, just to see, if it's worth to change it.
[10:24] <fwereade> TheMue, personally I would like to change it but can't really justify it ;)
[10:24] <TheMue> fwereade: As I understood Aram the implementation of watchers would be by far more simple.
[10:24] <fwereade> TheMue, so if it were up to me I think I would regretfully resist the temptation :)
[10:24] <niemeyer> TheMue: So all it takes is to explain why that's the case
[10:25] <TheMue> niemeyer: Good morning.
[10:25] <niemeyer> TheMue: Morning
[10:25] <fwereade> TheMue, in either case it's a matter of a single entity watch -- the only difference is whether we're watching the unit (we can already do this) or adding a whole new type to watch
[10:25] <TheMue> niemeyer: Yes, and that's why I'm currently collecting different views.
[10:26] <fwereade> niemeyer, btw, this is roughly what I was babbling on about last week in the meeting
[10:26] <fwereade> niemeyer, what the MA does to principals is the same as what a principal UA does to subordinates
[10:27] <fwereade> niemeyer, the points of difference are (1) how to deploy and (2) what entity needs to be watched to detect new deployees
[10:27] <niemeyer> fwereade: Yeah, I can see the correlation
[10:27] <TheMue> fwereade: As Aram said the watching of machine and unit in one watcher is somehow, hmmm, bad maintainable.
[10:27] <fwereade> niemeyer, this feels to me like a task
[10:27] <niemeyer> fwereade: I just don't yet see the fallout of that
[10:27] <niemeyer> fwereade: (how we use that fact in a way that's not trivial)
[10:28] <niemeyer> TheMue: It doesn't matter how many people like it or don't like it.. we need to know the reasoning for doing it or not
[10:29] <TheMue> niemeyer: Yep, that's why I'm simply collecting those pros and cons. To see if it's worth to change it or better to just keep it.
[10:30] <niemeyer> TheMue: Do you have *any* reasoning for changing it yet that you could tell us about clearly?
[10:30] <TheMue> niemeyer: Right now I'm only have some kind of gut feeling. That's not enough.
[10:31] <fwereade> niemeyer, well, IMO the thing it would be nice to keep a single implementation of is the watching (notify of alive additions; watch each independently for death)
[10:31] <fwereade> niemeyer, to do that we need (1) entity watchers not to return ids, because machine and unit watchers can't currently satisfy the same interface
[10:32] <fwereade> niemeyer, and (2) machine and unit to have a common DependantUnits() []*Unit method
[10:32] <TheMue> niemeyer: We're collecting it in https://docs.google.com/a/canonical.com/document/d/1Chla4FgaMTlwXFdAzFv-ToN0iNsWKFECNGOCerC8PH0/edit in "Add container abstraction" - "Motivation".
[10:32] <fwereade> niemeyer, that feels to me like it's worth the effort
[10:32] <niemeyer> fwereade: Yeah, but what then?
[10:33] <niemeyer> fwereade: How do we use that in a way that is common?
[10:33] <fwereade> niemeyer, and if we have a Container abstraction for deploying stuff (which we do, even if no containers are involved; it's the Deployment abstraction we had in py)
[10:33] <fwereade> niemeyer, the Machiner already takes a Container, doesn't it?
[10:34] <niemeyer> fwereade: Not sure.. looking
[10:34] <fwereade> niemeyer, so it's the difference between fixing Machiner to do the right thing [wait, ECONTEXT, that might have changed], and turning it into a Placer which does the
[10:34] <fwereade> niemeyer, ...right thing in both cases
[10:35] <fwereade> niemeyer, yeah, machiner is still using Added/Removed
[10:35] <niemeyer> fwereade: Yeah, that's in review
[10:35] <fwereade> niemeyer, ah ok
[10:37] <niemeyer> TheMue: There's no clear motivation there
[10:38] <niemeyer> TheMue: Saying it simplifies "foo" requires a leap of faith that I'm not willing to concede on without further analysis
[10:39] <TheMue> niemeyer: One moment
[10:39] <niemeyer> TheMue: The change being suggested isn't free.. it's not *less* code
[10:39] <niemeyer> TheMue: It's *more* code, *more* logic, *more* entities
[10:40] <niemeyer> fwereade: Sounds good re. that stuff
[10:41] <niemeyer> fwereade: I don't think the ids are specially interesting so far
[10:41] <niemeyer> fwereade: I think we have perhaps a couple of places that actually use them
[10:41] <niemeyer> fwereade: and that's in testing
[10:41] <fwereade> niemeyer, yeah, and if you started a watch you know what you're watching anyway
[10:41] <fwereade> niemeyer, yep
[10:42] <niemeyer> fwereade: Right, we can always bundle the id in when we really care
[10:45] <TheMue> niemeyer: As I understood Aram the code is simple and would lead to less and better maintainable code, especially for the watchers.
[10:45] <niemeyer> TheMue: Repeating things doesn't make them true :-)
[10:46] <niemeyer> TheMue: What we need is a clear analysis of why that is so
[10:47] <niemeyer> TheMue: If you're not able to articulate why that is the case, it means you don't understand it yourself
[10:47] <TheMue> niemeyer: That's what I'm trying. Collecting pros and cons and imlementation details.
[10:47] <niemeyer> TheMue: So you should try to convince Aram that this isn't the case, until you do understand why
[10:48] <niemeyer> TheMue: It's more important to be able to talk about things like that in a way we can brainstorm on, than to file up a bullet list
[10:48] <TheMue> niemeyer: Did you read the docuument? What do you say about the details there so far?
 TheMue: There's no clear motivation there
 TheMue: Saying it simplifies "foo" requires a leap of faith that I'm not willing to concede on without further analysis
[10:51] <TheMue> niemeyer: So would be less and clearer code with better maintainability an argument for you?
[10:51] <niemeyer> TheMue: I'm concerned we're getting side-tracked onto that kind of detail that doesn't really make a difference at the moment and not making any significant progress towards implementing support for what we have to
[10:52] <niemeyer> TheMue: Definitely would
[10:52] <niemeyer> TheMue: But saying "you don't need to write that watcher" isn't it
[10:53] <fwereade> niemeyer, (hey, a sudden thought: there is one case where we *do* want something out of an entity watcher: that's the TxnRevno for config settings)
[10:53] <niemeyer> TheMue: Because you need to add a whole new entity to the system with everything it takes instead
[10:53] <niemeyer> TheMue: So "less code" must include everything you need to *add* as well
[10:53] <fwereade> niemeyer, (how would you feel about standardizing entity watchers on that?)
[10:53] <niemeyer> fwereade: Do we ever use that value for entities?
[10:54] <fwereade> niemeyer, only if you consider a settings node to be an entity :)
[10:54] <niemeyer> fwereade: Right :-)
[10:54] <TheMue> niemeyer: Sure, my feeling so far is, that we may reach todays features with less and more clear code, but I'm not yet sure. That's why I'm collection different opinions to discuss it with Aram when he's back.
[10:54] <niemeyer> fwereade: I wasn't considering that yet
 TheMue: Repeating things doesn't make them true :-)
 TheMue: If you're not able to articulate why that is the case, it means you don't understand it yourself
[10:55] <fwereade> niemeyer, I'm working from a perspective from which I perceive single-thing watchers, and many-thing watchers, and feel that their respective commonalities are worth enhancing
[10:55] <niemeyer> TheMue: Which is fine on itself
[10:55] <fwereade> niemeyer, hey wait
[10:56] <niemeyer> TheMue: But it means you should try to understand why *you* want it to be done
[10:56] <fwereade> niemeyer, if we *did* return txnrevno, perhaps we can have only one single-thing watcher implementation
[10:56] <niemeyer> TheMue: Because so far it feels like "Hey, I want to build my own house.. please tell me why I should do that."
[10:57] <TheMue> niemeyer: Yes, absolute. That's why I wrote "gut feeling" and why I try to understand it instead of saying "We have to change it.". And here your, Williams and Arams input do help me (beside reading the code.).
[10:58] <niemeyer> fwereade: I'm slightly concerned with the idea of binding txn-revno to it
[10:58] <niemeyer> fwereade: Watchers don't necessarily have a 1-to-1 event-to-revno-change correlation
[10:58] <fwereade> niemeyer, I *think* that single-entity watchers do, don't they?
[10:59] <niemeyer> fwereade: Perhaps they do for now, but that's not necessarily the case
[10:59] <niemeyer> fwereade: We could easily decide to fire a, say, unit's watcher based on a correlated value
[10:59] <fwereade> niemeyer, yeah, granted
[10:59] <fwereade> niemeyer, cheerfully withdrawn for now
[10:59] <fwereade> ;)
[10:59] <niemeyer> fwereade: I think settings are the exception on that
[11:00] <niemeyer> fwereade: I do appreciate your core motivation, though
[11:00] <fwereade> niemeyer, cheers :)
[11:09] <rogpeppe> niemeyer: based on your comments in a later CL, i've decided to use "CA" for everything related to the root CA certificate, and i'm losing the "root" qualifier entirely. does that sound reasonable?
[11:09] <rogpeppe> niemeyer: morning, BTW!
[11:09] <rogpeppe> niemeyer: for example: http://paste.ubuntu.com/1369804/
[11:19] <niemeyer> rogpeppe: It does
[11:20] <niemeyer> rogpeppe: I think it's a short and unambiguous way to talk about the concept internally and on docs
[11:20] <rogpeppe> niemeyer: there's also the potentially interesting thing that it might not necessarily be a root
[11:24] <niemeyer> rogpeppe: Indeed
[11:49] <fwereade> lunch, bbiab
[11:52] <niemeyer> fwereade: Enjoy!
[12:15] <rogpeppe> niemeyer: what do you think about CAPEM vs CA_PEM vs ... ?
[12:16] <rogpeppe> niemeyer: actually... maybe just CACert is sufficient.
[12:16] <niemeyer> rogpeppe: +1 on the latter
[12:20] <fss> niemeyer: morning :-)
[12:21] <niemeyer> fss: Heya
[12:24] <fss> niemeyer: how is that iam CL going?
[12:24] <niemeyer> fss: Haven't seen much attention, has it
[12:24] <niemeyer> fss: I'll try to give it some love this morning still
[12:24] <niemeyer> fss: After the currently going batch of reviews
[12:25] <fss> niemeyer: great, thanks! :)
[14:09] <niemeyer> fss: You've got a review there, thanks for the change btw
[14:15] <fwereade_> rogpeppe, does this look familiar?
[14:15] <fwereade_> ----------------------------------------------------------------------
[14:15] <fwereade_> FAIL: bootstrap_test.go:42: bootstrapSuite.TestBootstrapKeyGeneration
[14:15] <fwereade_> bootstrap_test.go:45:
[14:15] <fwereade_>     c.Assert(err, IsNil)
[14:15] <fwereade_> ... value *errors.errorString = &errors.errorString{s:"cannot generate CA certificate: canot create certificate: ASN.1 structure error: PrintableString contains invalid character"} ("cannot generate CA certificate: canot create certificate: ASN.1 structure error: PrintableString contains invalid character")
[14:15] <fwereade_> OOPS: 17 passed, 1 FAILED
[14:15] <fwereade_> --- FAIL: Test (8.12 seconds)
[14:15] <fwereade_> FAIL
[14:15] <fwereade_> FAIL	launchpad.net/juju-core/juju	8.171s
[14:15] <rogpeppe> fwereade_: hmm, i don't think i've seen that before
[14:16] <rogpeppe> fwereade_: you've just pulled from trunk, i presume
[14:16] <fwereade_> rogpeppe, yeah
[14:16] <fwereade_> rogpeppe, haven't tried trunk directly yet, just a mo
[14:16] <rogpeppe> fwereade_: it might be a problem in 1.0.3 but not in tip i suppose
[14:18]  * niemeyer => lunch
[14:21] <rogpeppe> fwereade_: i'm just building 1.0.3 to test
[14:22] <rogpeppe> fwereade_: yup, that's the issue
[14:22] <rogpeppe> fwereade_: will fix, one mo
[14:22] <fwereade_> rogpeppe, lovely, thanks
[14:33] <rogpeppe> fwereade_: hmm, i'm not sure what the best solution is here. looks like it's issue 3791, fixed by this CL https://codereview.appspot.com/6348074
[14:34] <rogpeppe> fwereade_: however i'm not entirely sure i *want* the string to turn into a utf-8 string
[14:34] <fwereade_> rogpeppe, ehhh, yes, tricky
[14:34] <rogpeppe> fwereade_: i'll check it works against mgo
[14:34] <rogpeppe> fwereade_: if it does, i'll go with it
[14:35]  * rogpeppe can't believe quite how crap x509/asn1 is
[14:42] <fwereade_> niemeyer, fwiw, http://paste.ubuntu.com/1370176/ just happened
[14:44] <rogpeppe> niemeyer, fwereade_: fix trunk: https://codereview.appspot.com/6842065/
[14:44] <rogpeppe> niemeyer, fwereade_: one alternative would be to use single-quotes, i suppose
[14:44] <rogpeppe> niemeyer: which i believe are allowed
[14:45] <fwereade_> rogpeppe, LGTM
[14:49] <rogpeppe> fwereade_: i'll submit it now, and we can change it later if someone disagrees
[14:50] <rogpeppe> fwereade_: done
[14:53] <fwereade_> rogpeppe, cheers
[14:59] <fwereade_> TheMue, rogpeppe: what (if anything) has been your involvement in recent machine unit watching discussions?
[14:59] <fss> niemeyer: thanks, i will take a look later today
[14:59] <fwereade_> TheMue, rogpeppe: because I'm a bit confused about unassignment
[15:00] <TheMue> fwereade_: Only talked with Aram about implementation details so far. About how a container would make it more simple.
[15:01] <TheMue> fwereade_: In which way confused?
[15:02] <fwereade_> TheMue, well, we're watching for unassignments that never happen and don't matter, but ignoring the deaths that do happen and do matter, or so it seems to me
[15:03] <fwereade_> TheMue, I was hoping someone would explain why we're watching for them when there's no forseeable use case
[15:04] <fwereade_> TheMue, ATM, once the machiner is properly done, it will be (indirectly) responsible for the unassignment
[15:04] <fwereade_> TheMue, if other things unassign, which one day perhaps they may, that should also be watched for, but as it is they don't
[15:05] <fwereade_> TheMue, (also, UnassignFromMachine probably shouldn't even exist at the moment... it should be rolled into any unit destruction transaction)
[15:06] <TheMue> fwereade_: Yo see me puzzled.
[15:07] <fwereade_> TheMue, no worries :) is aram on holiday atm?
[15:07] <TheMue> fwereade_: Let's try to sort it again.
[15:07] <TheMue> fwereade_: Yes, he is to a memorial. :(
[15:07] <fwereade_> :(
[15:07] <TheMue> fwereade_: No good reason.
[15:08] <TheMue> fwereade_: Or better said: A sad reason.
[15:08] <fwereade_> TheMue, ha, yeah, the first formulation is unhelpfully ambiguous
[15:08] <fwereade_> TheMue, ok, can I explain what I think should be going on? please jump in if I say anything that gives you pause
[15:08] <TheMue> fwereade_: Exactly. In the moment I read it I felt so.
[15:09] <TheMue> fwereade_: Yes, let's do so
[15:09] <fwereade_> TheMue, the MA and the UA are both responsible for the lifetimes of other units
[15:09] <fwereade_> TheMue, the MA for its principals and that UA for its subordinates
[15:09] <fwereade_> TheMue, in each case, the agent is responsible for 2 things
[15:10] <fwereade_> TheMue, 1) detecting new, alive units, and deploying them
[15:10] <fwereade_> TheMue, 2) detecting Dead units and destroying them
[15:10] <fwereade_> TheMue, any uncertainty/ambiguity thus far?
[15:11] <TheMue> fwereade_: So far e'thing ok.
[15:11] <fwereade_> TheMue, cool
[15:11] <fwereade_> TheMue, hum, actually, I think I need to go back further
[15:12] <TheMue> fwereade_: Adam and Eve?
[15:12] <fwereade_> TheMue, can you explain to me the deal with assignment in general? specifically why it's separate from unit creation, and whether it actually should be
[15:12] <fwereade_> s/creation/creation and destruction/
[15:14] <fwereade_> TheMue, ie I'm not so interested in historical reasons unless they still apply
[15:15] <fwereade_> TheMue, is there any time it makes sense for a principal unit not to be assigned to a machine?
[15:15] <TheMue> fwereade_: In the firewaller the machineData, which represents one machine, watches for its units. This is needed to see, if ports on the mache have to be opened/closed.
[15:15] <fwereade_> TheMue, I understand that units need to be assigned to machines
[15:16] <fwereade_> TheMue, I don't see why we're not doing the assignment/unassignment in the unit add/remove transactions
[15:16] <TheMue> fwereade_: Yes, here the new (currently in review) approach of Aram shall watch all assignments. Today only the principals are watched.
[15:17] <fwereade_> TheMue, subordinates can't be assigned
[15:17] <niemeyer> fwereade_: Cheers
[15:17] <TheMue> fwereade_: Sorry, I'm lost in the last step.
[15:17] <fwereade_> TheMue, assignToMachine will barf if you pass it a subordinate
[15:18] <fwereade_> TheMue, subordinates are in fact deployed on machines but they're not "assigned" to them
[15:18] <TheMue> fwereade_: OK
[15:19] <fwereade_> TheMue, wait, there's the principals watcher currently in review
[15:19] <fwereade_> TheMue, the firewaller's all-units watcher is a separate problem I think
[15:21] <TheMue> fwereade_: Aram has a change to the watchers in review, one also leads to a change in the firewaller.
[15:30] <TheMue> fwereade_: Which problem do you address if it's not the usage of Machine.WatchUnits() inside the Firewaller?
[15:32] <fwereade_> TheMue, I'm talking about the principals watching that is in review
[15:34] <dimitern> fwereade_: quick go question: I need to pass io.Reader as the request body, and I have data []byte, how to get io.Reader for []byte?
[15:37] <dimitern> rogpeppe: maybe? ^^
[15:37] <rogpeppe> dimitern: see bytes.Reader
[15:37] <rogpeppe> dimitern: or bytes.Buffer
[15:37] <dimitern> rogpeppe: 10x!
[15:44]  * niemeyer has to step out for appointment
[15:44] <niemeyer> See y'all later
[15:44] <TheMue> CU
[15:59] <fwereade_> TheMue, rogpeppe: either of you free to talk about the machiner a little bit more?
[15:59] <rogpeppe> fwereade_: np
[15:59] <fwereade_> TheMue, rogpeppe: ISTM that the machiner will need to be a little bit stateful
[15:59] <TheMue> fwereade_: One moment, just want to propose a golxc branch.
[15:59] <rogpeppe> fwereade_: how so?
[16:00] <fwereade_> TheMue, rogpeppe: ie it will need to know what it's deployed so it can reconcile when the process bounces
[16:01] <rogpeppe> fwereade_: can it not tell what it's deployed by looking at the upstart services?
[16:01] <fwereade_> rogpeppe, scan all upstart processes for names that look right? I guess so
[16:01] <fwereade_> rogpeppe, feels a bit icky though
[16:02] <rogpeppe> fwereade_: i dunno. it's gotta have control of that name space anyway, and it's the one that's adding or removing from it.
[16:02] <rogpeppe> fwereade_: if we didn't do that, we'd only be mirroring that information somewhere else
[16:03] <fwereade_> rogpeppe, I'd prefer to mirror that information somewhere I explicitly control rather than assume that nothing else will cause a juju-* upstart job to be created
[16:03] <rogpeppe> fwereade_: if something else causes a juju-* upstart job to be created, we might well be shafted anyway
[16:04] <rogpeppe> fwereade_: what if someone else does that and then we try to actually start a job with that name?
[16:04] <rogpeppe> fwereade_: i think it's fair to say "mess with juju-* upstart services at your own risk"
[16:04] <rogpeppe> fwereade_: and we could obfuscate the name space if we want
[16:05] <rogpeppe> fwereade_: e.g. use a uuid prefix or something
[16:05]  * rogpeppe prefers to keep one canonical source for information
[16:06] <fwereade_> rogpeppe, my point is really that the machiner doesn't take anything like that into account
[16:06] <rogpeppe> fwereade_: agreed. it definitely should.
[16:07] <rogpeppe> fwereade_: it's been on the cards for ages
[16:08] <fwereade_> rogpeppe, ok, this feels like something that is also basically common between the UA and the MA
[16:08] <rogpeppe> fwereade_: definitely.
[16:09] <rogpeppe> fwereade_: i definitely think we should use the same code for both
[16:23] <dimitern> rogpeppe: is there something like "if elem in slice", given elem int, slice []int ?
[16:24] <rogpeppe> dimitern: a for loop :-)
[16:24] <dimitern> ideally, w/o iterating over the slice with range?
[16:24] <dimitern> ok :)
[16:24] <rogpeppe> dimitern: it's only three lines
[16:25] <fwereade_> dimitern, you'll get used to it -- it's a simpler, happier life :)
[16:25] <dimitern> rogpeppe: yeah, i'm just lazy :)
[16:29] <mgz> it's not really laziness dimitern, fear of newlines maybe :)
[16:29] <dimitern> mgz: :D
[18:38]  * rogpeppe has reached the end of day.
[18:38] <rogpeppe> g'night all
[20:14] <niemeyer> fwereade_: Wow, consolidate-entity-watcher is impressive
[20:58] <fwereade_> niemeyer, yeah, was a great surprise :)
[21:05] <niemeyer> fwereade_: A nice one even :-)
[21:05] <fwereade_> niemeyer, great in both senses :)
[21:06] <niemeyer> fwereade_: +1 (or -N  depending on the perspective ;)
[21:08] <fwereade_> niemeyer, haha :)
[21:08] <fwereade_> niemeyer, btw, you were suggesting I shepherd aram's branch in while he's away?
[21:09] <niemeyer> fwereade_: Yeah, if you're feeling like you'd benefit from it being in, it feels like it's pretty much done
[21:09] <fwereade_> niemeyer, I have fairly significant issues with the Machiner in that proposal but they're all things I anticipate needing to address anyway
[21:09] <fwereade_> niemeyer, and none of them are regressions
[21:10] <fwereade_> niemeyer, so, ok, I'll branch that and see what I can pull together from the old comments
[21:11] <niemeyer> fwereade_: Cool, I'd be certainly be delighted to see that polished with more context
[22:03] <rogpeppe> fwereade_: what's consolidate-entity-watcher?