=== tasdomas is now known as tasdomas_afk [00:18] davecheney: normally, the name of a compiled Go executable takes after the package directory name. can i change this so that the binary is named something different? eg the directory is "metadata" but I want the binary to be called "juju-metadata" when i do a go install [01:19] wallyworld_: you may have to rename or symlink after the fact maybe? [01:19] thumper: yeah, i was trying to avoid that since most devs just do a "go install" and it will be wrong [01:20] * thumper nods [01:20] package names can't have a - right? [01:20] right :-( [01:20] in which case you are rightly fcuked [01:20] we can add rules to the deb packaging config etc but i want devs to be able to use it easily also [01:20] i can also add a make target [01:21] but most core devs don't like the makefile :-( [01:21] it's all working apart from that [01:24] thumper: what i've done for now is make the package name "jujumetadata" so at least the binary has a reasonable, juju specific name in the default case where no rename is done as part of a local go install [01:25] wallyworld_: yes make a make-target [01:25] wallyworld_: and seems reasonable to have the long package name [01:25] * thumper looks for the default make target [01:25] will do. so between the make target and the juju* package name we should be ok [01:26] make all [01:26] and i'll look into how our release scripts work [01:26] make install maybe [01:26] make install is good i think [01:26] * thumper nods [01:26] there isn't one now [01:26] but should be easy enough [01:26] I will review that change if you like [01:26] I don't mind makefiles :) [01:26] what doesn't allow "-" in the package name? [01:27] Go [01:27] it does [01:27] "." isn't [01:27] it complained when i tried [01:27] let me try again [01:27] ah hang on [01:27] sorry, I'm thinking of commands [01:27] where the packagae name is "main" [01:29] axw: no, you are right. "-" is ok. not sure what i did the first time. thanks :-) [01:29] wallyworld_: nps [01:36] thumper: it seems i need to provide a --description argument to the plugin. what is the intent there? isn't description similar to purpose? or? [01:37] wallyworld_: --description is shown when someone goes "juju help metadata" [01:37] no, that's help isn't it [01:37] yeah [01:37] --description is shown when someone goes "juju help plugins" [01:37] should be a one liner [01:37] yes [01:37] right, but purpose does that doesn't it? [01:37] what purpose? [01:37] ie cmd.Info.Purpose is the one liner [01:38] plugins are defined to be language agnostic [01:38] and entirely unrelated to our cmd stuff [01:39] ok. i'll just make the plugin print Purpose since it's in Go [02:20] Yay! The landing bot is running again then? [02:36] should be [02:39] Oh. But nothing's landed, and all my pending branches failed because the build environment wasn't fully set up. [02:40] Working now. Mine could be the first branches in! [02:49] jtv: you have a merge conflict [02:49] Inevitable. Thanks for the notice. [02:50] But another one got in. Two more to go. [02:51] thumper: oh good, it's all imports! [02:51] Wouldn't it be nice if we could automate that kind of resolution... [02:52] Throw all imports from the conflicting branches together, split them up into the 3 categories and format, try a build, remove any imports that the compiler says aren't needed. [02:59] thumper: i've found an issue with the plugin command. it was incorrectly dropping arguments meant for the plugin. there's a simple one line fix. i'll add a test also [02:59] wallyworld_: you need to pass -- [02:59] to stop the supercommand parsing the extra args [02:59] so [02:59] juju plug -for-juju -- -for-plugin [03:00] hmmm. ok. i did this change [03:00] --- cmd/juju/plugin.go 2013-07-30 01:31:52 +0000 [03:00] +++ cmd/juju/plugin.go 2013-07-30 02:57:22 +0000 [03:00] @@ -26,7 +26,7 @@ [03:00] flags := gnuflag.NewFlagSet(subcommand, gnuflag.ContinueOnError) [03:00] flags.SetOutput(ioutil.Discard) [03:00] wallyworld_: Error: "@" is not a valid command. [03:00] plugin.SetFlags(flags) [03:00] - cmd.ParseArgs(plugin, flags, args) [03:00] + flags.Parse(false, args) [03:00] plugin.Init(flags.Args()) [03:00] schoool run [03:33] afternoon [03:41] thumper: back? [03:41] yep [03:41] just had a coffee :) [03:41] nice [03:42] bigjools: how's tricks? [03:42] thumper: awake, just, but twin1 is home at least [03:42] that must be a relief [03:43] thumper: with my change above, you no longer need the "--". without my change, the user can't run "juju metadata validate-image -r region" unless threy put in the "--" themselves which kinda sucks [03:44] with my change, the args just get flicked through to the plugin to handle [03:44] but plugins are environmental commands [03:44] so -e is valid [03:44] and -e needs to be handled by juju [03:45] to set the environment for the plugin [03:45] sure, -e works for me [03:45] as expected [03:45] -e does what? [03:45] pciks the env to use [03:45] juju metadata -e openstack validate-image -r foo [03:45] works [03:45] the tricky bit is where -e is parsed [03:45] is it parsed by juju [03:45] or the plugin? [03:46] hmmm. i think i made the plugin an env command [03:46] yeah... [03:46] so will need to check [03:46] so this would break other plugins [03:47] I do think the -- is the better solution [03:47] as sucky as it may be [03:47] i'll look into it a bit more. i really don't like the -- for built in plugins that are supposed to look like normal commands [03:49] yeah I know [03:49] but I'm not sure how to handle it better [03:49] without too much manual fuckery [03:50] will probably need work in gnuflag package [03:50] i'm hoping to avoid that [03:50] i'll see if i can insert the -- [03:50] since we are writing the "built in" plugin code [03:54] :) === axw_ is now known as axw [05:11] axw: do you have a gravatar? [05:12] thumper: umm yes [05:12] should be on axwalk@gmail.com [05:12] oh you mean for canonical.com? [05:12] * thumper marvals at the number of errors he just generated [05:12] axw: if you attach your canonical email address to your gravatar, it shows up in leankit [05:13] okey dokey [05:14] BOOM!!!! [05:14] that is what my tests say [05:17] * thumper should really focus on MAAS and not the logging stuff [05:19] OMG we have some awful tests [05:20] thumper: why are you surprised? [05:20] bigjools: I'm not really [05:21] ah so that was more of an Oh Em Gee rather than a OMG [05:23] * thumper nods [05:23] * thumper shelves this work [05:23] it needs more focus [05:23] * thumper goes back to maas [05:27] why does ssh use -p and scp use -P ? [05:27] * thumper pushes 24mb to bigjools [05:28] thumper: thanks a bunch :) [05:28] np [05:28] you have 35G free [05:28] sorry [05:28] 181G free [05:28] only 35 used [05:28] heaps of space [05:29] yeah that machine can be happily destroyed [05:29] I suspect my downlink is better than your uplink [05:30] bigjools: I bet it is too [05:30] 114.6KB/s to push over the ditch [05:33] * thumper bootstraps bigjools's maas [05:34] I always get confused as whether to put the s in 's for something that ends with s [05:34] is there a good rule? [05:34] bigjools: how long until maas realises there is a bootstrap and updates the gui? === tasdomas_afk is now known as tasdomas [05:38] thumper: instant [05:38] but it looks fooked [05:38] it didn't show anything [05:38] yeah not here either [05:38] even though bootstrap supposedly succeeded [05:38] refresh [05:38] ah, there we go [05:39] could be a timeout on rabbit etcetc [05:39] kk [05:39] so now wait 20 minutes? [05:39] yep [05:40] the node powered itself up so should be ok [05:40] you just deployed bare metal from 1500 miles away [05:41] \o/ [05:41] kinda cool [05:41] I'll come back later and poke the running instance === thumper is now known as thumper-afk [06:38] mornin' all === TheMue_ is now known as TheMue [07:39] i'd love a second review of this, please, if anyone wants to have a look. it's very small: https://codereview.appspot.com/12025043/ [07:39] TheMue: ^ [07:41] rogpeppe1: will look in a moment, my vm is just starting ;) [07:42] TheRealMue: thanks === TheRealMue is now known as TheMue [07:44] so I had a branch that failed tests on the bot... due to some missing imports in files I didn't change [07:44] I shouldn't need to manually merge from trunk first right? [07:45] https://code.launchpad.net/~axwalk/juju-core/lp1182898-add-version-flag/+merge/176849 [07:45] (now I have manually merged, and I need another review...) [07:45] rogpeppe1: could you resend the link pls? [07:45] TheMue: https://codereview.appspot.com/12025043/ [07:45] rogpeppe1: thx [07:46] TheMue: and https://codereview.appspot.com/12038045/ too, if you have a little more time [07:47] TheMue: (i accidentally incorporated the first one into it, so please ignore the upgrader package changes in the second one - they'll disappear when the first one gets merged into trunk) [07:50] rogpeppe1: first review done, looking at the second now ;) [07:51] TheMue: thanks! === ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: TheMue | Bugs: 5 Critical, 80 High - https://bugs.launchpad.net/juju-core/ [07:54] rogpeppe1: do you know what I need to do to make Go Bot happy here? [07:54] https://code.launchpad.net/~axwalk/juju-core/lp1182898-add-version-flag/+merge/176849/comments/399702 [07:54] axw: looking [07:54] axw: oh yes, it's poxy [07:54] axw: you need to reload the launchpad page before marking it Approved [07:55] axw: i *think* that's probably the reason [07:55] mmkay [07:55] axw: it marks the mp as "approved at this particular revision" [07:55] rogpeppe1: thanks, I'll give it a shot [07:55] ah [07:56] axw: it bites everyone [07:56] do you know why I would've got those test failures in the previous comment? [07:57] I didn't change any of that stuff in my branch [07:57] trunk should always be clean... and there would've been no merge conflicts [08:00] rogpeppe1: review is in [08:00] TheMue: ta! [08:00] axw: i'll have a look [08:01] axw: i've no idea, sorry - i haven't seen anything like that before [08:01] axw: i'd suspect mgz's bot setup [08:01] axw: we'll see if my MP goes in ok [08:02] axw: hmm, mine merged ok, so it looks like the bot *is* working [08:03] rogpeppe1: nps, thanks for checking [08:03] axw: see if it happens again [08:03] rogpeppe1: I already merged manually and pushed, which is the wrong thing to do... I hope that doesn't screw anything up? [08:04] axw: when the bot is working, that is frowned upon [08:04] axw: but given that i'm sure you ran all the tests, it seems reasonable while the bot is flaky [08:05] rogpeppe1: ok, sorry. hopefully it just works next time... [08:05] axw: yeah [08:06] rogpeppe1: when I say I merged manually, I mean I merged trunk into my branch and reapproved my MP [08:06] I didn't push to the trunk directly [08:06] axw: oh, that's standard practice [08:06] rogpeppe1: phew :) [08:13] :) [08:24] fwereade: ping [08:25] fwereade_: ping? [08:34] mgz: morning [08:35] hey thumper! [08:38] thumper, pong [08:38] fwereade_: hey, was thinking we hadn't chatted in a while [08:38] fwereade_: and was wondering if you wanted to catch up [08:41] * thumper sits on the edge of his seat waiting for a response... [08:46] mgz: did you want to catch up since I'm online anyway? [08:46] sure [08:47] mgz: skype, hangout, mumble? [08:48] anything but skype works for me :) [08:48] hangouts on my android phone really sucks the battery [08:48] mgz: so hangout is ok? [08:48] better than mumble normally [08:48] yup [08:57] axw, rogpeppe1: yeah, the bot doesn't want to resolve merge conflicts for you, it's not sentient [08:58] mgz: fair enough ;) where can I see the merge conflicts? [08:58] there weren't any when I did a manual merge [08:58] mgz: ah, that error message didn't look like a merge conflict [09:02] axw: `bzr merge --preview -d trunk mybranch` or similar [09:04] mgz: I already merged from trunk into my branch, and there were no conflicts [09:05] rogpeppe1: fwereade_: i've pushed changes to the validation branch. there's now built in plugin support, with the necessary changes to pass through args and help directives etc. so you can go 'juju help metadata' to get general plugin help listing the supported sub commands and 'juju help metadata validate-image' to get detailed help for that specifc command [09:05] not sure why, but I got this failure: https://code.launchpad.net/~axwalk/juju-core/lp1182898-add-version-flag/+merge/176849/comments/399279 [09:05] (I didn't touch any of those files) [09:05] wallyworld, cool, tyvm [09:06] fwereade_: see what you think. but i'm quite happy with the ui and how it works [09:06] axw: er, sorry, confusing things, looking at the right branch now (it's actually merged now) [09:06] wallyworld: great, thanks [09:07] btw, the binaries just get compiled and put in the normal bin directory [09:07] mgz: I'm not sure if it was necessary, but I merged from trunk after I got that failure, and then pushed back to LP and reapproved the MP [09:08] axw: the message from the bot is complaining that you hit 'approve' in the merge proposal at r1541, then pushed (or launchpad didn't register the push until) the merge of trunk as r1542 [09:08] so, you had an extra rev that wasn't in the change that was 'approved' [09:08] mgz: yep thanks, I understand that last error now [09:08] not really useful in this case as you're self landing [09:09] just not sure why the original test failure occurred [09:09] as there was never a merge conflict AFAICT [09:09] and I didn't change those files [09:09] that mp also has a note from yesterday when the bot was all borked while I was fixing, that can be ignored [09:09] thumper: we probs need to talk to fwereade_ about how/if we should try and record what containers a particular instance supports [09:10] there was a general "don't approve things" in place, but you may not have realised as it was at the end of last week and I didn't restate yesterday [09:10] mgz: okey dokey, sorry about that. I thought it was lifted [09:11] not until 6ish when I sent the email, but apart from confusing you did no harm :) [09:11] ;) cool [09:19] wallyworld: if i type "juju help commands", should i expect to see information on plugins there too? [09:21] rogpeppe1: no. you want to type juju help plugins [09:21] plugins can be bash scripts, python, whatever [09:21] wallyworld: ah, that needs to be documented somewhere [09:22] rogpeppe1: it is isn't it? thumper did all that work [09:22] wallyworld: oh yeah, it is [09:23] wallyworld: hmm, i'm not sure that "juju help topics" should be separate from "juju help" but that's a matter for a different discussion [09:24] wallyworld: BTW i'd expect "juju metadata generate-image --help" to work, but it doesn't [09:26] wallyworld: what does it mean to be a "built-in plugin" [09:26] ? [09:26] wallyworld: i.e. why is the metadata plugin special like that? [09:27] wallyworld__: what was the last thing you saw me say? [09:30] wallyworld__: ping [09:32] rogpeppe1: hi, sorry was washing up after dinner. i saw you say "oh yeah" [09:32] wallyworld__: ah, ok [09:32] [10:23:09] wallyworld: hmm, i'm not sure that "juju help topics" should be separate from "juju help" but that's a matter for a different discussion [09:33] rogpeppe1: juju help topics shows it [09:33] 10:24:03] wallyworld: BTW i'd expect "juju metadata generate-image --help" to work, but it doesn't [09:33] [10:26:23] wallyworld: what does it mean to be a "built-in plugin" [09:33] but the default help should have it shown too [09:33] [10:26:24] ? [09:33] [10:26:49] wallyworld: i.e. why is the metadata plugin special like that? [09:33] thumper: i'd forgotten about help topics [09:33] thumper: would it be unreasonable to merge "help topics" into "help" ? [09:33] rogpeppe1: that shows a bit much [09:34] especially as I'm trying to get more topics [09:34] like constraints [09:34] rogpeppe1: the --help should work i think. i'd been testing with help. plugin arg handling is a little different [09:34] and other... [09:34] rogpeppe1: built in just means it is shipped with juju [09:34] thumper: i wouldn't mind seeing a few more lines in juju help [09:34] out of the box [09:35] wallyworld__: why does "built-in" imply "doesn't allow interspersed flags" ? [09:35] rogpeppe1: I'd ask jcastro and marco what they think [09:35] thumper: +1 [09:36] wallyworld__: also, isn't the very point of a plugin that it's external to the main executable? [09:36] rogpeppe1: because that's what is needed to make the flag handling pass all the args to the next command invoked [09:36] rogpeppe1: it is external [09:36] it's a separate binary [09:37] wallyworld__: so why are built-in plugins special in their flag-handling requirements? [09:37] rogpeppe1: all plugins are [09:38] but external plugins require -- [09:38] and i'd rather make the built in ones look "native" [09:38] and not make the user type "--" [09:39] wallyworld__: that seems like unreasonable special-casing to me [09:39] wallyworld__: a plugin should be a plugin [09:39] wallyworld__: line 30 of https://codereview.appspot.com/11566043/diff/54001/cmd/juju/plugin.go seems weird to me [09:40] i disagree in this case. we don't want the user having to know to type "--" just to use functionality shipped with thr system [09:40] i made it a plugin to get it out of the main juju help topic [09:40] wallyworld__: if we want to make it a plugin, i think it should be a normal plugin. [09:40] i disagree [09:40] wallyworld__: if normal plugins are hard to use, that's another issue [09:40] it needs to be integrated better than that [09:41] wallyworld__: if we want it to be integrated, it should not be a plugin [09:41] wallyworld__: this seems to me to be the worst of both worlds [09:41] well, it was integrated [09:41] wallyworld__: i know, and we decided to make it a plugin [09:41] but then you guys wanted it a little more separated [09:41] wallyworld__: so i think it should be just that. no special casing. [09:41] yes, to uncluter juju help commands [09:41] but i do not want to make it hard for the user [09:42] wallyworld__: this just makes a *third* category of juju subcommand [09:42] users are not unix geeks [09:42] wallyworld__: which actually makes it harder for the user, IMO [09:42] wallyworld__: because they don't know what's going to happen (for example) to the -e flag [09:42] they do [09:42] -e behaves as expected [09:42] it selects an env to use [09:42] wallyworld__: it doesn't for metadata generate-image [09:43] i'd have to check that command, i can't recall if it needs an env or not [09:43] wallyworld__: it takes a -e flag that is *not* an environment [09:44] so that should change perhaps. should -e e reserved across all commands to only mean env? [09:44] be [09:44] wallyworld__: it is reserved in that way for all normal commands (and normal plugins too, i think) [09:44] wallyworld__: except when -- is used [09:45] ok. i'll change that arg name then [09:46] rogpeppe1: actually, that was supposed to be -u for that one [09:46] wallyworld__: i'd be much happier if all the "built-in plugin" stuff was removed too. it's almost self contradictory, and very odd, i think. [09:46] why? i disagree [09:46] wallyworld__: a plug-in is by definition not built-in, i think. [09:47] what? photoshop and other things ship with built in plug ins [09:47] lots of software does [09:47] the plugin mechanism is a framework [09:47] software can ship with built in tools that use the framework. and allow for external extension [09:48] wallyworld__: it seems like we're giving this particular plug-in special privileges because it's awkward to use as a normal plug-in. don't you think that other people providing plug-ins might have similar requirements? but they won't be able to switch on the "built-in" flag. [09:49] wallyworld__: perhaps we should make all plugins parse all their own flags, including -e [09:50] with externally written plugins, my mental model is that they are bolted on type thing. hence one has slightly different expectations [09:50] wallyworld__: how can the user possibly know which things are externally written and which are not? [09:50] the plugins do parse their own flags i think, even the built in ones [09:50] wallyworld__: i don't think they should have to know [09:51] wallyworld__: i think the standard flags are parsed before passing to the plugin [09:51] wallyworld__: and that's why allowIntersperse is true [09:52] wallyworld__: i agree that it's not a great user experience, because they need to know that -e is parsed by juju proper, and the other flags are parsed by the plugin itself [09:52] so the user types "juju help metadata validate-image" and they get told hoe to use the command. they don't really need to know it's a plugin [09:52] wallyworld__: and hence require a "--" separator [09:52] wallyworld__: the juju only *knows* about the metadata command because they typed "juju help plugins" [09:53] yes, that's how you wanted it! [09:53] otherwise i wouldn't have bothered with the work to make it a plugin [09:53] wallyworld__: i defer to fwereade_ [09:54] sorry. discussions on irc suck [09:54] wallyworld__: personally, i was ok with it being either a fully fledged plugin, or a fully builtin (set of) command(s). [09:54] wallyworld__: but this half-way house seems bad to me [09:54] wallyworld__: it's like "it's a plugin but it's not really" [09:55] the only difference i think is the use of "--" or not [09:55] wallyworld__: yes. and without that difference, would you actually *need* the concept of built-in plugins? [09:55] wallyworld__, I suspect rogpeppe1 has a point here, but I'll have to look closer [09:56] as a user, i would HATE to type "--" just to validate some image metdata [09:56] wallyworld__: then as a user you'll hate to use any juju plugin [09:56] wallyworld__: which means that our plugin concept is broken [09:56] maybe. but external ones give different expectations [09:57] built in ones need to be more integrated [09:57] wallyworld__: so let's fix that rather than providing a special-case hack because we don't like the way they work [09:57] since they ship with the system [09:57] wallyworld__: i think all plugins should work well [09:57] good night all [09:57] axw: cheerio [09:57] wallyworld__: and if we can't make the ones that ship with the system work well without special-case hacks, then we're doing something wrong [09:58] why did we force people to use "--" in the first place? was that a limitation of the gnu flags package? [09:58] wallyworld__: i agree with your motivation, BTW. i think it's nasty that the user has to add a "--" to pass flags to a plugin [09:59] wallyworld__: in a way, yes [09:59] wallyworld__: but actually it's a fundamental limitation of the gnu flag syntax [09:59] wallyworld__: you can't parse flags without knowing what flags are expected [10:00] wallyworld__: so what we'd like to do is parse *only* the standard flags and leave the rest for parsing by the plugin [10:00] sounds reasonable [10:00] wallyworld__: but that's impossible in general [10:00] so if we are going to fix the "--" i'd really like to land this as is and follow up separately [10:01] we know if we are processing a "missing command". can't we be less strict on the flags processing in that case [10:01] wallyworld__: i'd much prefer this to land with the command as a normal plugin, without the special-case built-in stuff. it makes the CL more huge than it needs to be [10:01] and just pass what we don;t know about through [10:02] wallyworld__: that's what i was saying - that's actually impossible [10:02] i don't want to impose the "--" on our users [10:02] built in means we get to do a better job of integrating [10:03] wallyworld__: if "better job of integrating" means "we don't need to pass --", and we're planning to fix that, then i don't see the point [10:03] like car accessories or whatever. stuff that comes with the vehicle out of the factory is alsways better than going to the auto shop and bolting on later [10:03] wallyworld__: let's not design it like that, please [10:04] this is about getting much needed functionality into user's hands with the desired interface [10:04] the built in handling is behind the scenes and can be fixed later for any existing plugins [10:04] to remove the "--" [10:04] wallyworld__: the functionality is much more important than the interface at this point [10:05] the ui is important too [10:05] wallyworld__: and this is unnecessary cruft in our code base [10:05] i don't want to ship something only to change the interface latert [10:05] its a few lines to handle tie "--" [10:05] the bulk of the code is business logic [10:06] we need to deliver incrementally [10:06] wallyworld__: speaking of delivering incrementally, that CL should really be split into about 3 or 4. [10:06] wallyworld__: i appreciate that you want to deliver the result though [10:07] it was smallish but then it grew [10:07] wallyworld__: but i'm sure you can deliver it and say "yes, the interface is currently provisional, but we're working on it" [10:07] wallyworld__: yeah, i know the feeling very well [10:07] well, i'd like the interface not to be provisonal [10:07] i like not having the "--" [10:08] i'd very much like not to put "temporary" hacks into the code base which may need to stay forever [10:08] i'd like to get this out there and then fix how existing external plugins work [10:08] sometimes we need to be pragmatic to be agile [10:09] wallyworld__: how about fixing things by always passing "false" to flags.Parse ? [10:09] that will break external plugins [10:09] wallyworld__: i think that might actually be a nicer solution actually [10:09] wallyworld__: i don't think so [10:09] wallyworld__: i don't think it will affect them at all [10:10] hmmm. i thought i tested it and it broke. tim seemed to think it would break stuff also. i can look again. i originally had it that way and tim had concerns [10:10] wallyworld__: it just means that you won't be able to do "juju some-plugin -e my-env" unless the plugin actually implements the -e flag [10:11] perhaps what you say above was the issue. can't recall now [10:11] wallyworld__: hmm, i'm not sure if "juju -e my-env some-plugin" will work actually [10:11] i'm not sure it would be wise to possibly break existing plugins [10:11] wallyworld__: *are* there any existing plugins? [10:12] yes, because the guys in oakland were *really* keen for them, that's why plugins were written [10:12] mainly mark mimms and his group [10:12] wallyworld__: i know they were keen for them, but have they actually written any yet? [10:13] i *think* so. i thought they wrote some while we were there [10:13] or re-purposed existing code as a plugin [10:14] rogpeppe1: let's finalise what we want to do with fwereade_after the standup maybe [10:14] wallyworld__: sgtm [10:15] much easier than typing [10:15] * wallyworld__ goes to open some more wine to prepare :-) [10:16] wallyworld__: sorry for the bother [10:17] rogpeppe1: no problem. it's a necessary discussion. i'd love to get rid of the "--" [10:18] irc is so impersonal [10:19] wallyworld__: BTW the fundamental difficulty with extracting the -e flags without disrupting the rest of the flags is that it can break command lines like: juju my-plugin --title $title [10:20] wallyworld__: consider what happens if $title happens to be '-environment-' [10:20] wouldn't the flags know that -title requires a value [10:21] and hence -env- is the value [10:21] that goes with -title [10:21] wallyworld__: no, because we're parsing them before my-plugin gets called [10:21] so maybe the flags that are typed after plugin are considered to belong to plugin are ignored by juju [10:21] wallyworld__: that's the main (only?) advantage that plugins provide for you, other than that you can call them with "juju my-plugin" [10:22] wallyworld__: i think that's a reasonable p.o.v. [10:22] wallyworld__: but it means that there's not necessarily any standardisation on -e/--environment [10:22] wallyworld__: it's what i was suggesting by passing allowIntersperse=false [10:23] so 'juju -e env -log debug my-plugin -t $title' [10:23] wallyworld__: yeah, i think allowing a -e flag to *any* juju command isn't a bad idea [10:23] well, -e would be for juju only i guess [10:27] wallyworld__: currently plugins will work when called as "juju some-plugin -e my-env", same as other commands (and also currently, a plugin doesn't have to interpret the -e flag). [10:28] wallyworld__: this would break that [10:28] hmmm. maybe we can live with that. not sure [10:29] wallyworld__: i'm not sure that's that important. i think it actually simplies juju itself, at the expense of making plugins marginally harder to implement (you need to parse the -e flag) [10:29] (rather than read the JUJU_ENV environment variable) [10:30] yeah. worth considering [10:47] quick shell script question: easiest way to sort a Go traceback by goroutine id? [10:48] rogpeppe1: I thought you were the one with all the fancy awk stuff for understanding go panics... [10:49] mgz: not afair... [10:49] mgz: though for tracebacks with hundreds of goroutines, i've been wondering about something to make them a bit more accessible [10:50] indeed. [10:50] mgz: something that would classify similar ones together, for example [10:51] i thought that someone might have a two line piece of python magic :-) [11:04] for the record: http://paste.ubuntu.com/5928595/ [11:08] aaaaah, got it, tests are passing again *phew* [11:24] fwereade: https://codereview.appspot.com/12034043/ [11:30] dimitern, sorry, I haven't done that very well, I just had a couple of comments I forgot to send [11:30] dimitern, I think rogpeppe1's comments generally made sense [11:31] fwereade: ok [11:31] standup all [11:31] fwereade: will repropose with his suggestions after the standup [11:32] dimitern, cool, cheers [12:24] gary_poster: nope; when I changed the source yesterday the web socket never would reconnect; I think I didn't do the self-signed cert acceptance dance right. [12:24] gggfddsfds; wrong chan [12:35] fwereade_: when you have a moment, i wouldn't mind having that chat about EnsureAPIInfo [12:36] rogpeppe1, one-on-one atm, then lunch I fear [12:36] fwereade_: np [12:36] * rogpeppe1 should have some lunch too [12:37] fwereade_: i'm tempted to drop EnsureAPIInfo entirely [12:37] fwereade_: anyone that needs to upgrade from 1.10 can upgrade to 1.12 first [13:37] hey guys [13:37] distro go this MP [13:38] https://code.launchpad.net/~tribaal/ubuntu/saucy/juju-core/add-bash-completion/+merge/177287 [13:38] but they feel this should be upstream [13:38] anyone know how I can put this on your merge radar instead of distros? [13:46] jcastro: interesting. i can't answer your question, but it makes me more convinced that "juju help commands" should print all commands, including plugins [13:46] so ... assign thumper [13:47] Is that what you meant? :) [13:49] hm, I have my unit logs over on the unit full of these: [13:49] error: --unit-name option expects "/" argument [13:49] that's all it has [13:49] any idea what command it was trying to run? [13:50] aha [13:50] exec /var/lib/juju/tools/unit-rabbitmq-server-0/jujud unit --data-dir /var/lib/juju --unit-name rabbitmq/server/0 --debug >> /var/log/juju/unit-rabbitmq-server-0.log 2>&1 [13:53] jcastro: quite possibly :-) [13:53] ahasenack: can you reproduce the problem from scratch? [13:54] rogpeppe1: I'm not sure, investigating still [13:54] I don't see any obvious typos so far [13:56] Any reviewers available for https://codereview.appspot.com/12103043 ? [13:56] jcastro: yeah, there are plugins as well [14:02] guys, what do you think about an option to destroy-unit like this: [14:02] juju destroy-unit foo/0 --terminate [14:03] it would also terminate the machine [14:03] or even for destroy-service too [14:03] ahasenack: you can try destroy-machine directly [14:03] oh? [14:03] * ahasenack checks that one out [14:04] dimitern: doesn't work [14:04] Machines that have assigned units, or are responsible for the environment, cannot be destroyed. [14:04] dimitern: right now the sequence is [14:04] dimitern: juju status, lookup machine id of the unit you are about to destroy [14:04] dimitern: juju destroy-unit unit/0 [14:04] dimitern: wait a few seconds [14:04] dimitern: juju terminate-machine [14:05] ahasenack: if you do terminate-machine you don't need to do destroy-unit before that i think [14:05] dimitern: the help says it won't destroy the machine [14:05] dimitern: and it's an alias to terminate-machine, which I can confirm doesn't do that. It stops if the machine still has a unit [14:06] I mean, destroy-machine (what you said before) is an alias to terminate-machine, which is what I have been using [14:06] ahasenack: ah, you're right yes [14:10] ahasenack: i think it should be possible to terminate any machine with destroy-machine, and it should do what's necessary to bring that about, but others (notably fwereade_) may have different opinions [14:10] fwereade_: ping [14:10] I would be happy with a --force option to destroy-machine, or --terminate option for destroy-unit [14:11] more the latter [14:11] just reading the --force docs would make me wonder if destroy-machine --force would also call destroy-unit, i.e., everything should happen in the right order [14:11] the second doesn't really make sense in the multipl-units-per-machine case [14:11] destroy-unit --terminate would mean 1) destroy-unit, run all the hooks that are needed; 2) terminate-machine [14:12] ah, there is that now [14:12] it could be so that --terminate would only terminate if the machine is vacant [14:12] because this workflow I described is something I use a *lot* [14:13] I destroy a unit or service, in preparation for a redeploy/add-unit, and I need the machine terminated, or else it will be used again as it was left [14:13] well, and with containerisation, machine reuse will be... less undesirable [14:13] what I'm doing now basically is looping over all machine ids and calling terminate, and letting juju decide if it can terminate the machine or not [14:13] because destrying the unit can just blow away the container [14:13] ahasenack: I don't think machines are "recyled" anymore [14:14] dpb1: still, the dangling machine builds up against my quota [14:14] ahasenack: yes, that is true [14:14] mgz: wondering about your thoughts on this: i'm considering making a change that will mean we can't upgrade a juju environment from 1.10 to current, although you'll be able to upgrade via 1.12. do you think that's reasonable? [14:15] mgz: basically, i'm trying to avoid one temporary hack spreading tentacles [14:15] fwereade_: if you're around, i'm talking about the EnsureAPIInfo hack here [14:16] personally, I don't care about upgrades at all, so maybe poke william :) [14:16] I always blow all my stuff away and redeploy === BradCrittenden is now known as bac [14:17] mgz: yeah, me too. but you might know of people that have stayed on 1.10 for whatever reason, peraps [14:17] having random point in trunk borked is always fine I think, but by "current" do you also mean rolling forward to 1.14? [14:17] mgz: yeah [14:17] mgz: if you're running 1.10, you'd need to upgrade via 1.12 [14:17] that might be more of an issue, because we do probably need some kind of upgrade path for what we've shipped in raring to what we'll ship in saucy [14:18] mgz: well, there *will* be an upgrade path [14:18] mgz: just that it's via 1.12 [14:18] mgz: but i guess if people can't readily get access to that, then, yeah, it might be a problem [14:18] mgz: darnit [14:18] hey folks, can i get some attention to https://bugs.launchpad.net/juju-core/+bug/1205112 [14:18] <_mup_> Bug #1205112: panic while setting a config value [14:19] sidnei: i'd like to help, but i didn't see a description of how to reproduce the problem [14:20] sidnei: i.e. have you got a way that i can reproduce it from scratch? [14:20] sidnei: or, alternatively, can you reproduce it reliably on tip? [14:21] sidnei: (in which case, i'd ask you to add a debug print in a particular place, which should help diagnose the problem) [14:21] rogpeppe1: i can look into that. im suspecting it may be charm specific even. i think it's reliably reproducible. [14:21] sidnei: i took a look at the code and couldn't see how the crash is possible [14:21] sidnei: thanks [14:22] rogpeppe1: i'm doing juju deploy --config, and only about half settings got set, and then trying to set any setting after that causes the panic. i think there might be some error during the deploy --config which is in the logs but i haven't looked there. [14:22] sidnei: that's entirely possible [14:22] sidnei: can you paste the config file, please? [14:23] sidnei: i suspect that's the source of the problem [14:23] rogpeppe1: http://paste.ubuntu.com/5929199/ [14:24] rogpeppe1: http://paste.ubuntu.com/5929208/ is the charms' config.yaml [14:26] sidnei: u1-stream is the name of the service, presumably? [14:26] rogpeppe1: correct [14:27] sidnei: is it significant that it's different from the service name in the bug report, or is that just a name change since then? [14:27] rogpeppe1: it's the same charm, different service name yes. [14:28] rogpeppe1: worth noting that the panic happens setting any config value, not just a specific one. my hunch is that there's something persisted from the --config that causes the comparison to blow up. [14:28] sidnei: are you seeing this against juju tip? [14:29] sidnei: (yes, that sounds very plausible) [14:29] rogpeppe1: tip-ish, revno 1544, i can update and try again. [14:29] sidnei: no, it's ok. i'll just give you a debug statement to add, and perhaps you could try again? [14:29] rogpeppe1, sidnei: gut suspicion: the dotted config names are treated specially by mongo, because santitizing our inputs? what's that? [14:30] fwereade_: i think you might have a good point there [14:30] fwereade_: likely. [14:30] rogpeppe1, sidnei: and they all get packed into $update foo.bar -> dict -> blam [14:30] fwereade_: we just use the names directly [14:31] fwereade_: i've used dotted config names since pyjuju supported them, to map into the charm's service dotted names directly. [14:31] fwereade_: yeah, and since there are several names for, say keystone, they'll be unmarshalled into a map perhaps [14:31] rogpeppe1, man, that Settings type pisses me off in more ways than I can count at this point [14:31] fwereade_: :-) [14:31] fwereade_: this is another reason for having some charm name restrictions [14:32] fwereade_: so at least we know the alphabet we're dealing with [14:32] rogpeppe1, +100 [14:32] fwereade_: i suggest that for the time being, we can just sanitise settings names [14:32] fwereade_: map . to... something [14:33] rogpeppe1, yeah, mumble grumble compatibility grumble, but yeah [14:33] fwereade_: we'll need to map back again too, of course [14:33] * rogpeppe1 goes to read about mongo name syntax [14:35] rogpeppe1, tbh all those keys should go in a subdict of the doc *anyway*, because one day someone is going to be baffled by the effect of trying to call a key txn-revno, or similar [14:36] rogpeppe1, but yes also sanitised [14:36] fwereade_: agreed [14:38] fwereade_: looks like we need to sanitize (at least) : "$", "." and leading digits [14:39] rogpeppe1, fwereade: updated https://codereview.appspot.com/12034043 [14:39] rogpeppe1, ok, and now I come to think of it compatibility isn't an issue [14:40] rogpeppe1, none of those will work anyway ;p [14:40] fwereade_: indeed [14:40] fwereade_: although we need to think carefully about our sanitisation [14:40] please take a look, i need to land this already - it's too huge to stay long, otherwise i'll run into some nasty conflicts [14:41] dimitern, will do [14:41] cheers! [14:51] * dimitern bbiab [15:10] dimitern: reviewed [15:10] fwereade_: chat about EnsureAPIInfo? [15:12] rogpeppe1, sure, couple of mins, would you start one please? [15:12] fwereade_: will do [15:12] fwereade_: https://plus.google.com/hangouts/_/f497381ca4d154890227b3b35a85a985b894b471?authuser=1 [15:20] rogpeppe1: thanks! [15:23] dimitern, reviewed [15:25] fwereade: cheers [15:52] Any reviewers in the house? Looking for someone to take a look at https://codereview.appspot.com/12103043 [16:03] jtv: swap ya: https://codereview.appspot.com/12114043 [16:03] anyone else too - it's a trivial deletion-only CL [16:06] rogpeppe1: hey, you know initially I wanted to argue with some of your suggestions, but as I went all of them fit quite nicely :) [16:06] dimitern: :-) === tasdomas is now known as tasdomas_afk [16:13] rogpeppe1, fwiw I think https://codereview.appspot.com/12097043/ is trivial; concur? [16:13] rogpeppe1, State.pareTag [16:14] fwereade_: yeah [16:14] rogpeppe1, cheers [16:14] fwereade_: oh, and i understand why you got weird linker errors too, i think [16:14] rogpeppe1, o yes? [16:14] fwereade_: it's because the tests fixtures themselves use State [16:15] fwereade_: so, i think, external packages are linked against the non-test version of the code. [16:15] rogpeppe1, hahaha, yes, that makes sense [16:15] fwereade_: that's my current theory anyway - i haven't spent any time verifying it [16:16] rogpeppe1, good enough for me, I resolved not to worry about it too much anyway ;) [16:17] jtv: reviewed [16:17] fwereade_: your review of https://codereview.appspot.com/12114043 appreciated too, please [16:29] rogpeppe1, btw, https://codereview.appspot.com/11723043/ [16:29] fwereade_: ha, thanks, i'd totally forgotten about that [16:39] * fwereade_ needs to be off, but will be back somewhat later to finish everybody's reviews [16:45] rogpeppe1: sorry, was out at lunch. was there any conclusion to what's the right fix? [16:46] sidnei: your temporary workaround fix, i'm afraid, is to avoid using "." in attribute names [16:46] sidnei: we need to sanitise the names used - the fix isn't hard, but we need to decide on an encoding scheme and actually do it [16:47] sidnei: the issue, we're pretty certain, is because the names are used directly in mongo, which interprets the "." specially. [16:47] rogpeppe1: updated again; one last look before I submit it? https://codereview.appspot.com/12034043 [16:48] dimitern: looking [16:49] rogpeppe1: hum, tricky but workable. i'd rather help you guys with implementing the sanitization though. [16:50] rogpeppe1: btw had to merge trunk to resolve a conflict, but no other changes, despite the diff showing otherwise [16:50] sidnei: you're welcome to propose a fix - the problem is in state/settings.go [16:52] rogpeppe1: just need a decision on the encoding scheme, and then i can work from there [16:53] sidnei: well, it needs to be reversible, and it needs to translate at least ".", "$" and probably leading digits (although i think we can probably just do "." and define the latter two as disallowed [16:53] ) [16:55] sidnei: "_"->"__"; "."->"_." ? [16:55] sidnei: oh no, that's wrong [16:55] :) [16:56] what about we pick '.' -> ':', and disallow ':' [16:56] sidnei: well, it depends if there are any current charms using "__" or "_." in attribute names [16:56] sidnei: depends if : is allowed in mongo names [16:56] sidnei: but that sounds like a good idea if it works [16:57] sidnei: if you could do some investigation into that (and perhaps if any current charms define attributes with : in), that would be really useful [16:59] rogpeppe1: if i read this correctly, they suggest using the unicode full width character replacements: http://docs.mongodb.org/manual/faq/developers/#faq-dollar-sign-escaping [17:00] sidnei: well found; i was looking for something like that [17:00] sidnei: i kinda prefer : though [17:01] still need to escape the $ no? [17:02] sidnei: i think i'd just disallow $ [17:02] ok [17:02] sidnei: although i'd like to do an audit of existing charms to check if anyone's using it [17:02] sidnei: they might, of course, be using full-width $ and . :-) [17:03] sidnei: i tell you what, let's just go with their suggestion. [17:04] sidnei: it seems reasonable and it's easy to implement and quite intuitive [17:04] okidoki [17:04] sidnei: if you want to make the change, you might want to know about http://golang.org/pkg/strings/#Replacer [17:05] was looking for that already :) [17:11] rogpeppe1: do you still want to reject '$' or just do the replacement? [17:11] sidnei: let's just do the replacement for the time being - at least there's a high assurance of backward compatibility doing it that way [17:12] sidnei: we can make charm config names more strict later [17:12] k === natefinch is now known as natefinch-lunch [17:22] rogpeppe1: does it look ok? [17:29] rogpeppe1: I see I'm too late to return the favour — not being very attentive late at night. Hope I can make up another day! [17:32] dimitern: sorry, just had to go away for a little bit. i've a few comments, one mo [17:34] rogpeppe1: sure, thanks [17:36] dimitern: reviewed [17:39] rogpeppe1: cheers [17:44] * rogpeppe1 has reached eod [17:44] g'night all [17:44] rogpeppe1: night! === tasdomas_afk is now known as tasdomas === natefinch-lunch is now known as natefinch [18:18] guys, so I just deployed juju-core trunk on canonistack and then ran "juju deploy rabbitmq-server", straight from the store, no options [18:18] got this in the rabbit's unit logs: [18:18] error: --unit-name option expects "/" argument [18:18] and look at the upstart job: [18:19] exec /var/lib/juju/tools/unit-rabbitmq-server-0/jujud unit --data-dir /var/lib/juju --unit-name rabbitmq/server/0 --debug >> /var/log/juju/unit-rabbitmq-server-0.log 2>&1 [18:19] something mangled the rabbitmq-server/0 unit name to rabbitmq/server/0 [18:21] https://bugs.launchpad.net/juju-core/+bug/1206628 it is [18:21] <_mup_> Bug #1206628: Incorrect unit name in upstart job [18:39] ahasenack: that's indeed a bug, stemming from the tags-to-names conversion I think, replacing - with /, etc. [18:39] dimitern: yeah, in state/api/deployer/unit.go there is such a conversion going on [18:39] func UnitTag(unitName string) string { [18:39] return unitTagPrefix + strings.Replace(unitName, "/", "-", -1) [18:40] ahasenack: :) that's my doing actually, quite recent even [18:40] I like living on the edge :) [18:40] ahasenack: i'll assign it to myself, thanks for the report [18:40] dimitern: thanks for taking care of it :) [18:42] ahasenack: i will look into it tomorrow [18:42] ok [18:42] * dimitern reached eod as well [18:42] good night all! [18:42] dimitern: g'night === tasdomas is now known as tasdomas_afk [21:03] morning [21:44] mgz: email update? [22:51] mramm: hey [22:52] hey [23:01] mramm: arosales i've got a call with one of y'all now, right ? [23:01] davecheney, :-) [23:01] I scheduled right after arosales [23:02] davecheney, I think I have the privilege of being up first [23:02] so it would be him [23:02] very well [23:02] fire at will [23:31] mramm: next please [23:32] joining [23:32] heh [23:54] gym time