/srv/irclogs.ubuntu.com/2012/03/05/#juju-dev.txt

rogmorning!08:51
rogfwereade_: i wonder if we should think about logging a little deeper09:23
rogfwereade_: when i played with juju, it seemed to me that it didn't do logging very well, and perhaps we can do better.09:23
fwereade_rog, heh, I won't disagree, but I think I've surgically removed my credibility on all logging-related issues for a little while :p09:24
rogfwereade_: :-)09:24
fwereade_rog, what were you thinking of though?09:25
rogfwereade_: i was wondering about a way to amalgamate many (distributed) logs into a unified view, so one can see what's happening throughout the system in a moderately timely way09:26
fwereade_rog, how would that differ from `juju debug-log`?09:26
rogfwereade_: well, current debug-log goes through zk, right? which isn't great.09:27
rogfwereade_: and debug-log only includes juju log messages09:27
rogfwereade_: but it would be good to be able to see other logs too (preferably in a unified view), e.g. stuff in /var/log09:28
fwereade_rog, hmm, interesting -- I think we kinda expect to hand that level of detail off to a subordinate charm if it's wanted09:28
fwereade_rog, I agree that zk is not really the ideal log server :p09:28
fwereade_rog, I do think that it would actually be pretty cool if we *did* basically have rsyslog integrated somehow09:29
rogfwereade_: i'm not sure that i want to go to the trouble of deploying a subordinate charm in order to see log messages without ssh'ing to a node. but maybe it's ok.09:29
rogfwereade_: part of the problem is that you don't want to shove log messages into the system unless you want them - there's a lot of potential wasted bandwidth if you do09:30
fwereade_rog, this use case immediately makes me think that it might make sense to have "env-level" subordinate charms, but I haven't really kept up on that so maybe someone already thought of it09:30
rogfwereade_: maybe could think of the whole env as one "service"...09:31
fwereade_rog, (that is, that it might be nice to be able to auto-add a particular subordinate (say, a logging one) to *all* services)09:31
rogyeah09:32
fwereade_rog, yeah, something like that09:32
rogexcept that means that services can overlap so maybe not great09:32
fwereade_rog, yeah, we'd have to be careful09:32
fwereade_rog, and I guess it's a bit speculative at this stage09:32
fwereade_rog, worth keeping in mind though09:32
rogfwereade_: yeah. i think it's really really important to have good logging support in a distributed system.09:36
fwereade_rog, no argument here :009:40
niemeyerGreetings!12:33
rogniemeyer: hiya12:41
niemeyerOops.. will need to give some attention downstairs.. biab12:46
niemeyerWoohay13:27
TheMueniemeyer: ??? What happened?13:29
niemeyerTheMue: https://plus.google.com/u/0/107994348420168435683/posts/PZmwXqzbyGi13:30
TheMueniemeyer: ah, great. our older daughter has an e-piano. she's learning it autodidactic.13:32
niemeyerTheMue: Very nice!13:33
niemeyerTheMue: I'm half and half.. I have some great friends which are amazing piano players/teachers.. that's what motivated me to get into it13:33
niemeyerTheMue: So I've been having some classes in addition to studying by myself13:34
TheMueniemeyer: sounds good. i wanted to learn it too. but i never started with it. insted i'm drifted into writing (and a bit into drawing again).13:35
niemeyerTheMue: I've started to learn music itself, rather than the instrument, but I slowly got to appreciate the instrument itself13:38
TheMueniemeyer: fantastic13:38
niemeyerfwereade_: ping14:42
fwereade_niemeyer, pong, how are you?14:42
niemeyerfwereade_: Heya14:42
niemeyerfwereade_: Excellent.. great Monday so far :)14:42
niemeyerfwereade_: How about yourself?14:42
fwereade_niemeyer, pretty good thanks14:43
fwereade_niemeyer, so, what can I do for you?14:44
niemeyerfwereade_: Just wanted to see if there's anything you'd like to catch up on regarding the pipeline/branch/conversation/whatever14:44
fwereade_niemeyer, ah, yeah, let me think a mo14:44
fwereade_niemeyer, just an am-i-on-crack check really14:44
niemeyerfwereade_: I don't think you are, but go on14:45
fwereade_niemeyer, the motivation is that the python hook commands are kinda nasty, because there are far too many layers of plumbing14:45
fwereade_niemeyer, and that we'll get a much simpler situation if we make the client as thin as possible14:46
niemeyerfwereade_: Motivation for ... (just to make sure I get what you're really saying)14:46
niemeyerfwereade_: Ah, no need, I see already14:46
fwereade_niemeyer, basically, implementing a single jujup command which we specialise purely by symlink14:47
niemeyerfwereade_: That sounds fine for sure14:47
niemeyerfwereade_: I'd just prefer to name it as something else of your choice14:47
fwereade_niemeyer, not jujup?14:47
niemeyerfwereade_: jujud and jujup are graphically extremely close14:47
fwereade_niemeyer, well, I wouldn't expect anyone to ever call jujup directly, but good point nonetheless14:48
niemeyerfwereade_: And also in the way we pronounce it14:48
niemeyerfwereade_: Naming it something else could avoid it14:48
fwereade_niemeyer, yeah, another good point14:48
niemeyerfwereade_: jujut (tools?)14:48
niemeyerfwereade_: ?14:49
fwereade_niemeyer, jujut sounds good to me14:49
fwereade_niemeyer, although, hah, pronunciation vs jujud14:49
niemeyerHmm.. even though I guess my pronounciation argument falls short14:49
niemeyerYeah :)14:49
rogi wouldn't mind a longer name14:49
niemeyerfwereade_: jujuh?14:50
rognoone's ever going to type it...14:50
niemeyerhooks14:50
niemeyerrog: That goes both ways..14:50
fwereade_niemeyer, pronunciation again :p14:50
niemeyerfwereade_: jujuc?14:50
rogjujud is good because there's an existing convention14:50
niemeyerfwereade_: (from client)14:50
fwereade_niemeyer, I was thinking that and liking it just-about-enough14:50
fwereade_niemeyer, yeah, same reasoning14:50
rogjujucallback :-)14:51
niemeyerfwereade_: Cool, +1..14:51
fwereade_rog, we're just extending the noble and hallowed 1-char extension14:51
fwereade_...tradition14:51
roghmm14:51
niemeyerrog: 1 char is fine, IMO, precisely because no one has to remember the command name.. we can deal with a short name for ourselves14:51
rogfwereade_: for me, jujud means juju daemon. jujuc means... nothing.14:51
niemeyerrog: client.. that's what it means14:51
rogjujuice14:51
TheMuejuice *scnr*14:51
niemeyerrog: Oh man.. shhhh14:52
niemeyerrog: Let's reserve that one for something nice :)14:52
TheMuerog: h514:52
rogyeah, jujuc's ok.14:52
fwereade_motion carried :)14:52
* TheMue likes jujuc too14:52
rogonly thing is, it's not really the juju client. it's part of the juju infrastructure. the client is really the one doing juju deploy etc.14:53
TheMueniemeyer: I'm now doing the Agent stuff. So I need an idea on how you wonne have watches implemented.14:54
fwereade_rog, but nobody will ever know c is short for client unless we tell them, and it can be out little secret :p14:54
rogjujuhook might be a little better, but it's not the hook itself, it's something inside the hook14:54
rogTheMue: i'll paste you what we wrote down in the lobby that time14:55
TheMuerog: great, thx14:55
niemeyerrog: Cheers14:56
roghttp://paste.ubuntu.com/869964/14:57
rogit's just the client code, but i think that was the important bit14:58
rogi'm wondering why Stop isn't just a close of the event channel, but there's probably a good reason14:59
rogah yes14:59
TheMuerog: yep, most stuff is clear. Changed delivers just a bool?14:59
rogTheMue: changed delivers anything you like15:00
rogTheMue: the idea is it can deliver deltas15:00
rogTheMue: unlike the usual zk channels15:00
rogTheMue: each watcher might have a different event type15:00
TheMuerog: ok, so the watch isn't one type, they are individual types depending on what the watch15:01
TheMuerog: yep15:01
rogTheMue: yeah, i think so15:01
TheMuerog: so i need to start a goroutine reading the zk-watcher events, transform then, and once it closes i'll send the Stop and end the goroutine15:03
TheMuerog: pretty simple15:03
rogTheMue: i don't think Close should send on Stop.15:04
rogTheMue: i *think* that Stop will be global to the state.15:04
rogTheMue: so when the state itself is closed, it closes the Stop channel, which then propagates through to all watchers15:05
TheMuerog: ok, so far the state doesn't knows a Stop(). and I've got to think about dependencies.15:06
rogTheMue: so far State doesn't have Close AFAIK15:06
TheMuerog: yep, that's what I meant15:07
rogah yes15:07
niemeyerTheMue: Note that the watch method will generally be on *State or some more specific type15:19
TheMueniemeyer: yep15:20
niemeyerrog: Why do we need two channels again?15:21
rogniemeyer: i'm just trying to remember why15:21
niemeyerrog: We need a way to notify the goroutine itself that it's being stopped15:22
rogniemeyer: it depends how we want to propagate the state close15:22
TheMueso, have to leave until this evening, have to drive my older daughter to a workshop. thankfully she's making her driver license soon.15:22
niemeyerrog: But I can't see why we'd make that public15:22
TheMueniemeyer, rog : please keep on discussing, will read it later15:23
rogTheMue: ok, see you tomorrow15:23
niemeyerTheMue: LOL15:23
niemeyerTheMue, rog, fwereade_: http://paste.ubuntu.com/870023/15:34
niemeyerErm.. type is misnamed15:34
niemeyerFixed: http://paste.ubuntu.com/870026/15:35
fwereade_niemeyer, looks good to me15:36
rogniemeyer: does FooWatcher.Change get closed?15:36
niemeyerrog: Ah, it should.. at the bottom of break.. fixing it15:36
niemeyers/break/for15:36
niemeyerTheMue: With rog's point: http://paste.ubuntu.com/870029/15:37
rogniemeyer: ah, that break should break two levels too15:37
niemeyerrog: Hmm.. could have to indeed15:38
rogniemeyer: might as well defer(close(w.Change)) and return15:38
niemeyerrog: I'll fix in a better way15:38
niemeyerrog: http://paste.ubuntu.com/870030/15:38
niemeyerHard to get it wrong like that15:39
niemeyerArgh.. Unity is driving me nuts with the latest ALT-<anything> sequence bringing up the hud at all times15:40
rogniemeyer: i'd like to see it filled out. for instance, what if  the zk watch case is sending on FooWatcher.Change when FooWatcher is stopped?15:40
niemeyerrog: What's the problem with that?15:40
niemeyerrog: In fact, how can it possibly happen? Nothing sends on Change if FooWatcher is stopped15:41
rogniemeyer: there's a potential deadlock if the thing reading on FooWatcher.Change is the one calling Stop15:41
niemeyerrog: Sorry, still don't get it.. a) Only one of these may be done at a time.. b) Change is closed on Stop15:42
rogniemeyer: ok, here's the scenario:15:42
rogniemeyer: watcher is started. it quickly generates a few events and blocks trying to send on FooWatcher.Change15:43
rogniemeyer: the thing that started the watcher decides it doesn't need it any more and calls Stop on it15:43
rogniemeyer: the watcher will block forever15:43
niemeyerrog: Definitely not15:43
niemeyercase <-w.tomb.Dying:15:43
niemeyerreturn15:43
niemeyercase <zk watch>:15:43
niemeyer...15:43
niemeyer}15:43
rogniemeyer: because the thing that started the watcher never received the events it's blocking on15:43
rogniemeyer: what's inside the <zk watch> case?15:44
rogniemeyer: you'll have to guard the send to FooWatcher.Change too, i think15:44
niemeyerrog: <-w.tomb.Dying is all that's necessry15:45
niemeyernecessary15:45
niemeyerrog: If there are other selects, the same must be done of course15:45
niemeyerrog: Check out the blog post for a detailed explanation: http://blog.labix.org/2011/10/09/death-of-goroutines-under-control15:45
rogniemeyer: it's not just in the case of selects, it's any channel operation.15:46
niemeyerrog: Which are done inside selects? :-)15:46
rogniemeyer: but that's why i wanted you to fill out the example15:46
rogniemeyer: not necessarily...15:46
rogniemeyer: but in this case, they'll have to be.15:46
niemeyerrog: LOL15:46
niemeyerrog: Yeah.. they have to be if we don't want to consciously introduce bugs15:47
rogniemeyer: one thing this example doesn't address is what we do when State itself is closed15:47
niemeyerrog: Indeed.. it must Stop too15:48
niemeyerrog: Actually, not really15:48
niemeyerrog: That was the idea I had, but you correctly pointed out that this is a job for the loop15:48
niemeyerIf the state is closed, zk is closed, and the loop will error out..15:49
niemeyerIf we use tomb.Fatal, as per the post, it will eventually reach the guy calling Stop() too15:49
niemeyerHmm.. I'll have to break out to pick up Ale for lunch..15:50
niemeyerrog: biab, in case you want to continue on that, but I think we have a reasonable plan15:50
rogniemeyer: any chance you might be able to review some of my merge requests this week BTW?15:50
niemeyerrog: Yep, good chances ;)15:50
rogniemeyer: that would be nice15:50
rogniemeyer: (i've been trying not to badger you :-])15:51
niemeyerrog: That's appreciated, as I've been reviewing tons of branches pretty much every day15:51
niemeyerI'll give some priority to the store early this week still, though15:51
niemeyerbiab15:51
rogok15:51
rogniemeyer: are you back yet?16:57
robbiewniemeyer: around for juju call?17:03
niemeyerrobbiew: Here17:03
niemeyerrobbiew: Is it happening?17:03
robbiewniemeyer: yes17:04
robbiewon with sabdfl now :)17:04
robbiewjust us17:04
niemeyerrobbiew: Sorry, will be on in a sec17:04
niemeyerrog: I am, kind of :)17:06
robbiewhazmat: of course you're welcome too ;)17:06
rogniemeyer: ok, when you have a moment, wouldn't mind a chat about tomb17:06
niemeyerrog: Sounds good17:14
hazmatsigh17:25
hazmatthink i missed it17:25
hazmatlunch'd out17:25
rogi'm off for the evening. see you tomorrow.18:08
niemeyerrog: I'm off the call, but I guess you're gone18:13
niemeyerAlright.. skeleton in place, HTTP server works.. need to implement the actual actions.. maybe today still!21:13
niemeyerBut now it's time for some outsiding21:13
niemeyerLaters21:13
rogniemeyer: yes, sorry. tomorrow...21:38

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