/srv/irclogs.ubuntu.com/2014/02/18/#juju-dev.txt

axwwallyworld, waigani: standup01:30
=== zz_mwhudson is now known as mwhudson
=== gary_poster is now known as gary_poster|away
=== fcorrea_ is now known as fcorrea
davecheneyhttps://bugs.launchpad.net/juju-core/+bug/128139403:40
_mup_Bug #1281394: uniter failed to run non-existant config-changed hook <juju-core:New> <https://launchpad.net/bugs/1281394>03:40
davecheneytoday's WTF03:42
axwdavecheney: is that plain old juju built with gc, or is it built with gccgo?04:10
davecheneybog standard golang-go04:15
davecheneyaxw: not really supposed to log public bugs about the other thing04:15
davecheneyyet04:15
axwyah ok04:15
axwhrm04:15
axwweird, I dunno how this ever worked. seems to be looking for the complete wrong error type. I'll dig more later04:20
davecheneyaxw: if you point me in the right direction04:20
davecheneyi can fix this one muself04:20
davecheneyit doens't sound that hard04:20
axwdavecheney: worker/uniter/context.go, runCharmHook04:20
axwat the end of the function it's asserting the error is of type *os/exec.Error04:21
axwAFAICT, that's only ever returned by os/exec.LookPath04:21
davecheneythat is stupid04:22
davecheneyaxw: ummm ...04:24
davecheney2014-02-18 04:11:37 INFO juju.state.apiserver apiserver.go:135 [F] user-admin API connection terminated after 18m27.150333066s04:25
davecheney2014-02-18 04:11:42 INFO juju.state.apiserver apiserver.go:131 [10] API connection from 124.149.62.81:4365104:25
davecheney2014-02-18 04:13:51 INFO juju.state.apiserver apiserver.go:135 [10] user-admin API connection terminated after 2m8.222108526s04:25
davecheney2014-02-18 04:18:30 INFO juju.state.apiserver apiserver.go:131 [11] API connection from 124.149.62.81:4366504:25
davecheney2014-02-18 04:20:38 INFO juju.state.apiserver apiserver.go:135 [11] user-admin API connection terminated after 2m8.067538006s04:25
davecheney2014-02-18 04:21:34 INFO juju.state.apiserver apiserver.go:131 [12] API connection from 124.149.62.81:4367104:25
davecheney2014-02-18 04:21:41 INFO juju.state.apiserver apiserver.go:135 [12] user-admin API connection terminated after 6.261804724s04:25
davecheney2014-02-18 04:21:43 INFO juju.state.apiserver apiserver.go:131 [13] API connection from 124.149.62.81:4367304:25
davecheneytwo things04:25
davecheneyand more importantly04:25
davecheneywhy did someone decide to use %x there04:25
davecheneyooooooooooooooooooooooooooooooh04:25
davecheneyi know what they are04:25
davecheneythose are juju ssh connections04:25
davecheneywhy is it leaving the connection open while ssh is running04:25
davecheneyi thought that was fixed04:25
* axw shrugs04:26
hazmatthat config-changed hook error is odd07:45
rogpeppeaxw: yes, that import sorting change was made mechanically, but the program was just a quick hack - it's not really suitable for using in production08:02
axwrogpeppe: ok08:02
rogpeppeaxw: in particular, it doesn't cope with comments well (the bugbear of go reformatting)08:02
axwah yes08:02
rogpeppeaxw: it doesn't actually use go/ast - it cheats08:02
rogpeppeaxw: did you see my question on golang-nuts, BTW?08:03
axwwell, we don't necessarily have to have something that makes source changes automated - just something to check they're wlel formatted08:03
axwrogpeppe: I did not08:03
* axw looks08:03
rogpeppeaxw: subject was "gofix and comment consistency"08:04
axwyup, reading now08:04
axwI had this issue with gocov, just gotta dredge the old source code to see if I actually solved it :)08:05
rogpeppeaxw: BTW in case you might find it useful, the sortimports code is this: http://paste.ubuntu.com/6953264/08:05
axwthanks :)08:06
axwrogpeppe: https://github.com/axw/gocov/blob/1f9133a687283076e46f1fb56ad58a76bbd7392b/gocov/instrument.go#L27308:07
rogpeppeaxw: ah... i'll try that08:07
rogpeppeaxw: thanks!08:07
axwbut.. you said you're ot using go/ast?08:07
axwnot*08:07
rogpeppeaxw: not for sortimports, but i am for the errgo changes - i did a gofix module for that08:08
axwoh in this case08:08
axwright08:08
rogpeppeaxw: unfortunately that solution (clearing out the File comments) doesn't seem to work for me - it ends up deleting the comment08:22
axwhrm08:22
rogpeppeaxw: the weird thing is that they must have encountered this issue in previous gofix modules08:23
rogpeppeaxw: i suppose it's just possible that there was no previous gofix that made the source code longer08:23
axwentirely possible... not really sure why the comments would disappear tho08:24
TheMuefwereade: Thx for your response to rogpeppe. The number of /var/log/juju in trunk is indeed high, the handling somewhat curious. Should be refactored, but in a different CL.08:50
fwereadeTheMue, I think that'd need to be a prereq for this one, thoug08:51
TheMuefwereade: Could be, yes.08:52
fwereadeTheMue, rogpeppe: thoughts re direct regexp filtering?08:54
rogpeppefwereade: as far as apps knowing our log format:  we could just pick a format and stick to it - a prefix-based format should be reasonably future-proof. in a way, you can think of the format as the interface definition.08:54
rogpeppefwereade: i had thought that it would be nice if command-line clients didn't have to use regexps though - we could potentially map from tag-set to regexp on the client side08:55
fwereaderogpeppe, it feels to me like tags are the language of the API, and if we want to filter by logging-entity we should darn well name it in the usual way over the API08:56
fwereaderogpeppe, regexps feel useful as well, but for different reasons08:57
TheMuerogpeppe: why the difference here? people would otherwise use it with a pipe to grep08:57
rogpeppefwereade: it seems to me that people are going to become dependent on the exact format of the log output whether we have explicit tag-level filtering or not08:58
fwereaderogpeppe, dependingon the content of individual messages feels qualitatively different from depending on the format of all messages08:58
TheMuerogpeppe, fwereade: remembering my own admin time I always took first an unfiltered look into the logs and then drilled down by the optimal greps08:59
rogpeppefwereade: i'm not sure i get that08:59
TheMuerogpeppe, fwereade: because it isn't always one machine, one unit. errors can have different reasons, on a higher level09:00
TheMuerogpeppe, fwereade: and I need easy ways to aggregate them09:00
rogpeppefwereade: the thing is that even if they filter by a few explicit units, the log output still needs to identify the message from each individual unit09:00
rogpeppefwereade: so the client-side code may well still need to know which line pertains to which unit in the filter09:01
fwereaderogpeppe, that's easily solved by having a connection per entity ;p09:02
rogpeppefwereade: that's not a good idea09:02
rogpeppefwereade: it doesn't scale well09:03
TheMuerogpeppe, fwereade: using tags how do I get the log entries of units 5, 7 and 9 of one service in one run to see the timeline and there how errors correlate, e.g. stablishing relations?09:03
fwereadeTheMue, how would you get that today?09:03
fwereadeTheMue, it seems very optimistic to assume you'll see perfect ordering once it's been through rsyslog09:04
TheMuefwereade: passing it as regex so that I've got a server-side filtering and only those are delivered (regardless if cli or api)09:04
rogpeppefwereade: BTW there's nothing to say that this interface *is* dependent on the exact log file format - we can always transform the text before filtering and delivering to the client09:04
TheMuefwereade: not a perfect one, but a nearer one than doing three individual calls09:04
fwereadeTheMue, I don't think that's a logically sound argument09:05
fwereadeTheMue, if it might be wrong, it might be wrong09:05
fwereadeTheMue, you either depend on it or you don't, and you can't with either aproach09:05
TheMuefwereade: shure it might be wrong, but it's the practical approach by admins09:05
TheMuefwereade: you wonna create a data warehouse09:05
TheMuefwereade: in this case we have to create an entity with dedicated fields in the database09:06
fwereadeTheMue, kind of, yes -- at the very least I'd like this API to have a chance of continuing to work if and when we do use grown-up logging09:06
TheMuefwereade: and an atomic tme sync on all nodes09:06
rogpeppefwereade: i think there's a lot to be said for providing some concrete definition of the log format here, because people *will* see it09:06
TheMuefwereade: and a good dwh api09:06
rogpeppefwereade: this is perhaps a good moment to do that.09:07
TheMuefwereade: but do we really want this? is this a requirement that currently exists or is it wishful thinking? who are the stakeholders for it and how do they work?09:07
fwereadeTheMue, I am one of the stakeholders because having juju be all amateur and flaky makes me sad09:08
TheMuefwereade: hehe, nice argument09:08
rogpeppefwereade: if we move to moving JSON-based (or other "richer format") logging at some point, we can still provide the current interface, i think.09:08
fwereadeTheMue, rogpeppe: my judgment was, and remains, that we don't have enough time or enough need *in this cycle* to do a proper logging database09:08
TheMuefwereade: sure it would be more powerful than flat files09:08
TheMuefwereade: but then you talk about a feature which isn't really cheap09:09
fwereadeTheMue, rogpeppe: but I still think it's important to provide an API at a level of abstraction that maps to the entities we're actualy playing with09:09
fwereadeTheMue, which is why we're not doing it this sysle09:09
fwereadeer s/sysle/cycle/09:09
TheMuefwereade: to define such a kind of api ask yourself what you really want to know from your environment09:10
TheMuefwereade: make a list of all questions09:10
TheMuefwereade: those define the constraints of the solution09:10
fwereadeTheMue, I know at the very least that I will sometimes want to see all the log output of a single tagged entity09:11
TheMuefwereade: and you're right, to have a good solution it quickly gets larger than possible in this cycle09:11
rogpeppefwereade: i get that you're concerned that the level that we're specifying filtering doesn't map to some of the entities that we might want to filter on, but the problem is that the filtered output is also part of the API09:11
fwereadeTheMue, which is why I'm pushing back on doing everything via regexp09:11
TheMuefwereade: how does using a regexp hindering you to get exactly that output?09:11
fwereaderogpeppe, yeah, I rather liked the idea of us transforming the output so we can impose a format on the way out09:11
fwereadeTheMue, rogpeppe: it means that once a client is using a prefix regexp we can't (say) move the uniter into the machine agent without a load of extra hassle09:12
fwereadeTheMue, rogpeppe: there'll be hassle anyay09:12
fwereadeTheMue, rogpeppe: but that will make it worse, I think09:13
rogpeppefwereade: how will it make moving the uniter into the machine agent harder?09:13
TheMuefwereade: if you talk about a "client", about what *exactly* do you talk? men, machines?09:14
fwereadeTheMue, rogpeppe: if we specify *what output we're interested in* rather than *certain coincidental features of that output* we get to change things freely internally and just need to fix them at the boundaries09:14
fwereadeTheMue, rogpeppe: both09:14
rogpeppefwereade: ah, each log entry is prefixed with the file it came from?09:14
fwereaderogpeppe, yeah -- and while I think we will need to hack that about a bit regardless, having external clients seeing those details directly will just further constrain us09:15
TheMuefwereade: as I said, admins are used to drill down. more problematic are hard coded machines to me. where are they and what exactly do they expect from the log output?09:15
fwereadeTheMue, you're writing one, aren't you? the CLI client...09:15
TheMuefwereade: here our log output is more than often enough not machine readable09:15
TheMuefwereade: the CLI is used by the admin who is drilling down09:16
TheMuefwereade: he is used to do so, with all current log formats09:16
TheMuefwereade: that's part of her job since years09:16
fwereadeTheMue, the admin who has to remember what version of juju is running on the server side to get the right messages? that seems unlikely to lead to general rejoicing09:16
TheMuefwereade: to support error analysis and monitoring by machines we need an absolutely different way of logging informations09:17
fwereadeTheMue, in case it's not clear I am 100% opposed to making people type `filter=^machine-1` on the CLI09:17
TheMuefwereade: tal /var/log/messages  | grep "something"09:18
fwereadeTheMue, I would much rather see it in juju language: `1 2 3/lxc/2 wordpress/7 mysql/3`09:18
TheMuefwereade: but I'm interested in ... | grep ' ERROR '09:18
fwereadeTheMue, yeah, that's a completely different conversation09:19
rogpeppefwereade: so if they do that and then see the log output, how do they know which log line corresponds to which entity?09:19
TheMuefwereade: or ... | grep failed09:19
fwereadeTheMue, you can and should be able to filter by regexp09:19
fwereadeTheMue, but regexp filtering is not appropriate for determining message source09:19
TheMuefwereade: sorry, different opinion by own experience here09:19
TheMuefwereade: often enough I start by "I don't know anything, so take a look."09:20
TheMuefwereade: and then, by getting hints in larger logs, I take deeper looks09:20
rogpeppefwereade: for example, I have suggested to the GUI team that if they're monitoring the log output from several units (perhaps hundreds) that they should use only a single log stream, and then demultiplex it at the client side09:20
TheMuefwereade: and those are not only single machines or units09:20
fwereadeTheMue, no objections there09:20
TheMuerogpeppe: good idea too, didn't thought of it so far09:21
rogpeppefwereade: one possibility that came to mind earlier: we could provide an API call that returns a regexp suitable for filtering the log according to a set of specified entities09:21
fwereadeTheMue, rogpeppe, AFAICS it's still not an argument for making clients filter by prefix09:21
fwereaderogpeppe, that's maybe interesting, but it feels like the time spent to implement it would be better spent on just writing the API at the appropriate level in the first place09:22
rogpeppefwereade: that would enable clients to demultiplex the log stream themselves, which just specifying the filter in terms of entities would not09:23
rogpeppefwereade: (assuming that's what you mean by "writing the API at the appropriate level")09:24
fwereaderogpeppe, but transforming on the way out *would* I think allow demuxing09:24
* TheMue feels sad - having a now nicely working solution on API and CLI, with local provider and <= 1.16 support09:24
rogpeppefwereade: transforming into what format on the way out?09:25
=== teknico_ is now known as teknico
TheMuerogpeppe: some kind of entities where the tag is a field, like the timestamp, the logging class and the message09:25
rogpeppeTheMue: it's not your fault - this is stuff that has not been thrashed out before09:26
fwereaderogpeppe, possibly the one we have right now, just prefixing by entity tag -- but *officially* in that format, not just by conincidence09:26
rogpeppefwereade: agreed09:26
TheMuerogpeppe: the solution, as it is, would already help people *today*, while changes later surely can be done09:26
rogpeppefwereade: i would like to take the time to define a format.09:27
rogpeppefwereade: but i agree with TheMue - what's there now is useful and better that what we already have09:27
rogpeppefwereade: (and also we want the regexp stuff too, so it's not like we'd be throwing anything away in the future)09:28
fwereadeTheMue, well, what we *originally* had was --include and --exclude by entity09:28
rogpeppefwereade: in pyjuju?09:28
fwereadeTheMue, rogpeppe: yes; was it not clear that we were still trying to go for feature parity here?09:28
fwereadeTheMue, rogpeppe: the existing implementation was known to be a filthy hack09:29
rogpeppefwereade: sure - i'd like that.09:29
fwereadeTheMue, rogpeppe: extending that hackery is less than ideal09:29
rogpeppefwereade: but i don't want to push TheMue's branch back by another couple of weeks while we sort all this out09:29
fwereadeTheMue, rogpeppe: especially since we'll be stuck with it for 5 years09:29
fwereadeTheMue, rogpeppe: IIRC TheMue's first implementation at least had include-by-tag, because I explicitly asked for it09:30
rogpeppefwereade: i *think* that the current branch could reasonably be the basis for something that *does* provide explicit tag-based filtering09:30
TheMuefwereade: --include / --exclude? sorry, what do I miss?09:30
fwereaderogpeppe, ok, but anything we land in the next couple of days is going to be in 1.1809:30
fwereadeTheMue, pyjuju09:31
TheMuefwereade: ah, ok09:31
rogpeppefwereade: i think that's ok - we can explicitly state that the log file format will probably change09:31
fwereadeTheMue, rogpeppe: why even land it if it can't help the gui?09:31
TheMuefwereade: using the current format it should be no problem to add a flag --tag that creates a filter09:31
fwereadeTheMue, the CLI shouldn't be using tags as input, should it?09:32
TheMuefwereade: why doesn't it help the gui?09:32
TheMuefwereade: the gui can pass filters too09:32
fwereadeTheMue, because if the format is going to change, the gui will need to change as well09:32
TheMuefwereade: that's called change management, yes *scnr*09:33
fwereadeTheMue, this is *exactly why* I care about doing it by tag09:33
TheMuefwereade: what do we do if the tag format changes?09:33
fwereadeTheMue, and why we had a couple of rounds on the original CL in which I tried to make sure you put the transformation from tag to prefix at the right layer09:33
fwereadeTheMue, I thought this *had* been hashed out09:34
rogpeppefwereade: blame me09:34
fwereadeTheMue, we don't change the tag format09:34
TheMuefwereade: just found "A camel is a horse designed by committee.", maybe that matches here09:34
TheMuefwereade: if we don't change the tag format, why aren't you sure that we don't change the log format?09:35
fwereaderogpeppe, TheMue: I do not care about blaming anybody, we should all be fundamentally aligned here...09:35
TheMuefwereade: my experience is that everything can change over time and the process has to handle it09:35
rogpeppefwereade: one possibility: we specify that, whatever format we decide on subsequently, we will define it so that the entity tag is at the start of the line09:35
fwereadeTheMue, the tag format is the language of the API, and we're stuck with it09:35
fwereadeTheMue, the log format has changed several times already09:36
rogpeppefwereade: but leave everything else unspecified for now09:36
rogpeppefwereade: that then makes the current scheme ok for future use09:36
TheMuefwereade: sounds like plan, but I've seen often enough things changing in long running projects. typical maintenance troubles09:37
TheMuefwereade: that's why I'm not as sure about it as you are09:37
fwereaderogpeppe, except that we *still* have to figure out what regexps refer to entities and unpick them if//when we use a distributed log db09:37
TheMuefwereade: and that's why I see no problem in change but I *very high* need in doing everything possible to enable changes09:38
fwereaderogpeppe, if we at least separate the channels for entity specification and message filtering we're in a slightly better position09:38
* TheMue gets philosophical09:38
rogpeppefwereade: that's actually not hard to do09:38
rogpeppefwereade: http://golang.org/pkg/regexp/#Regexp.LiteralPrefix09:38
fwereaderogpeppe, `|`?09:39
rogpeppefwereade: hmm, except that won't quite work09:39
rogpeppefwereade: yeah :-)09:39
fwereadeTheMue, I don't follow -- ISTM that having clients operate directly wrt an internal format detail makes change harder -- expand please?09:40
fwereadeTheMue, I am +1000 on designing for change where possible09:40
fwereadeTheMue, if I felt we were doing that to an adequate standard I would not be fussing like this09:40
rogpeppefwereade: that's an interesting point BTW09:40
rogpeppefwereade: (the possibility of a distributed-by-entity log file)09:41
fwereaderogpeppe, ah I hadn't thought of it that way actually :)09:41
* fwereade had started feeling smug for a moment there09:41
fwereaderogpeppe, TheMue: the heart of my argument is, I think, what I said a few lines back: entity specification and message filtering are different things, and we shouldn't conflate them09:42
rogpeppefwereade: ok, i think i'm sold09:43
rogpeppefwereade: but...09:43
rogpeppefwereade: i still think that this CL is a good foundation for putting entity specification in the API09:43
rogpeppefwereade: i think it's pretty much a strict subset of that09:44
rogpeppefwereade: so can i suggest we get it merged and then move on with adding explicit entity specification in the command line and the API?09:44
TheMuefwereade: I'm still searching for the use case where specifying the entity tag would help me09:45
fwereaderogpeppe, TheMue: I could live with that *if* we weren't just about to release 1.18 and have to carry what lands09:45
fwereadeTheMue, foo/1 is in an error state, I want to see the logs for foo/109:45
TheMuefwereade: yes, I can do so09:45
fwereadeTheMue, your *example* is "I want to see the logs for machine 1" ;p09:45
rogpeppefwereade: we can explicitly say that entity specification is not supported yet09:45
rogpeppefwereade: but it still gives people (and command-line clients in particular) a useful feature09:46
TheMuefwereade: yes, I can filter for it, no problem, but I can even filter deeper or more flexible09:46
fwereadeTheMue, rogpeppe: entity filtering is honestly trivial to add afaics, compared to the issues with /var/log/juju09:47
rogpeppefwereade: you're probably right. but i'd still do it as a separate CL, and then maybe land them together09:47
fwereadeTheMue, and you could also do so with direct entity specification09:47
fwereadeTheMue, if you want complete flexibility you can still do it by watching the environment logs09:48
rogpeppefwereade: i think it's a bit tough to say that a single CL has to land a complete feature09:48
fwereadeTheMue, and filtering from there09:48
fwereaderogpeppe, I'm not saying it does, necessarily, but if we release with this particular half-feature it encourages clients like the GUI to start depending on prefix filtering09:49
rogpeppefwereade: in that specific case it's easy - we tell them not to depend on it09:49
TheMuefwereade: sure I can, but I don't see the advantage09:49
fwereadeTheMue, correct me if I'm wrong: the GUI use case is "show logs for X entity"09:50
TheMuefwereade: operators simply grep through logs or use smnp with according monitoring applications (what even would be by far better)09:50
TheMuefwereade: what they can do by passing the filter09:51
TheMuefwereade: yes09:51
fwereadeTheMue, if the only way they can do that is by depending on implementation details, we have a problem, because we're suddenly unable to change those impl details without breaking clients09:51
TheMuefwereade: isn't implementing an API with a specific "tag" argument some kind of changeable implementation detail too?09:52
fwereadeTheMue, so the GUI shouldn't have a "show logs" button on an entity? it should just have a logging pane where users type regexps?09:52
* TheMue things of the hard changes from zk to mongo, from state to api ...09:52
fwereadeTheMue, the tag format is *explicitly* the unambiguous entity identifier for use in the API09:53
fwereadeTheMue, if we have to change that then *everything* breaks09:54
TheMuefwereade: "show logs" uses the regex for the current log format (could be changed when the log format ever changes) and "drill down" allows to enter a regex09:54
TheMuefwereade: like the change from zk to mongo09:54
TheMuefwereade: or the change from py to go09:54
fwereadeTheMue, so you'd rather add an API that converts from tag to reges, and make people use that, than just specifythe tag?09:54
TheMuefwereade: once again, I've seen enough software changing during my life09:54
fwereadeTheMue, believe me, so have I09:55
TheMuefwereade: users sees button, gui code in case of only one entity passes the correct filter for it (like it would pass the correct tag). additional ways provide more flexibility09:56
fwereadeTheMue, but I am somewhat baffled that you're advocating depending on an implementation detail, and pooh-poohing objections by saying that a defined and published external identifier ormat might also change09:56
fwereadeTheMue, *how does the gui know what the correct format is*?09:56
fwereadeTheMue, regexps good09:56
fwereadeTheMue, do not drop regexp support09:56
fwereadeTheMue, just, please, do not confuse it with entity specification09:57
TheMuefwereade: how does entering tags *and* filters work?09:58
TheMuefwereade: double grepping for tag first and then the regexp in there?09:58
fwereadeTheMue, given the current log format, yes, I think so09:59
TheMuefwereade: and when the regexp contains a ^, is it the beginning of the rest of the message behind the tag?09:59
rogpeppe[09:58:50] <TheMue> fwereade: double grepping for tag first and then the regexp in there?10:00
rogpeppethat seems like the model i was thinking of10:00
rogpeppethe tag is a first-level filter10:00
fwereadeTheMue, it *might* be nice if that were the case, yes, but I understand that's tedious10:00
rogpeppefwereade: i don't think that should be the case, FWIW10:01
TheMuefwereade: I already have a time problem as Curtis asked Abel and me to support Dave10:01
rogpeppefwereade: i think the regexp should exactly match against the lines produced10:01
TheMuefwereade: so no problem to enlarge the time problem :D10:01
fwereaderogpeppe, TheMue: yeah, it's probably a slightly different thing -- messagefilter=10:01
fwereadeTheMue, haha10:02
fwereadeTheMue, rogpeppe: ISTM that adding a query arg and grepping by that is not a major burden10:02
rogpeppefwereade: i really think this CL could land though10:02
rogpeppefwereade: it's not hard to do, no10:02
fwereadeTheMue, rogpeppe: I remain much more worried about the log-location stuff10:03
rogpeppefwereade: i'm just replying to that10:03
* TheMue passes his branch to rogpeppe for doing the not so hard to do stuff ;)10:03
fwereadeTheMue, rogpeppe: ISTM that it's not hooked up to rsyslog at all, and that this is a problem10:03
TheMuefwereade: yeah, the whole logging needs a rework10:03
TheMuefwereade: especially that the part of the rsyslogd and all-machines.log is a fire-and-forget10:04
rogpeppefwereade: the idea is not that log-location is arbitrarily specifiable10:04
fwereadeTheMue, but adding log-location adds a whole new way to break it10:04
fwereaderogpeppe, but this CL makes it so10:04
rogpeppefwereade: yes - i think that can be worked around though10:04
* fwereade frets but waits to read the response10:05
rogpeppefwereade: by, for instance, checking in Prepare10:05
TheMuefwereade: the log-location has been needed to give information only available during bootstrap to the state server later10:05
TheMuefwereade: but I'm not happy about it too10:05
TheMuefwereade: it's only for the beast "local provider"10:05
TheMuefwereade: we won't have that problem if machine-0 of the local provider would be a lxc container too10:06
TheMuefwereade: but maybe enough other probs then ;)10:06
fwereadeTheMue, yeah, but nested lxc is a beast10:06
fwereadeTheMue, we need something running on the host to add more containers on the host10:06
rogpeppefwereade: why would it need to nest?10:06
rogpeppefwereade: that's true10:07
TheMuerogpeppe: containers -to 010:07
rogpeppeTheMue: that doesn't need to work - you can't do that to *any* of the machines in the local provider10:07
fwereadeTheMue, not even that10:07
fwereadeTheMue, just adding machines 1, 2, 310:07
TheMuefwereade: hmm, a kind of extra daemon talking to the provisioner? no, too heavy10:08
rogpeppefwereade: but it could be a very limited-scope thing, rather than the whole shebang10:08
TheMuefwereade: yep, just seen your note10:08
fwereadeTheMue, yeah, I've been round that argument a couple of times in my head :)10:08
TheMuefwereade: come on, mr brain, you can do it in a couple of hours, can't you?10:08
fwereaderogpeppe, we *could* implement a daemon that exposed a cloud-provider-like API and just run that on the host, it's true10:08
fwereadeTheMue, ;p10:09
fwereaderogpeppe, but we didn't10:09
rogpeppefwereade: that would have been my inclination10:09
fwereaderogpeppe, might even have been better in hindsight, but hey ho, it is what it is10:09
rogpeppefwereade: so, to get back to log-location, what's a decent way for the local provider to pass the location of the log file to the machine-0 API server?10:10
fwereaderogpeppe, modulo upgrades, put it on the machine in state?10:11
fwereaderogpeppe, given upgrades, break layering :/10:11
TheMuerogpeppe, fwereade: I've chosen the config to not extent the environment entity10:11
rogpeppefwereade: one though i had was that it could go in the agent config file?10:12
rogpeppes/though/thought/10:12
fwereaderogpeppe, that sounds plausible, keep going10:12
rogpeppefwereade: it would then be passed into the api server by the machine agent10:12
fwereaderogpeppe, yeah, I think I like that10:13
rogpeppefwereade: and set up at bootstrap time by the provider10:13
rogpeppedarn, i nearly suggested that, but thought that log-location was actually fine in practice10:13
* TheMue now even more thinks of passing the stuff to rogpeppe 10:13
rogpeppeTheMue: i'm very sorry10:14
TheMuerogpeppe: who demands changes has to do them ;P10:15
rogpeppeTheMue: fwereade then :-)10:15
TheMuerogpeppe: h510:15
fwereade$ juju deploy rogpeppe -n 510:17
fwereadeERROR: blah blah10:17
fwereadedammit10:17
rogpeppeERROR: no units available10:17
* fwereade wonders if he can maybe get dimitern onto it -- jam?10:18
mgzfwereade: no jam back quite yet10:19
TheMuemgz: yep, finding pics from capetown in my fb timeline from time to time10:21
TheMues/from/og/10:21
TheMues/og/of/10:21
TheMueaaargh10:21
mgzTheMue: weel, he's back in dubai, but out right now10:21
TheMuemgz: ah, ok10:22
fwereadeTheMue, what is it you'll be doing for davecheney10:28
fwereade?10:28
TheMuefwereade: quickly forwarded you the mail by curtis. we not yet started, need still access to the according machines to use for development10:31
mattywany volunteers for helping me work out what's going on inside juju/api.go:212 (apiConfigConnect)10:42
mgzmattyw: what's confusing you there?10:43
mgzsummary is we try to connect to more than one api server at once10:44
mgzand if we get more than one error,10:44
jammgz: hey, I finally made it10:44
mgzprefer displaying the more specific ones10:44
mgzjam: just in time for standup - 1:1 after?10:45
jammgz: well, I'm meeting with nate after, but otherwise I would10:45
mattywmgz, ok - I'm struggling to see where the two connections happen - I'm implenting the id work - so you can add users and login at the command line-  and at the moment entering an invalid login doesn't fail - because it falls back to the user-admin10:45
mgzmattyw: l156/l17410:46
mgzand utils/parallel/try.go10:47
TheMuerogpeppe: could you add a sketch of you log-location alternative to the CL comments?10:47
rogpeppefwereade: standup?10:50
mattywmgz, thanks very much - I think I can see the next thing I need to do10:51
jamwallyworld: standup?10:53
rogpeppedimitern, fwereade, jam: this was the algorithm i had in mind: http://paste.ubuntu.com/6954172/12:32
dimiternrogpeppe, looking12:33
rogpeppeit's not easy to implement efficiently though if we're filtering many units12:33
rogpeppes/units/tags/12:34
rogpeppethe filtering operation is O(number of tags)12:34
dimiternlooks reasonable in general12:35
rogpeppeif we made the regexp match only the text following the tag, then we could be considerably more efficient (two regexp matches for any line, regardless of the number of units) but dealing with '^' in the regexp would be awkward12:36
jamrogpeppe: couldn't you always just mix the regexes together with '|' ?13:03
jam(^foo)|(^bar) should work fine13:03
rogpeppejam: not quite13:04
rogpeppejam: because the filter regexp starts from the beginning of the line, and that's also where the tag regexp starts13:04
jamrogpeppe: also, I'm not sure if your tagFilter matching is *quite* right because "unit-1" ends up matching "unit-10" which I don't think is intentional13:04
rogpeppejam: you could do something like this though: http://paste.ubuntu.com/6954294/13:05
rogpeppejam: yeah, the prefix should include the final :13:05
rogpeppejam: the above code won't work with '^', but it's not too hard to make it work, i think, although it's slightly icky13:06
jamrogpeppe: I also thought we wanted to support "service" as well, which would be a prefix without the :, but probably with the -13:07
rogpeppejam: yeah, definitely13:08
rogpeppejam: "service-wordpress" would turn into the prefix "unit-wordpress-" i think13:08
=== gary_poster|away is now known as gary_poster
rogpeppejam: the same kind of thing applies to the second example13:09
rogpeppejam, dimitern: couldn't resist making it work: http://paste.ubuntu.com/6954469/13:44
dimiternrogpeppe, nice!13:45
rogpeppedimitern: the icky bit is line 11813:46
dimiternrogpeppe, and 123 i guess13:46
rogpeppedimitern: well, that's only a consequence of the other13:46
rogpeppedimitern: in practice this is not actually a problem13:47
rogpeppedimitern: it just feels a bit dubious13:47
dimiternrogpeppe, i'll take that into account when i'm doing debug-log13:48
rogpeppedimitern, fwereade: one thing we didn't consider in this was what the command-line interface should look like13:53
dimiternrogpeppe, --include (optional, assumed it is) and --exclude (if given), each having tag[=regexp] perhaps?13:54
fwereaderogpeppe, list of entities by name-not-tag; empty implies environment; explicit --excludes; I like the name[=regexp] idea13:54
fwereade?13:54
rogpeppei also like the name[=regexp] idea13:55
rogpeppealthough perhaps ":" might seem more apt13:56
fwereaderogpeppe, I think I have a slight preference for `=` but I'm aware that --exclude=foo-bar is a bit weird13:57
fwereade--exclude=foo=bar13:57
rogpeppejuju debug-log --exclude 0:API wordpress mysql/113:58
rogpeppejuju debug-log exclude :API14:00
rogpeppejuju debug-log --exclude :API14:00
rogpepperather14:00
rogpeppemy preference for : is mainly from the fact that it's a very different kind of association from the other places = is used on the command line14:01
dimiternwhat's the ":" in there?14:02
marcoceppiany thoughts on this? https://bugs.launchpad.net/juju-core/+bug/1281583 I'm pretty sure I can hack it in, was wondering if there was any objections14:02
_mup_Bug #1281583: Juju should NOT put a .git directory in $CHARM_DIR <juju-core:New> <https://launchpad.net/bugs/1281583>14:02
rogpeppedimitern: it's my preference instead of "="14:02
dimiternrogpeppe, well, it's not entirely expected from a command-line argument formats14:03
rogpeppedimitern: is ":" special to the shell?14:03
dimiternrogpeppe, not really, it's a path separator14:03
rogpeppedimitern: only under windows14:04
dimiternrogpeppe, but it looks weird and non-*nix standard for CLI14:04
rogpeppedimitern: and that's not really relevant here, i think14:04
* rogpeppe tries to think of other places that use "=" as a separator like that14:04
dimiternrogpeppe, --exclude=foo=bar is the same as --exclude foo=bar as far as parsing is involved14:05
rogpeppedimitern: most places use it to associate attributes with values, don't they? this isn't quite that14:05
rogpeppedimitern: i agree there14:05
dimiternrogpeppe, the only places in a CLI where i think is common is to define host:port or ipv6 addresses14:05
dimiternmarcoceppi, fwereade is working on replacing the need for git entirely in the uniter14:06
rogpeppedimitern: usually the identifier on the lhs of an "=" is non-optional; i guess we could make that the case here though.14:06
rogpeppedimitern: so "juju debug-log =someregexp" becomes illegal and you have to do "juju debug-log environment=someregexp" instead14:07
rogpeppedimitern: somehow the equality sign seems slightly intuitively wrong, as there's no assignment or equality; we're saying "here's a tag and a filter that applies within that tag"/14:09
rogpeppeanother possibility might be to use square brackets: wordpress[regexp]14:09
marcoceppidimitern fwereade: will this land for 1.18?14:11
dimiternmarcoceppi, possibly14:11
dimiternrogpeppe, how about pairs of --include/exclude name --filter regexp ?14:12
rogpeppedimitern: not keen - it would be pain to do, and it doesn't really fit well with standard flag parsing logic14:13
rogpeppes/pain/a pain/14:13
dimiternmarcoceppi, the initial step is proposed (in charm package), but the uniter changes are not yet14:13
dimiternrogpeppe, [] will interfere with the regexp itself14:14
rogpeppedimitern: not really14:14
rogpeppedimitern: it's trivial to strip off before sending the regexp14:14
dimiternrogpeppe, i mean from the ux perspective - is it part of it? is it not? should I escape it? pretty much the same questions I keep asking myself with the weird emacs grep regexps14:15
rogpeppedimitern: i agree that the plain string concat is simpler14:16
dimiternrogpeppe, we can get even weirder --wordpress[=regexp] (i.e. --<name>[=regexp])14:29
rogpeppedimitern: no we can't :-)14:29
dimiternrogpeppe, or configure-style --with-<name>[=regexp] and --without-<name>[=regexp]14:36
rogpeppedimitern: that's still bad :-) flags should have a small known set of names14:36
dimiternrogpeppe, or just plain old -i (--include) name1[=regexp1] name2[=regexp2] -e (--exclude) name3[=regexp] ...14:37
dimiterni.e. everything after -i (--include) [default] is name-regexp pairs, same for -e (--exclude)14:37
rogpeppedimitern: tbh, i think william's idea of having excludes mentioned explicitly seems reasonable.14:38
rogpeppedimitern: the only point i quibbled was whether to use "=" or ":" as a separator14:38
dimiternrogpeppe, if it's just a *minor* quibble, then can you live with = ? :)14:38
rogpeppedimitern: i guess. still seems a bit wrong to me, but we'll see what people think.14:40
dimiternrogpeppe, what other people? you want to discuss it on the ML ?14:41
rogpeppedimitern: well, we probably should. i was really thinking of peoples' reactions when they see the new feature14:42
dimiternrogpeppe, right, that'll blow a minor implementation detail way out of proportion, but i guess it's worth at least announcing it :)14:43
rogpeppedimitern: how about writing the command docs as you'd get them from juju help debug-log14:44
rogpeppe?14:44
dimiternrogpeppe, sgtm14:44
dimiternrogpeppe, i'm about to write one about the environment/api urls/allwatcher, so I'll write about this one as well14:45
rogpeppedimitern: cool14:45
dimiternrogpeppe, so how does the allwatcher report changes that include an environment tag?15:03
dimiternrogpeppe, I couldn't see that in params.Delta15:03
rogpeppedimitern: good question - one mo, i'll have a look15:03
rogpeppedimitern: hmm, looks like it's the UUID-based environ tag15:08
rogpeppedimitern: the only place that does that is annotation changes15:08
dimiternrogpeppe, can you point me to the code?15:09
rogpeppedimitern: the relevant piece is in the State.Environment method15:09
dimiternrogpeppe, ta!15:10
rogpeppedimitern: where it initialises the annotator value with env.Tag()15:10
rogpeppedimitern: perhaps you could talk to the GUI guys about making their code compatible with both "environ" and "environ-343ab464"15:11
dimiternrogpeppe, but how does the response to AW.Next() look like if there's a change to env's annotations?15:13
dimiternrogpeppe, where's the actual tag included?15:13
rogpeppedimitern: the Delta.Entity field will be an AnnotationInfo containing the tag15:15
dimiternrogpeppe, ah, I see, cheers15:17
fwereademgz, sorry to hassle you when I know you're doing bugs, but I was wondering about https://code.launchpad.net/~dstroppa/juju-core/joyent-provider-storage/+merge/200851 -- can this be landed now?15:31
fwereadeTheMue, btw, not sure we said explicitly: dimitern is taking over your debug-log branch, so you can go do hardware enablement with a clear conscience :)15:32
mgzfwereade: I think so, but that does entail bringing in the gojoyent library15:35
fwereademgz, ahh... and I'm not sure I ever looked at that properly >_<15:35
fwereademgz, level of confidence?15:35
natefinchman, we really need a --quiet or something for the tests... when a bunch of things fail I just get a billion lines of useless log messages that make it impossible to actually see what tests are failing.15:37
mgzfwereade: I think we can do it would risking breaking anything else15:37
mgz*without15:37
mgz...that was a confusing braino15:37
fwereademgz, I managed to parse it :)15:37
fwereademgz, ok, cool15:38
fwereademgz, the joyent provider doesn't get compiled in anyway, does it?15:38
mgzwe've not added it to the magic place yet, no15:38
fwereademgz, ok, cool, please do land it in your, uh, Copious Free Time...15:39
* fwereade has to go see laura doing rudimentary flamenco, later all15:39
natefinchfwereade: sounds like fun :)15:39
mgzokay, I shall queue it up15:39
TheMuefwereade: thx for info, I already thought so following the discussions here15:45
sinzuiI anyone working  on bug 127193715:47
_mup_Bug #1271937: Use juju-mongodb when the package is available <arm64> <ci> <mongodb> <ppc64el> <trusty> <juju-core:Triaged> <https://launchpad.net/bugs/1271937>15:47
TheMuefwereade: and if my branch so far, as well as the Tailer, will find their way into Juju I'm happy15:48
natefinchsinzui: I'm working on landing it15:48
natefinchsinzui: hitting a ton of spurious test failures15:48
sinzuinatefinch, oh good. CI ran out of disk space over the weekend. Once your branch is merged and CI passed it, I will release. Can you ping me when your branch is merged?15:50
natefinchsinzui: sure thing15:50
sinzuiThank you!15:50
natefinchmgz, rogpeppe, dimitern: easy review?  https://codereview.appspot.com/65460043/16:36
dimiternnatefinch, looking16:36
natefinchdimitern: ta16:36
mgzdimitern wins16:36
rogpeppenatefinch: reviewed16:41
natefinchmgz: looks like rogpeppe wins where it counts ;)16:42
dimiternnatefinch, reviewed16:45
dimiternit counts how thorough you review as well :P16:46
natefinchrogpeppe, dimitern: thanks16:46
natefinchdimitern: haha yes, definitely16:46
rogpeppedimitern, natefinch: not entirely sure about "PrependPath", as it doesn't indicate the "patch" nature of it16:49
dimiternrogpeppe, natefinch, the thing that irks me a bit is that seeing s.PatchPath(blah) doesn't immediately tell me what happens to blah16:50
rogpeppedimitern: yeah, i definitely see that too16:50
dimiternrogpeppe, but I'm +1 for ExecPath16:50
rogpeppedimitern: i'm trying to think of a better way16:50
natefinchrogpeppe, dimitern:  I like PatchEnvPath better than PatchExecPath but I agree, getting some "prepend" in the name would be nice16:51
rogpeppenatefinch: one possibility: s.PatchEnvPath(dir, testbase.Prepend)16:52
rogpeppevs s.PatchEnvPath(dir, testbase.Overwrite)16:52
dimiternnatefinch, rogpeppe, that sgtm16:52
rogpeppeit makes it slightly longer, but the use is rare enough that i don't think it matters16:52
arosalesrogpeppe, fwereade, sinzui could you guys give me a very high level features targetted for 1.1816:53
rogpeppeand i'm sure there are places where we actually want to overwrite rather than prepending16:53
natefinchrogpeppe: except that almost everywhere (possibly 100% everywhere), we prepend, not overwrite16:53
sinzuiarosales, the 1.17.x release notes16:53
arosalessure but I think we still have some in the queue correct?16:54
sinzuiarosales, https://launchpad.net/juju-core/+milestone/1.17.0 https://launchpad.net/juju-core/+milestone/1.17.1 https://launchpad.net/juju-core/+milestone/1.17.216:54
rogpeppenatefinch: yeah - but it reads nicely, and actually perhaps some of those places don't actually want to inherit the system path16:54
arosalessinzui, thanks any major features targetted post 1.17.2?16:55
natefinchrogpeppe: but I'm not going to spend time to figure out what tests really don't want to inherit the system path.  All I was trying to do was wrap up some common code to do things the right way.   Complicating the interface because sometime we might need to overwrite the path does not seem like a good idea.16:55
sinzuiarosales, juju-mongodb16:55
rogpeppenatefinch: that's ok - i was only trying to think of a better name. PatchPrependEnvPath doesn't read so well.16:56
sinzuiarosales, juju-run, API-every-where is the hidden feature for developers.16:57
rogpeppenatefinch: or maybe it's actually ok, i'll leave it to your judgement16:57
natefinchrogpeppe: I know, it's terrible, that's why I was just going to do PatchEnvPath....  I dunno16:57
arosalessinzui, thanks16:57
rogpeppenatefinch: i think it reads quite nicely with the extra arg though16:58
rogpeppenatefinch: which is why i suggested it16:58
natefinchrogpeppe: yeah, if we could default it to prepending, that would be cool, but I hate adding a parameter when we're never actually going to set it differently (at least for now).16:58
rogpeppenatefinch: PathEnvPathByPrependingDir ?16:59
rogpeppes/Path/Patch/16:59
natefinchrogpeppe: can we somehow make it a FactoryBean, too? ;)17:01
natefinchrogpeppe: PatchEnvPathPrepend seems ok17:02
rogpeppenatefinch: i'd be ok with that17:02
natefinchrogpeppe: cool.17:02
dimiterni was going to suggest just that earlier in fact ;)17:02
hazmatugh.. regex17:32
hazmatwhy17:32
hazmatjust multi-include multi-exclude17:32
hazmatwith machines/units/services17:33
hazmati thought that got resolved 12 hrs ago17:33
hazmatdimitern, ^17:33
dimiternhazmat, because that's what we discussed today and hence the mail to ask for comments :)17:34
hazmatsent17:53
* rogpeppe is done for the day18:49
rogpeppeg'night all18:49
=== mwhudson is now known as zz_mwhudson
wallyworldfwereade: can i poke you to take another look at https://codereview.appspot.com/63730043/ when you next get a chance? i think all the issues have been fixed20:55
=== zz_mwhudson is now known as mwhudson
fwereadewallyworld, looking22:06
fwereadewallyworld, LGTM, tyvm22:11
wallyworldawesome, thanks for looking22:11
fwereadewallyworld, np22:11
fwereadewallyworld, would you let waigani know that I'd really like to see something that builds on the axw's Policy stuff for in-state environ validation? and that I *think* that, with replaceSettingsOp, that can actually nail all the issues I'm currently aware of around environ config changes, and it would make me ever so happy ;)22:12
wallyworldok, we like to make you happy22:13
* fwereade approves of this :)22:13
=== mwhudson is now known as zz_mwhudson
=== zz_mwhudson is now known as mwhudson
=== TheRealMue is now known as TheMue

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