/srv/irclogs.ubuntu.com/2012/11/29/#juju-dev.txt

wallyworld_davecheney: hi, if you had a few minutes, would you be able to take another look at my recent mp and hopefully +1 it. i've addressed the main issues and would like to land it to unblock things for others https://codereview.appspot.com/6782112/02:58
davechen1ywallyworld_: sorry I missed you06:32
wallyworld_no problem06:33
davechen1ymy wifi as been very flaky today06:33
davechen1yreviewing now06:33
wallyworld_ok, no hurry06:33
davechen1yyou've got two LGTM's06:33
davechen1yi'd just commit it so you can close out the day06:33
davechen1yany comments I make would be stylaistic06:33
wallyworld_ok, thanks, wasn't sure if your issues needed to be formalled +1ed06:33
wallyworld_but did address them06:33
davechen1ynah, we're a trusting lot06:34
wallyworld_a lot of the issues were already in the code i cut and pasted from elsewhere06:34
wallyworld_but i think everything is much better now06:34
davechen1ys'ok, it takes a while to learn the Go idioms, and then to intergrate them with the Canonical Go idioms06:34
wallyworld_yeah, tell me about it :-)06:38
wallyworld_especially the lack of interfaces06:38
wallyworld_davechen1y: so the lp mp is not approved, and that's also why i thought i might still need to seek approval06:42
wallyworld_ie it is still marked as needs review06:42
davechen1ywallyworld_: i don't know how it is done on goose06:42
davechen1ybut on juju-core we don't care about that06:42
davechen1yi don't know if you have any procedural interlocks on your project06:43
davechen1yon juju-ore lbox submit has always trusted me to do the right thing06:43
TheMueGood morning.06:44
wallyworld_davechen1y: ok, thanks, just wanted to check :-)06:44
davechen1ywallyworld_: might be a point to raise next tuesday06:44
wallyworld_ok. i guess i'm used ti using p for everything06:44
wallyworld_lp i mean, not p06:45
fwereadeTheMue, wallyworld_, davechen1y, mornings06:47
TheMuefwereade: Hiya.06:47
davechen1ymorning all06:47
TheMuedavechen1y: Have a nice evening. ;)06:48
wallyworld_fwereade: morning06:53
=== TheMue_ is now known as TheMue
rogpeppemorning campers!08:57
jammgz, dimitern, wallyworld_: I'm going to miss the standup today, we have a Parent Teacher conference this afternoon. But please go on without me.08:58
jamhi rogpeppe08:58
mgzjam: okay08:59
fwereaderogpeppe, btw, can I assume that state.Info.UseSSH will be disappearing soon?09:02
rogpeppefwereade: as soon as i submit this morning, yes09:02
fwereaderogpeppe, marvellous09:02
TheMuerogpeppe: Hiya09:03
TheMuejam: If I'm right you told something about looking for an OAuth package. Did you have any success with it?09:05
fwereadehey all, I need to be away for a couple of hours -- doctors appointment that I will parlay into an early lunch09:14
mgzokay, I hate type assertions and I hate json ;_;09:31
mgzif only unpacking into a struct actually worked here09:31
mgzrogpeppe: please help me find a non-idiotic way to do this09:32
rogpeppemgz: i'll try :-)09:32
rogpeppemgz: what's the json you're trying to parse?09:32
mgzI have json in the form {NAME: {"code": CODE, "message": MESSAGE}} where caps are variables, that I want to end up in a struct09:33
rogpeppemgz: map[string] struct{Code string; Message string} ?09:34
rogpeppemgz: i know it's not quite what you want09:34
rogpeppemgz: but at least you can avoid type assertions09:34
mgzI tried that09:35
rogpeppemgz: oh? seems like it should work09:35
mgzit sort of does...09:35
mgzin that it parses, but it doesn't ever not parse, which is a little annoying,09:36
mgzand what was the other thing...09:37
mgzit seems less bad than using map[string]interface{} and picking the bits out now I've tried that as well09:37
dimiternmgz: try explicitly specifying the fields with `json:"CODE"` after09:37
rogpeppedimitern: that won't make a difference if you're only unmarshalling - json does case folding09:38
dimiternrogpeppe: I see..09:38
rogpeppemgz: i'm not sure what you mean by "it doesn't ever not parse" - it seems like there are many things that it'll reject09:38
mgzI shall retry that method and see what tears I run into09:39
TheMuejam: Ping.09:39
mgzTheMue: I'm not sure if what he said earlier was the PTA thing was right now, or in an an hour over our standup09:40
mgz*parents evening09:41
rogpeppemgz: something like this seems not unreasonable: http://play.golang.org/p/xDBuMpNTTI09:42
TheMuemgz: Ah, ok, yes. Thx.09:42
rogpeppemgz: except it does accept spurious Name fields in the elements09:42
mgzrogpeppe: I don't mind the idea of having a different anon struct to unpack into then filling in the fields of the struct I care about rather than trying to directly map09:43
rogpeppemgz: yeah, that's a common approach09:43
rogpeppemgz: it means that json can do all the dogwork of checking for validity09:44
rogpeppemgz: using interface{} is something that's worth avoiding if at all possible09:44
mgzit seems working with dicts is just a pain in the bump comparitively09:44
mgzbump?09:45
rogpeppemgz: really? maps seem to me to be pretty similar to dicts09:49
rogpeppemgz: the problem is you want a key in the map to become a field in the struct09:50
mgzuntil you have anything nested, then there's a lot of interface{} not being helpful09:51
rogpeppemgz: ah, you mean when you've got different kinds of things in the map?09:51
mgzor just maps in maps.09:51
rogpeppemgz: should be fine too09:52
rogpeppemgz: map[x]map[y]z09:52
mgzit's nice in that it doesn't let you be sloppy (python/js makes it easy to write non-robust code and hard to write robust)09:52
mgzrogpeppe: only if there's an entirely uniform level of nesting09:53
rogpeppemgz: yeah.09:53
mgzso, yes, diverse types09:53
rogpeppemgz: you can still avoid interface{} though09:53
rogpeppemgz: sometimes09:53
rogpeppemgz: by judicious use of json.RawMessage09:53
mgzanon struct seems the nice sloppy way09:53
rogpeppemgz: certainly that can work if there's no clash in field names/types09:54
mgzokay, this is bad code, but what circumstances exactly do you get "err is shadowed by return"... seems the convention is to reuse the name, but then I have to declare again to use a specific type for a certain err09:59
mgzhm, looks like I don't need to redeclare, go is just trying to tell me my error struct is wrong10:02
mgzokay, test now works10:10
rogpeppecould some one please run some live tests in juju-core trunk for me please? i'm seeing a consistent failure, and i'm not sure if it's the result of a change in amazon or our code.10:12
rogpeppego test -amazon -gocheck.f 'BootstrapMultiple|GlobalPorts|StartStop'10:12
rogpeppein environs/ec210:12
rogpeppei'm consistently seeing 2 out of 3 of those tests passing10:12
rogpeppeTheMue: ^10:12
rogpeppedavechen1y: ^10:12
mgzI'll try it.10:13
TheMuerogpeppe: Yep, will do.10:13
rogpeppemgz, TheMue: thanks. the more the merrier.10:14
mgzhm, those tests also demand a public key in home... and want the amz style vars not euca ones...10:18
mgzrunning now.10:18
mgzor I assume it is, no output yet10:19
rogpeppemgz: yeah, sorry.10:19
rogpeppemgz: maybe we should accept euca-style vars10:20
TheMuerogpeppe: 5 PASS, 2 FAILED10:20
rogpeppeTheMue: good, it's not just me then10:20
dimiternmgz: isn't it weird we call the other services in goose nova and swift, and we call keystone - identity? we might as well call the others compute and object-store10:20
rogpeppeTheMue: which ones failed?10:20
mgzI got three failures, but probably different...10:20
TheMuerogpeppe: localLiveSuite.TestStartStop and LiveTests.TestStartStop, interesting.10:21
rogpeppemgz: if you got three failures, that'll be all of 'em10:21
rogpeppelooks like amazon is consistently taking more than 30 seconds to mark an instance as shutting down10:22
mgzmay be setup related though10:22
rogpeppemgz: could you paste your test failure text?10:22
mgzit's not getting an instance created10:22
mgzrogpeppe: http://pastebin.ubuntu.com/1396599/10:22
rogpeppemgz: i thought you had 3 failures10:23
rogpeppemgz: FWIW that one matches the error i'm seeing10:23
mgzthey're all that (as far as I could see, didn't pipe output anywhere10:24
rogpeppemgz: no, i think there must be quite a bit more output than that10:25
rogpeppemgz: can't you scroll back in your terminal?10:25
dimiternmgz, wallyworld_, jam: if there are no objections, I'll pick up the novaservice double next10:26
mgzokay, actually different10:26
wallyworld_dimitern: ok, i had just started a branch to do it, and put a card on the board10:26
mgzdimitern: yes, I'd be tempted to use compute and object-store as names10:26
wallyworld_but if you want it you can have it10:26
dimiternwallyworld_: well, if you stared and made good progress on it, maybe you should continue, since I'm just starting now10:27
rogpeppeTheMue: could you paste your test failures, please?10:27
TheMuerogpeppe: Sure.10:27
wallyworld_dimitern: i have hardly done anything except create the branch and copy one file10:27
* rogpeppe often finds that staring at things helps progress too.10:27
wallyworld_so if you can make good progress today, you may as well do it10:28
dimiternwallyworld_: ok, then I'd like to pick it up pls10:28
wallyworld_sure10:28
mgzrogpeppe: http://paste.ubuntu.com/1396611/10:28
TheMuerogpeppe: http://paste.ubuntu.com/1396612/10:28
mgzand pastebinit is nice...10:28
dimiternwallyworld_: i rather like how the swift double looks now and the nova one will be similar, if more complex10:28
wallyworld_yeah10:29
* rogpeppe wishes paste.ubuntu.com wrapped text.10:29
wallyworld_dimitern: i have a branch up for review whichs plugs the swift doublw into the tests, so it's all looking good10:29
mgzif you need to wrap text, it's a sign your test failure output sucks :)10:29
mgzoutputting the cloud config in a less violently horrible manner would be nice10:30
dimiternwallyworld_: yeah, I looked at it, but jam seems to have caught the most of it already10:30
rogpeppemgz: naah, long lines are useful10:30
rogpeppemgz: in this case one of the lines has the entire cloudinit file (6K). i've found it dead useful in the past, and it would be a pain if it was split up.10:31
mgzwhy? it's basically a yaml file10:31
mgzhaving it in serialised escaped form isn't really a win10:31
mgzyou're more likely to miss an error due to that than pick one up in the serialisation logic10:32
rogpeppemgz: that comment at the top is important :-)10:32
mgzthat's about the only bug you'd be likely to spot :P10:32
rogpeppemgz: the nice thing about it being on one line is i can grep for it10:33
rogpeppemgz: and changing \n to real newlines is trivial if i need to look at it10:33
rogpeppemgz: though it is perhaps a bad example, yeah.10:34
rogpeppethis line would be hard to split well though10:35
rogpeppe[LOG] 19.26103 JUJU environs/ec2: starting machine 0 in "sample-c9c3b04482e7d2fa" running tools version "1.9.3-quantal-amd64" from "https://s3.amazonaws.com/juju-test-c9c3b04482e7d2fa/tools/juju-1.9.3-quantal-amd64.tgz?Expires=1385720740&AWSAccessKeyId=AKIAJILHDJBMQGLFWX3A&Signature=QbS36DvUwVcdKNFiy2yyA42p5FQ%3D"10:35
rogpeppejust the url is too long10:35
rogpeppeanyway, horizontal scrollbars for text is *never* right.10:36
mgzthat's the whole ugliness of using pre-signed urls to designate public access10:36
mgzrather than using a bucket with public acls10:36
mgzwhich causes me no end of pain...10:36
rogpeppemgz: in that case, public acls would be wrong - it's a private bucket.10:37
mgzright, which is why the code is a pain10:37
rogpeppemgz: interesting. because you can't do a similar thing under openstack?10:37
mgzthere should be two buckets if we want one that needs public access and one that needs to be private10:37
mgzrogpeppe: swift has middleware to emulate this oddness, no one actually enables it though, because why would you?10:38
rogpeppemgz: there are two such buckets. in this case, it's private, but we want to let stuff that we start have access to it.10:38
mgzrogpeppe: then you want a bucket you can set acls to the stuff you want to be able to access it then10:38
rogpeppemgz: so perhaps we should create a new user when we start an environment and create acls that allow access to only that user?10:39
mgzhaving an obscure url that enables access from anywhere is just ugh10:39
rogpeppemgz: the problem AFAICS with the acls is that if someone has access to the bucket, they have access to everything else that the named user can do10:40
rogpeppemgz: in this case we don't want to pass the amz credentials to anything except the bootstrap node10:40
mgzthere are two ways of doing it in swift10:41
mgzone is user-based, and involves passing a token10:41
mgzthe other is address based, so you can limit to local addresses at least (or just make public)10:42
rogpeppemgz: i'm interested in this stuff - how does the former work then?10:42
rogpeppemgz: i don't think the latter is appropriate for what we want to do (we're talking IP addresses, right?)10:42
mgzthe same way as all the other auth, so pass keystone some creds and get a token. this has the issues you were talking about if you just have the main user account10:44
rogpeppein fact, i'm not sure we really care if anyone reads our private bucket - it doesn't hold any sensitive info10:44
rogpeppemgz: how is that different in principle from the above signed url?10:44
mgzrogpeppe: right, that's what my assessment was, hence the current openstack provider just setting the bucket to let anyone access it10:45
rogpeppemgz: yeah, just as long as they can't mutate it10:45
mgzrogpeppe: the main difference is I can implement one of them reliably and not the other.10:45
rogpeppemgz: the other thing is we need to be able to access the contents of the bucket from the command line with no juju installed10:46
rogpeppemgz: and preferably without apt-getting too much stuff10:46
mgzwget works...10:47
rogpeppemgz: yeah, that's what we're using. would it work with the token passing method?10:48
mgztrying to use keystone probably isn't sane, as I'm reasonabnly sure tenant management is an admin level thing, so there's no sane way to create a new one based on your user with more limited permissions10:48
mgzand you can create a token scoped to a particular region, but not to a single service I belive10:49
* rogpeppe wants SPKI-style delegation :-)10:50
wallyworld_mgz: it is time!11:00
dimiternjam: we're on mumble11:00
mgzdimitern: no jam11:01
rogpeppethe weird thing about those test failures is that at least one of them is the local suite failing... but running without amazon tests, the local suite passes consistently.11:21
wallyworld_mgz: we lost you?11:22
niemeyerGoood mornings11:25
dimiternniemeyer: morning!11:25
rogpeppeniemeyer: hiya11:27
mgz_dimitern, wallyworld_: sorry about that, cow-orking place has router issues :)11:28
dimiternmgz_: no worries, we practically finished, everyone's happy :)11:28
niemeyerWOohay happiness11:28
dimiternniemeyer: the warm, fuzzy feeling of taming a free-range openstack11:29
=== mgz_ is now known as mgz
rogpeppedimitern: you still want to watch out for that nasty bite though11:30
TheMuelunchtime, biab11:30
dimiternrogpeppe: :)11:30
fwereaderogpeppe, do you think that maybe cloudinit.caCertPath() should actually be environs.CaCertPath()?12:02
rogpeppefwereade: possibly. although it's relative to DataDir, so possibly environs.CACertPath(dataDir string)12:03
fwereaderogpeppe, sorry, yeah, that was what I meant12:04
rogpeppefwereade: ah12:04
rogpeppefwereade: you're looking at container, presumably12:05
fwereaderogpeppe, yeah, more-or-less12:05
rogpeppefwereade: i *think* that's the only place that would need it12:06
fwereaderogpeppe, I feel like there's something we could do better with the state.Info12:06
fwereaderogpeppe, well, cloudinit too :)12:06
fwereaderogpeppe, but yeah12:06
rogpeppefwereade: ok, the only *other* place we'd need it :-)12:06
rogpeppefwereade: what are you thinking about state.Info ?12:07
fwereaderogpeppe, the thing currently on my mind is that isolated units will need their own cert files12:07
rogpeppefwereade: why so?12:07
fwereaderogpeppe, they can't see outside their containers12:07
rogpeppefwereade: oh yeah, definitely12:07
rogpeppefwereade: the container package would be responsible for putting those in place12:08
fwereaderogpeppe, and that it might end up simplest if we copy all the stateinfo info into a single file in the agent dir12:08
fwereaderogpeppe, ie addrs, cert, name, password12:08
fwereaderogpeppe, we already have pw, name is implicit, addrs is passed, and password is...complex12:08
rogpeppefwereade: yeah, i've been toying with the idea of just serialising the stateinfo12:08
fwereaderogpeppe, I'm +1 on that I think12:09
rogpeppefwereade: i'm not sure12:09
rogpeppefwereade: it's quite nice being able to invoke jujud directly without manufacturing some serialised stateinfo12:10
rogpeppefwereade: although tbh, have i ever done that? i'm not sure.12:10
fwereaderogpeppe, I have once or twice, but it's rare12:10
rogpeppefwereade: actually, it's not quite that simple12:11
rogpeppefwereade: agents want to share the CACert but not all state info12:11
rogpeppefwereade: although...12:11
fwereaderogpeppe, yeah, understood, we have distinct identity & passwords12:11
rogpeppefwereade: i'm trying to think through to what happens when we want to update a CA cert12:12
fwereaderogpeppe, heh, I've been worrying about that but dodging my own questions there12:12
rogpeppefwereade: i think it makes sense to have a per-agent version, like we have a per-agent version of the tools12:12
rogpeppefwereade: then we can apply the same kind of upgrade approach12:13
fwereaderogpeppe, handwave accepted, sounds plausible :)12:13
rogpeppefwereade: i.e. an agent changes its own stateinfo file12:13
rogpeppefwereade: i'm starting to like the idea more12:14
fwereaderogpeppe, I'm not sure how significant it is that a stateinfo file will in fact contain *everything* needed to run an agent12:14
rogpeppefwereade: not necessarily12:14
fwereaderogpeppe, because it includes entityname, from which we can infer unit/machine name/id12:14
rogpeppefwereade: some agents need more12:14
rogpeppefwereade: actually, no12:15
fwereaderogpeppe, bother, what am I missing12:15
fwereadeoh cool12:15
rogpeppefwereade: bootstrap-state needs the environ details12:15
fwereaderogpeppe, ah yeah12:15
fwereaderogpeppe, that's only in jujud by coincidence really though12:15
rogpeppefwereade: dataDir ?12:16
fwereaderogpeppe, ha, true12:16
fwereaderogpeppe, but still12:16
fwereaderogpeppe, `jujud agent machine-0 /var/lib/juju` works out quite nice actually, I think, assuming the stateinfo file has a predictable location12:17
rogpeppefwereade: there's another problem: i'm not sure we can pass arguments containing newlines to an upstarted command12:17
fwereaderogpeppe, base64 of yaml12:17
fwereaderogpeppe, juju agent even12:18
rogpeppefwereade: actually, yeah, we don't *want* to12:18
fwereaderogpeppe, sorry, expand please?12:18
rogpeppefwereade: the above arguments look greatr12:18
rogpeppes/tr/t/12:18
fwereaderogpeppe, ah ok12:18
rogpeppefwereade: we don't need to pass anything substantial to the command12:18
rogpeppefwereade: and those two facts (entity name and data dir) are the two invariants of an agent12:19
rogpeppefwereade: everything else could change12:19
rogpeppefwereade: so it makes sense to put those in the upstart script and have everything else come from the fs12:20
fwereaderogpeppe, yeah, that is my thought too12:20
* rogpeppe looks forward to deleting all those command-line flags12:21
fwereademe too :)12:21
fwereadethe question is doing it12:21
rogpeppefwereade: we'll leave it for the time being - it's not actively harmful12:21
rogpeppefwereade: it can be done whenever12:21
fwereaderogpeppe, yeah12:21
fwereaderogpeppe, well12:21
fwereaderogpeppe, it actually rather complicates the upgrade situation12:22
rogpeppefwereade: ?12:22
fwereaderogpeppe, agents will need to rewrite their own upstart confs12:23
rogpeppefwereade: why's that?12:23
fwereaderogpeppe, `jujud unit --unit-name u/0 ...` != `jujud agent unit-u-0 ...`12:23
rogpeppefwereade: oh yeah. excellent point.12:23
rogpeppefwereade: best to pare it down while we can do it easily12:24
fwereaderogpeppe, and I'd rather avoid ever having to do that12:24
fwereaderogpeppe, yeah12:24
rogpeppefwereade: in fact, now is a good moment, because adding TLS is also backwardly incompatible12:24
fwereaderogpeppe, oh! in that case, ++cool12:24
fwereaderogpeppe, is there any chance you'd be free to look into doing that now while the API ferments in your mind?12:25
niemeyerWhy is that a significant advantage again?12:25
rogpeppefwereade: i'm thinking that rather than having a single file containing all of state.Info, we'd have a different file for each element of it.12:25
fwereaderogpeppe, that would simplify some things12:26
rogpeppeniemeyer: it makes it easy to change, for instance, the state servers we connect to12:26
rogpeppeniemeyer: or the CA cert12:26
niemeyerI don't see how changing the command line offers that12:26
rogpeppeniemeyer: currently the state server addresses are baked into the upstart script12:27
rogpeppeniemeyer: and the CA cert is shared amongst all agents12:27
niemeyerrogpeppe: That's a seed address.. we'll continue to need seed addresses, and that will continue to change over the lifetime of the service12:27
fwereadeniemeyer, all sorts of things are in the upstart script now, and it will always be challenging to change that12:27
fwereadeniemeyer, a layer of indirection really does feel helpful here12:27
rogpeppeniemeyer: we'll need a seed address, but we'll want the seed address to be able to change too.12:27
niemeyerfwereade: I don't see how "jujud agent machine-0 /foo/bar" is a layer of indirection and "jujud unit --unit-name u/0" is not12:28
fwereadeniemeyer, it's all the other args that are subject to change isn't it? --state-servers etc12:28
rogpeppefwereade: actually it's just state-servers12:29
fwereadeniemeyer, if we end up needing to add a flag in future, it will be extremely tedious12:29
niemeyerfwereade: These are seed addresses.. they'll necessarily change over the lifetime of the service, and the service can happily track those wherever12:29
fwereaderogpeppe, ok; but --initial-password is also a changing piece of data12:29
rogpeppefwereade: no it's not12:29
fwereaderogpeppe, as may be ca-cert in future12:29
fwereaderogpeppe, the *password* does change12:30
rogpeppefwereade: ca-cert is already a file name12:30
fwereaderogpeppe, initial-password does at some point outlive its usefulness12:30
fwereaderogpeppe, and more to the point I don't believe we'll ever be able to say we won't need to add more flags at some stage12:30
rogpeppefwereade: i'm not sure - we need to know when the password is initial12:30
niemeyerfwereade: Indeed, but it'd be easier to understand if your argument was "--initial-password outlives its usefulness, let's remove it"12:30
rogpeppefwereade: that's not a problem12:30
rogpeppefwereade: rather, the proposed scheme isn't any better in that respect12:31
fwereaderogpeppe, IMO it is a problem if we have agents rewriting their own upstart jobs12:31
rogpeppefwereade: we don't add flags, we add stuff to data dir12:31
niemeyerI don't think we proposed that12:31
fwereaderogpeppe, that is my overriding concern12:31
niemeyer(I didn't, at least)12:31
fwereadeniemeyer, how do we accommodate cmdline api changes without rewriting our own upstart jobs?12:32
rogpeppefwereade: and i think that's the best argument for the change - the agent name and the data dir are the only two things that *need* to be passed as command line args12:32
niemeyerfwereade: You're backing a proposal on the question12:32
niemeyerbaking12:32
niemeyerfwereade: Nobody suggested changing cmdline arguments I believe12:32
fwereadeniemeyer, well, we just did12:32
niemeyerfwereade: Okay, I didn't12:32
fwereadeniemeyer, I think it is somewhat optimistic to state that we never will again :)12:32
fwereadeniemeyer, we just did change them12:32
niemeyerfwereade: Where?12:33
fwereadeniemeyer, jujud <agent> --ca-cert12:33
fwereadeniemeyer, is new12:33
rogpeppeyeah state.Info may easily change in the future12:33
rogpeppeand if it did, we'd need to add stuff in dataDir rather than adding more command-line args12:34
rogpeppei think12:34
fwereadeniemeyer, I'm suggesting that if we make a point of storing all that information in the agent directory instead, and stuck to that, we would at least eliminate that source of future pain12:34
niemeyerfwereade: Okay, so what's your proposal?  Dropping --ca-cert?12:34
niemeyerfwereade: There would be no ca-cert there..12:34
fwereadeniemeyer, `jujud agent <entity-name> <data-dir>`12:34
niemeyerfwereade: That doesn't solve anything12:35
niemeyerfwereade: Which is why I was confused12:35
niemeyerfwereade: Changing the command line format won't magically remove arguments from it12:35
fwereadeniemeyer, ...and write the state we want to write into the agent dir, which the agent can then use...12:35
niemeyerfwereade: What you're arguing about is to remove arguments12:35
rogpeppeniemeyer: i think that information provides the agent with enough to find out all that it needs to12:35
niemeyerrogpeppe: We already know how to find the data dir12:35
fwereadeniemeyer, yes, I'm saying that we can and should be able to completely configure an agent knowing nothing but those two arguments12:36
niemeyerrogpeppe: We don't need to change anything12:36
rogpeppeniemeyer: assuming that dataDir and the agent dir have been primed12:36
niemeyerrogpeppe: The only argument being made here is to drop command line arguments12:36
fwereadeniemeyer, we already have a --data-dir arg, yes12:36
rogpeppeniemeyer: we're saying that data dir and entity name are all we need12:36
rogpeppeniemeyer: which makes things simpler12:36
rogpeppeniemeyer: and just as flexible12:36
niemeyerrogpeppe: Sorry, I don't get it..12:37
niemeyerrogpeppe: There are two different concerns being crossed over12:37
niemeyerThe main point I've seen so far is that we couldn't introduce --ca-cert because we'd have to change the upstart script12:37
niemeyerWhat would happen if we did not add that to the upstart script?12:38
fwereadeniemeyer, yes, that is the heart of my concern12:38
niemeyerThe certificate would magically appear under data dir?12:38
rogpeppeniemeyer: yes12:38
niemeyerrogpeppe: How!?12:38
fwereadeniemeyer, we would have to give the information to a unit while it was being installed, yes12:38
rogpeppeniemeyer: it already does12:38
niemeyerrogpeppe: No, it doesn't.. if I bootstrapped an environment, it doesn't have a CA12:38
fwereadeniemeyer, we are merely proposing changing the channel by which we pass all the other info like cert and servers12:39
rogpeppeniemeyer: sure it does. the CA is an argument to cloudinit.MachineConfig12:39
niemeyerrogpeppe: That you *just added*12:39
niemeyerrogpeppe: My environment from 1 month ago doesn't have anything about that12:39
niemeyerrogpeppe: How would that work?12:39
fwereadeniemeyer, so what will happen now, if we upgrade from pre-tls to post-tls, is that all the pre-tls scripts, lacking --ca-certs, will fail to run12:40
rogpeppeniemeyer: we'd need to provide some mechanism for state.Info upgrade12:40
niemeyerfwereade: What will happen in your proposed world?12:40
rogpeppeniemeyer: perhaps not too far removed from our current upgrade logic12:40
niemeyerfwereade: We don't have a --ca-cert.. we have a data-dir, that does not have a ca-cert12:40
niemeyerfwereade: How does that help the upgrade case to work smoothly?12:40
fwereadeniemeyer, I *think* that this can be addressed by running post-upgrade operations12:41
fwereadeniemeyer, it requires additional infrastructure12:41
niemeyerfwereade: Which operations?  There's nothing there, no CA in the machine or locally, and we haven't coded anything about that12:41
fwereadeniemeyer, honestly it feels like almost exactly the same problem as any major version upgrade12:41
niemeyerfwereade: How will the upgrade work then?12:41
niemeyerfwereade: Exactly12:42
fwereadeniemeyer, using the same set of waving hands we have employed in the past for major-version upgrades12:42
niemeyerfwereade: That's my concern. We're all happily agreeing to fiddle with logic in the name of avoiding future issues, but it's not clear how that would have avoided any issues.12:42
fwereadeniemeyer, the lesson here may be that the version we're about to release should be a major-version upgrade12:42
niemeyerfwereade: If the ca-cert file under datadir was optional, the --ca-cert could be optional too12:42
fwereadeniemeyer, we avoid one specific issue about which I have a bee in my bonnet12:43
fwereadeniemeyer, rewriting upstart jobs12:43
niemeyerfwereade: That would be the case indeed, if we hadn't clearly stated that we're doing breaking changes for now12:43
fwereadeniemeyer, ok, cool, I couldn't remember an official statement of that and was fretting a little :)12:43
niemeyerfwereade: I did say that openly during UDS12:43
niemeyerfwereade: When we discussed versioning12:44
fwereadeniemeyer, but I am not saying that this change will solve the major-version-upgrade problem12:44
rogpeppefwereade: i'm not sure that it needs a major-version upgrade actually12:44
niemeyerfwereade: Right, which is why I'm concerned12:44
niemeyerfwereade: We're about to dive into fiddling with call semantics, without a clear win12:44
fwereadeniemeyer, I am saying that it solves one small but real sub-problem12:44
niemeyerfwereade: Which one again!? :-)12:45
rogpeppeniemeyer: i don't think this proposed change actually fixes anything we can't fix in the future, but i think we will end up at a place where the current command line arguments feel like pure cruft12:45
niemeyerfwereade: Please tell me about a real problem we have that it is solving.. maybe that'll clarify the point12:45
rogpeppeniemeyer: but we have to continue supporting them12:45
rogpeppeniemeyer: because they're baked into all the upstart scripts12:46
rogpeppeniemeyer: so perhaps in that sense it's more of an aethetic change12:46
rogpeppeaesthetic12:46
fwereadeniemeyer, the problem is that implicit version information is encoded in the upstart scripts, and it upsets me to have anyone other than the installer messing with upstart scripts12:46
rogpeppefwereade: i don't think that's actually a problem in practice12:47
niemeyerfwereade: We have never messed up with upstart scripts12:47
fwereadeniemeyer, by removing it, we separate the agent installation concern from the upgrade concern12:47
rogpeppefwereade: we just support the current command line args forever, and never change tem12:47
rogpeppethem12:47
fwereaderogpeppe, are they currently so wonderful that it seems sensible to enshrine them forever? :)12:48
niemeyerfwereade: But sure, if the argument is "let's remove --ca-cert", so be it.. it's not a real problem we have, but could be one day12:48
rogpeppefwereade: absolutely not.12:48
rogpeppefwereade: but it's not a technical problem.12:48
niemeyerRight12:49
niemeyerfwereade: If you want to remove --initial-password as well for the same reason, I also don't mind12:49
rogpeppefwereade: i want to remove them just because i don't like unnecessary cruft that's just there for backward-compatibility purposes.12:49
niemeyerfwereade: I'm just observing that, in practice, even if we hadn't introduced --ca-cert, compatibility would be broken12:49
fwereadeniemeyer, I understand that, and that wasn't what I was trying to address12:50
rogpeppefwereade: that's totally true. quite apart from the fact we're now dialling a different port and speaking a different protocol :-)12:50
rogpeppes/fwreade/niemeyer/ :-)12:50
fwereadeniemeyer, I can't quite tell if you're -1 on the whole idea or just pointing out that I haven't solved the problem you thought I was trying to12:52
rogpeppeafk12:54
niemeyerfwereade: Dropping options and agreeing on the convention you described sounds like a good idea. Rewording "jujud unit --unit-name u/0" as "jujud agent unit-0" sounds purely fiddly with no benefit.12:55
fwereadeniemeyer, I dunno, I think it'll make the jujud code rather nicer actually12:56
fwereadeniemeyer, that shared agent stuff is not bad, but not awesome either12:56
niemeyerfwereade: Well, that's why we have reviews for then.. I've been wrong before12:57
fwereadeniemeyer, ok, I will add it to my less-critical-maybe-sometime list (unless rogpeppe wants to do it now ;))12:57
niemeyerfwereade: Well, now is the time to do it if you want to do it12:58
fwereadeniemeyer, or maybe I'll turn out to be wrong and I'll write the code and then quietly pretend it never happened ;)12:58
niemeyerfwereade: Because we're breaking compatibility due to the ca-cert stuff12:58
fwereadeniemeyer, well, I'd thought so... gaaaaah hmm I think the installer stuff will also break compatibility12:59
fwereadeniemeyer, so either I do that *now* (which I might...) and maybe get it into this compatibility-break... or we're due one in the future12:59
niemeyerfwereade: Please try to imagine what we'd have to do if we had different workers requiring different information13:00
niemeyerfwereade: I mean, while doing the change13:00
fwereadeniemeyer, I *hope* they'd get their information from the state via their entity name13:01
fwereadeniemeyer, as units and machines do now13:01
niemeyerfwereade: Their data-dir doesn't have to look alike either13:01
fwereadeniemeyer, agreed -- I'm just proposing that every agent have a few common expected state-info-related files somewhere in their agent dirs13:02
niemeyerfwereade: So basically what's being said is that we'd be using the "unit" in unit-0 instead of the "unit" in "jujud unit'13:02
niemeyerfwereade: Okay13:02
fwereadeniemeyer, that should impose no further restrictions on what else is stored there13:02
fwereadeniemeyer, yeah13:02
niemeyerfwereade: The point I'm making, just to be clear, is that different workers may require (and do require, I believe) different data13:03
niemeyerfwereade: Right now we have two "agents" only13:04
niemeyerfwereade: Which means two small command files that are clear entry points within cmd/jujud13:04
fwereadeniemeyer, I am suggesting that they should always be in a position to get that data from state in their own ways, and to store it in their own ways, but that the mechanism by which they connect to state should be the same13:04
niemeyerfwereade: There's logic that is not about connecting to the state in those files13:05
niemeyerfwereade: although it is true that there's logic that is common too13:05
niemeyerfwereade: Anyway, I'll be happy to review the change..13:06
fwereadeniemeyer, it feels like the common stuff would be a lot clearer, and the differences would be an if or two13:06
niemeyerfwereade: After the refactoring of the watchers, right?13:06
niemeyerfwereade: ;-)13:06
fwereadeniemeyer, that was exactly my point re my being able to do it right now ;-)13:06
niemeyerfwereade: Well, it's also my point :-)13:07
rogpeppeback13:07
fwereadeniemeyer, well, there we are -- it won't happen this change13:07
fwereadeniemeyer, this release^^13:07
fwereadeniemeyer, but if I miss this release with the installer, which I probably will unless *everything* goes right13:08
fwereadeniemeyer, there will be a future compatibility-breaker13:08
fwereadeniemeyer, and I will consider it for inclusion then13:08
niemeyerfwereade: Well, as long as the change proves fruitful, I personally wouldn't mind introducing it in a follow up13:09
niemeyerfwereade: As long as we don't take too long13:09
fwereadeniemeyer, I have a few branching followups on my plate still, I don't want to commit to any more at this moment13:10
fwereadeniemeyer, I will try to work it into the interstices of my days but I make no guarantees :)13:10
niemeyerfwereade: Sounds good :)13:12
rogpeppelunch13:59
niemeyerrogpeppe: Enjoy14:10
rogpeppeniemeyer: i did14:11
mgz...that was fast devouring14:13
niemeyerrogpeppe: Wow :)14:16
niemeyerI'm going to lunch too, but I'll take a bit longer :)14:16
rogpeppeTheMue, mgz: here's one fix for the broken tests: https://codereview.appspot.com/685012114:25
TheMuerogpeppe: Ah, great, I'll take a look.14:25
* mgz looksies14:27
TheMuerogpeppe: You've got a LGTM, testing the new number of instances and that it is contained sounds reasonable.14:30
TheMuerogpeppe: So the old constraint of the test isn't valid anymore, ah.14:32
rogpeppeTheMue: actually, it never was14:32
mgzrogpeppe: hm, one failure14:32
rogpeppeTheMue: just nobody ever ran the tests without that Destroy method14:32
mgz... value *s3.Error = &s3.Error{StatusCode:409, Code:"BucketNotEmpty", Message:"The bucket you tried to delete is not empty", BucketName:"juju-test-c740682924903b28" ....14:33
TheMuerogpeppe: Oh.14:33
rogpeppemgz: which test failed there?14:33
mgz'TestEC2'14:33
rogpeppemgz: i'm going through trying to fix a few live tests 'cos today seems like a good day for bad eventual consistency14:33
rogpeppemgz: could you paste the test output?14:34
mgzI'll give you a chunk, basically at the destroy stage14:34
rogpeppemgz: i'd prefer to see the whole thing...14:34
mgzso, bad eventual consistency seems likely, delete bucket contents then delete bucket before that hits14:35
rogpeppemgz: but i'll go for whatever you've got14:35
mgzrogpeppe: http://paste.ubuntu.com/1397007/14:36
mgzoo, and a new failure14:37
rogpeppemgz: unfortunately that snippet doesn't tell me what test failed14:38
rogpeppemgz: although i can probably guess the right place to fix14:40
mgzrogpeppe: http://paste.ubuntu.com/1397016/14:40
mgzperhaps some dirty state, will try again as well14:40
rogpeppemgz: handshake failure is a common thing. the right solution is to handle it in goamz (or maybe go core)14:41
rogpeppemgz: niemeyer's been promising to do that for ages14:41
rogpeppemgz: i don't know if it's amazon messing up there or the Go libraries14:41
mgzwhat should I run after merging a branch to make go test happy by the way?14:41
rogpeppemgz: it should be happy anyway14:42
rogpeppemgz: oh, you mean the warnings14:42
rogpeppemgz: go test -i14:42
rogpeppemgz: (as it suggests)14:42
mgzoh, so really just that?14:42
rogpeppemgz: yeah14:42
rogpeppemgz: and even that's not necessary14:42
mgz...piped that run to a file, so of course it passed14:42
mgzone more14:43
rogpeppemgz: for a while i was running the live tests continually in a loop14:43
rogpeppemgz: that seems to be the only way to find the less usual failure modes. eventual consistency is a bitch.14:43
rogpeppemgz: at one stage i did plan on modelling eventual consistency in the test server, but it's a right pain to do, and even if you do, who's to say it's anything like amz's.14:44
mgzwell, some things are reason-able14:46
mgzlike not being able to delete certain things that depend on other things having already been deleted14:47
mgz(security groups, containers, ....)14:47
mgz...naturally tests refuse to fail again14:47
rogpeppemgz: of course14:48
mgzrogpeppe: commented14:56
rogpeppemgz: i agree with some of your comment. perhaps we should have a specific test that tests AllInstances. the test does, however, control the lifetime of other instances - we can assume, i think, that this test is running in a uniquely named environment (we take steps to ensure that)14:59
rogpeppemgz: AllInstances doesn't return all instances on the given account15:00
rogpeppemgz: it returns all instances started by the current environment15:00
mgzrogpeppe: right. main thing would either #1 make the assert actually use set logic, or #2 change that comment15:02
mgzrogpeppe: ah right, and the environment is generated and not from your user's envrionments.yaml, which is the clash I was envisioning15:03
rogpeppemgz: yeah. i think i'll go with the easier option for the time being. i don't particularly feel we need more AllInstances tests.15:04
rogpeppemgz: yes15:04
rogpeppemgz: with a random name15:04
rogpeppemgz: thing is, even if it used set logic, it wouldn't test anything because currently there's at most one other instance there.15:05
rogpeppemgz: i suppose we could assert that the initialInsts len is at most 1.15:05
mgzset logic is easy! assertEqual(set([1]), set(after).difference(before))15:06
mgzit tests the uniqueness of the listing, which isn't really a bug we expect I suspect15:07
mgzso, comment change is probably what I'd go for15:07
rogpeppemgz: i don't see how that tests the uniqueness of the listing15:13
rogpeppemgz: it converts everything to sets15:13
rogpeppemgz: which instantly loses dupes15:13
mgz...that is entirely correct15:13
mgzI'm just confusing myself for no purpose15:14
* rogpeppe just got a 90 quid parking fine notice through the door15:14
rogpeppebastards15:14
mgzaich15:15
TheMuerogpeppe: Uuuh.15:15
niemeyerrogpeppe: Did you park it in a wrong place or not?15:23
niemeyerrogpeppe: :)15:23
rogpeppeniemeyer: no, carmen did, as far as i can make out...15:24
niemeyerrogpeppe: Well.. so they were just doing their job..15:24
rogpeppeniemeyer: i know, but bastards anyway :-)15:24
niemeyerLOL15:24
niemeyerSo SpamapS is leaving.. I had no idea15:24
rogpeppeniemeyer: i thought you might know why15:25
rogpeppeniemeyer: it's a great pity15:25
mgzrogpeppe: wait, is that the name of a member of the family? I was trying to parse as car-men and couldn't work out what job they would be doing on your car...15:27
rogpeppemgz: my wife :-)15:27
* rogpeppe still feels a little strange saying "wife"15:28
niemeyerROTFL15:28
niemeyermgz: Arguably, the car-men did help15:28
niemeyerrogpeppe: I don't.. I read warthogs very sparingly, and often too late to even comment since the thread has been dead for ages by then15:30
rogpeppeniemeyer: i read it about once every couple of months myself.15:30
rogpeppeniemeyer: but i thought you might've heard through other channels.15:30
niemeyerrogpeppe: Not this time15:31
rogpeppemgz, niemeyer: just found the story of the car park - it was in a retail park, and the first 2h30m were free... but Carmen didn't realise that and spent 4 hours shopping...16:06
niemeyerrogpeppe: Aw.. sucks :(16:07
mgzthat's horrible...16:07
rogpeppeniemeyer: i bet they get loads of people like that. the shops there are enormous, very easy to spend more than 2.5 hours16:07
mgzfour hours shopping!16:07
rogpeppemgz: yeah, not i!16:08
rogpeppemgz: 10 minutes is too much16:08
TheMuerogpeppe: Shopping for men leads to a pulse like a jet pilot. ;)16:12
rogpeppeTheMue: actually i find i just want to lie down in a corner somewhere :-)16:12
TheMueTheMue: Or at Amazon. :D16:13
* TheMue will drive into the city in 30 minutes too. Christmas market with former colleagues, an anual tradition since about 15 years.16:14
fwereadeniemeyer, rogpeppe: can I get a provisional +1 on dropping MachinerWorker (and making it implicit, like upgrader)?16:18
niemeyerfwereade: Hm?16:18
niemeyerfwereade: I'm out of context.. I thought it being a worker was a great idea?16:18
fwereadeniemeyer, ah, I thought you commented on it yesterday...16:18
rogpeppefwereade: you mean naming it "Machiner" ?16:19
fwereadeniemeyer, I just mean the state.MachinerWorker constant with which we always have to start new machines16:19
niemeyerfwereade: I did, but I don't recall saying we should kill the Machiner16:19
niemeyerfwereade: Ah, hmm16:19
niemeyerfwereade: Machiner is a real worker16:19
fwereadeniemeyer, the difference between st.Addmachine() and st.AddMachine(state.MachinerWorker) absolutely everywhere16:19
niemeyerfwereade: Upgrader isn't.. it's part of the agent internal mechanisms, I think16:20
fwereadeniemeyer, as in, it lives in its own package? couldn't/shouldn't the upgrader?16:20
rogpeppefwereade: the idea was that we might want to start a new machine without running a machine agent16:20
niemeyerfwereade: The reason .. what Roger said16:20
fwereaderogpeppe, ok, but we error out if we omit it16:20
rogpeppefwereade: currently, yes16:20
niemeyerfwereade: Yes, because *today* we don't support that16:20
fwereadeniemeyer, ok, then I'll change it to InstallerWorker everywhere, np :)16:21
niemeyerfwereade: Hm?16:21
fwereadeniemeyer, and keep the requirement in place16:21
niemeyerfwereade: Sorry, I'm seriously out of context16:21
fwereadeniemeyer, sorry16:22
niemeyerfwereade: What's InstallerWorker?16:22
fwereadeniemeyer, the idea is that an Installer replaces Machiner, by working with both principals and subordinates16:22
fwereadeniemeyer, we discussed it a few days ago IIRC16:22
fwereadeniemeyer, I have such a thing nearly ready to propose but I want to decompose it into a few easy branches16:23
niemeyerfwereade: We didn't talk about this aspect, I believe16:23
niemeyerfwereade: And honestly, it doesn't seem to make sense to me16:23
rogpeppe.... TLS has finally landed!16:24
niemeyerfwereade: A MachinerWorker is a worker that manages units on the machine.. when we put that on an agent, we want that agent to be managing the duties of a machine manager16:24
niemeyerfwereade: What's what AddMachine(MachinerWorker) means (to me, at least)16:24
niemeyerfwereade: I don't get what AddMachine(InstallerWorker) means..16:25
rogpeppeniemeyer: +116:25
fwereadeniemeyer, ok, but all a machiner currently does is install (and maybe, if you're lucky, remove) unit agents16:25
rogpeppefwereade: we can use an Installer even though we're asked to start a MachinerWorker16:25
fwereadeniemeyer, I can imagine other things that *are* fundamental to a machine, and those would I feel be best expressed as implicit16:26
niemeyerfwereade: I'm explaining the semantics.. saying the machiner has bugs is a different topic I think16:26
fwereaderogpeppe, I guess, it just seems a bit weird to have a MachinerWorker with no actual... machiner16:26
rogpeppefwereade: i think it's ok. the Installer does both the job of the machiner and that part of the uniter16:27
fwereadeniemeyer, ok, one of the many responsibilities of a machine agent is to install and uninstall units16:27
fwereaderogpeppe, that part of the unit *agent*, right?16:27
niemeyerfwereade: Can we please preserve the terms16:27
rogpeppefwereade: the difference is in how you start the installer16:27
niemeyerfwereade: Otherwise it will get confusing16:27
rogpeppefwereade: (yes)16:27
niemeyerfwereade: The MachinerWorker is not an agent16:27
rogpeppefwereade: if you start an Installer on a machine, it's a machiner; if you start it on a principal unit, it's a uniter installer.16:28
fwereadeniemeyer, yes, it will: because, eg, ssh key management is absolutely the preserve of the "machiner"16:28
rogpeppefwereade: really?16:28
niemeyerfwereade: I'm somewhat lost now16:28
niemeyer(too)16:28
fwereaderogpeppe, what else would update them? when we get round to env-set etc16:28
rogpeppefwereade: surely different units can accept different ssh keys?16:28
niemeyerfwereade: The machiner is the thing that manages containers responsible for principal units16:28
rogpeppefwereade: (assuming they're in different containers)16:29
fwereaderogpeppe, ah, ok then: in that case the unit agent and the machine agent will each run KeyManager (or whatever) tasks16:29
fwereaderogpeppe, which I would expect to implement as a worker package16:30
rogpeppefwereade: sure16:30
rogpeppefwereade: i think the MachinerWorker name is still fine though16:30
niemeyerfwereade: Yes, or maybe not.. the Machiner may well manage the ssh keys too.. I don't think we've discussed that before16:30
fwereaderogpeppe, so "machiner" is not a useful term when there is no single corresponding task -- otherwise we'd be using "provisioner" to mean "provisioner+firewaller", for example16:31
niemeyerfwereade: But we're not solving that specific problem now.. can you provide some background about how InstallerWorker came to be?16:31
niemeyerfwereade: We could call it fooer.. I think it's more important that we agree on what it means16:31
fwereadeniemeyer, it came to be because principals and subordinates produce the same watcher type now, and the response to the events is very very similar in each case16:32
niemeyerfwereade: My understanding is that the Machiner was responsible for the management of principal units on a machine, including their LXC containers if necessary16:32
niemeyerfwereade: Yes, but we can't have AddMachine(Installer) and suddenly have the machine deplying subordinates16:32
niemeyerfwereade: So I still don't quite get what you're suggesting16:33
fwereadeniemeyer, indeed so16:33
fwereadeniemeyer, a machine with an Installer task would run an installer worker, based on watching the machine's principals16:33
fwereadeniemeyer, a unit would run an Installer task if it were a principal unit16:34
niemeyerfwereade: By hand, I suppose16:35
fwereadeniemeyer, I feel it's an implicit part of the agent's duties in either case, and doesn't need to be enforced at the API level16:35
niemeyerfwereade: I disagree16:35
niemeyerfwereade: We can easily have a state server that doesn't deploy any units16:35
fwereadeniemeyer, well, I feel it should be automatic in both cases: run it as another standard task, just like the upgrader16:35
niemeyerfwereade: The upgrader is not a worker16:35
fwereadeniemeyer, in that case I'm also fine with having to specify it if we want the machine to install anything16:36
fwereadeniemeyer, the upgrader is a task16:36
fwereadeniemeyer, what the agents actually do is run tasks16:36
fwereadeniemeyer, for a machine agent, these tasks *roughly* correspond to the constants; for a unit agent, they're all implicit16:37
niemeyerfwereade: The concept of tasks was introduced precisely so that we could put the upgrader there without it being a worker16:37
fwereadeniemeyer, in that case, I'm sorry, I must be missing some crucial context myself16:37
niemeyerfwereade: The constants correspond to workers, exactly16:38
niemeyerfwereade: I don't think you're missing things.. you're just not representing the status quo in the description16:38
niemeyerfwereade: and that in turn may create a bit of confusion16:38
fwereadeniemeyer, would you explain the criteria that determine whether a persistent thing an agent does is a "worker" or just a lowly "task"?16:39
niemeyerfwereade: You're arguing about several things at the same time:16:40
niemeyerA) The upgrader is not a worker16:40
niemeyerB) The machiner should be implicit16:40
niemeyerC) The machiner is misnamed16:40
niemeyerD) The unit agent should be using the machiner16:41
niemeyerfwereade: I think it'd be useful to try to isolate the conversation to one issue at a time.. if we migrate over these topics freely, it'll take some time to reach agreement16:41
fwereadeniemeyer, yes, agreed16:41
fwereadeniemeyer, can I start from where I think the beginning is, and perhaps we won't need to hit any or all of these16:41
niemeyerfwereade: +116:42
fwereadeniemeyer, I have to implement subordinates16:42
fwereadeniemeyer, in the course of considering the problem, it became apparent that there are some very noticeable similarities between principal installation and subordinate installation16:43
fwereadeniemeyer, and that it would be helpful to consider sharing an implementation16:43
niemeyerfwereade: +116:43
fwereadeniemeyer, I communed with the spirits, and discussed with you -- I thought -- the idea that I could try to write an Installer worker that could be run as a task by both machine agents and principal unit agents16:45
niemeyerfwereade: That sounds good16:45
fwereadeniemeyer, ok; so, I have done this, and it's turned out quite nice, I think16:46
fwereadeniemeyer, and it completely replaces the machiner's *current* duties16:46
fwereadeniemeyer, indicating to me that the machiner package could thereby be dropped16:47
fwereadeniemeyer, and that, having done so, a MachinerWorker constant would seem a bit silly16:47
niemeyerfwereade: Okay, I think that's a point of contention, and it's happening purely due to the way it's being worded16:47
niemeyerfwereade: You have changed the machiner so that it could be used by the unit agent16:48
niemeyerfwereade: It doesn't replace the machiner duties.. it implements them16:48
niemeyerfwereade: Thus far, we're talking about point (D) above16:49
fwereadeniemeyer, well -- is it a *machiner* duty, or a *machine agent* duty? I had considered it the latter, but I guess yu don;t?16:49
niemeyerfwereade: When you talk about dropping the constant, you're talking about point (B) above16:49
niemeyerfwereade: A machiner.. the machine agent can happily run a provisioner and a firewaller and not run a machiner16:50
fwereadeniemeyer, but a machiner doesn't have to have a single associated task?16:50
niemeyerfwereade: Can you rephrase the question please16:51
fwereadeniemeyer, is it ok for a single Worker constant to indicate multiple tasks?16:52
fwereadeniemeyer, it feels to me like it's a bit ...off16:52
niemeyerfwereade: I don't understand the context for the question16:52
niemeyerfwereade: I didn't suggest that16:52
fwereadeniemeyer, ok, I have a single task which implements some of the duties of a machine agent, and also some of the duties of a principal unit agent16:53
fwereadeniemeyer, with a unit agent, it's easy to tell: run it if we're a principal unit16:54
fwereadeniemeyer, with a machine agent, AIUI, we consider it important that this duty be run only when it is specified16:54
niemeyerfwereade: Yes, our current system has the ability to run specific workers16:55
fwereadeniemeyer, and we also want to enable/disable possible future functionality under the aegis of whether or not this machine agent is running a MachinerWorker "machiner"16:55
niemeyerfwereade: On the machine agent16:55
fwereadeniemeyer, would you explain how you want this to look? I think you have enough context16:56
fwereadeniemeyer, I would appreciate your perspective on the problem rather than trying to explain mine further, I don;t seem to be doing it very well :)16:56
niemeyerfwereade: No, it's not entirely clear what the question is. That system is in place today. It's working.16:56
fwereadeniemeyer, ok, just to confirm: are you ok with the removal of worker/machiner?16:57
niemeyerfwereade: Certainly not as blank statement like that. It's pretty clear we're not understanding each other, so I don't know what you'd understand by that.16:58
fwereadeniemeyer, ok16:58
fwereadeniemeyer, I have implemented an Installer worker, which entirely eclipses the current Machiner worker's functionality16:58
rogpeppefwereade: an Installer worker, or an Installer *task*? :-)16:59
fwereadeniemeyer, if the machine agent were to run an Installer instead of a Machiner, it could continue to work as today, but with certain useful features like unit cleanup16:59
fwereaderogpeppe, please, what is the distinction?16:59
niemeyerLet's please not do that.17:00
rogpeppefwereade: i'm not entirely sure17:00
niemeyerIt doesn't matter now17:00
niemeyerfwereade: Right, I think that's excellent progress17:00
niemeyerfwereade: We just have to discuss trivial details of how to land it17:00
fwereadeniemeyer, should it perhaps not be dignified with the term "worker", and if I call it a task we can all be happy? :)17:00
fwereadeniemeyer, yeah, indeed17:00
fwereadeniemeyer, I actually don;t have strong feelings, I thought I was just following logical consequences17:01
rogpeppefwereade: i see it as a task that's used to implement the machiner worker.17:01
niemeyerfwereade: Kind of.. dropping the machiner constant wasn't a logical consequence17:01
fwereadeniemeyer, ok; and it's one of many possible tasks that may one day eventually combine to be a Machiner?17:01
fwereadeniemeyer, yeah, i see that17:02
fwereadeniemeyer, I did qualify with "I thought" ;)17:02
niemeyerfwereade: Cool, np17:02
niemeyerfwereade: Let's try to find a way in17:02
fwereadeniemeyer, ok, can we consider authorized-keys?17:02
niemeyerfwereade: Would be nice to call this one "UniterWorker", but we can't :)17:02
niemeyerfwereade: Yes please17:02
fwereadeniemeyer, actually I'm not so sure, because principal units will need to handle that too17:03
niemeyerfwereade: Sorry, silly comment17:03
niemeyerfwereade: Please continue on the authorized-keys line17:03
fwereadeniemeyer, can you instead think of something that is *only* done by machines?17:03
niemeyerfwereade: authorized-keys should be managed no matter whether we're deploying units or not17:04
fwereadeniemeyer, or we can keep going with authkeys, because it's shared functionality just likethe Installer17:04
niemeyerfwereade: Machiner is misnamed, really17:04
fwereadeniemeyer, ok, so that would be something that always ran even with no MachinerWorker?17:05
niemeyerfwereade: Yes, it should run17:05
niemeyerfwereade: Because the machine (the VM or hardware) has to remain accessible no matter what is actually running there17:05
fwereadeniemeyer, ok; then can yu think of more possible things the machine agent can do that it might want to switch off?17:05
rogpeppefwereade: the intra-machine network stack management would probably be run by the machiner only17:05
niemeyerIndeed17:06
fwereaderogpeppe, and that wouldn't need to be done if we weren't installing units, I guess?17:06
niemeyerIndeed, in principle (haven't thought of details)17:06
fwereaderogpeppe, so in that case we have 2 tasks, both of which are controlled by a single flag, MachinerWorker17:06
niemeyerNo17:06
rogpeppefwereade: sure17:06
fwereadeniemeyer, ok, go on, how should that look?>17:07
niemeyerfwereade: I don't know.. I'm just saying we don't have that17:07
niemeyerfwereade: It could as well be within the Machiner with the current design17:07
niemeyerfwereade: So I'm just not agreeing upfront with something that we didn't decide upon nor considered consequences of17:07
fwereadeniemeyer, I am really just asking how you want this to look17:08
niemeyerfwereade: Whatever we do, we should try to preserve the idea we currently have in place: we can run the workers we want on machines17:08
fwereadeniemeyer, I am naturally tending towards having a list of FooerWorker flags, each of which corresponds to a Fooer task17:09
fwereadeniemeyer, I think that is something we did consciously with provisioner and firewaller17:09
niemeyerfwereade: One of these workers is responsible for deploying units within their respective containers, and maintaining them across their lifecycle17:09
niemeyerfwereade: and machiner17:09
fwereadeniemeyer, so, do we agree that "Machiner" is a bad name for "[a worker that] is responsible for deploying units within their respective containers, and maintaining them across their lifecycle"17:10
fwereadeniemeyer, and that possibly "Installer" might be better?17:10
fwereade<fwereade> niemeyer, so, do we agree that "Machiner" is a bad name for "[a worker that] is responsible for deploying units within their respective containers, and maintaining them across their lifecycle"17:11
fwereade<-- niemeyer has quit (*.net *.split)17:11
fwereade<fwereade> niemeyer, and that possibly "Installer" might be better?17:11
niemeyerfwereade: Machiner is not perfectly suiting, agreed. Installer isn't great either, though.17:12
fwereadeniemeyer, ok, can you think of a nicer name for, ideally, "[a worker that] is responsible for deploying units [in some configurable way], and maintaining them across their lifecycle"17:13
rogpeppeniemeyer: i thought "Deployer" was a reasonable name17:13
fwereadeniemeyer, eg I'd be fine with Deployer, indeed17:13
rogpeppeniemeyer: but it overlaps with deploying services17:13
niemeyerfwereade: Yeah, I'm trying17:13
fwereaderogpeppe, and charms :)17:13
rogpeppei still think it works ok17:13
rogpeppeit is, after all, the low level thing that's doing the deploying work for the high level deploy17:14
fwereade(fwiw, I suddenly think the Uniter should be called the Charmer, but it's probably best to pretend I never said that)17:14
niemeyerDeployer is probably the best option so far17:17
fwereadeniemeyer, ok, cool17:18
rogpeppei've just found out that i'm going to have to shut down my current juju environment because of this latest change. boo.17:18
fwereadeniemeyer, while we're thinking names, what's the opposite of deploy?17:18
niemeyerI've been looking for something else, but can't come up with anything that isn't cool-sounding yet meaningless17:18
rogpeppefwereade: undeploy ?17:18
* fwereade looks pained17:18
rogpeppelol17:18
fwereaderogpeppe, ploy? :p17:18
niemeyerfwereade: destroy, at least in the juju context17:18
rogpeppeniemeyer: +117:19
niemeyerfwereade: Destroyer would be great.. ;-D17:19
rogpeppei'll take 217:19
fwereadeniemeyer, ok, so a Deployer, using Deploy/Destroy terminology17:20
fwereadeniemeyer, and s/MachinerWorker/DeployerWorker/?17:21
niemeyerfwereade: Note that it depends on the context17:21
fwereadeniemeyer, and, when I get to it also just run one as a task when running a principal unit agent17:21
niemeyerfwereade: We have certain actions that are well named in that context.. (dying, removing, etc)17:21
niemeyerfwereade: destroying is what the user requests on the command line when he wants to get rid of things, and that kicks off a series of actions17:21
fwereadeniemeyer, it does: but one of its responsibilities is removing dead units from state17:21
niemeyerfwereade: Yes, *removing*17:21
fwereadeniemeyer, ok, so destroy is not right17:21
fwereadeniemeyer, unassignment should undeploy but not remove17:22
niemeyerfwereade: *unassignment*!?17:22
niemeyerfwereade: I hope we're not putting that on the mix right now17:23
fwereadeniemeyer, yes... one of the branches you asked me to shepherd to completion included the machiner doing that17:23
fwereadeniemeyer, it's not really very hard17:24
niemeyerfwereade: Well, I'll take your word on that.. I'm just concerned with your TODO list17:25
niemeyerfwereade: We don't need to name the action of undeploying I think17:25
fwereadeniemeyer, I'm talking about something I've already done, which is part of what I understood you to have asked me to do17:26
niemeyerfwereade: I'd call it "removing the content of the container directory"17:26
niemeyerfwereade: Sorry, I was mainly referring to the watchers and to migrating the firewaller and machiner to the new watchers17:26
niemeyerfwereade: But I accept I was vague17:27
fwereadeniemeyer, sorry, I thought that included the machiner work already done in those branches ;)17:27
niemeyerfwereade: That's cool.. you already did it, so that's brilliant. Let's not argue because you've been finishing stuff too fast. ;)17:27
fwereadeniemeyer, ok, anyway, I can extract some branches that are not contentious in this way17:28
niemeyerfwereade: Your points do make me wonder if we should call these flags on AddMachine something else than "workers"17:28
fwereadeniemeyer, +117:29
niemeyerfwereade: But at least thus far it has been nicely tangible17:29
fwereadeniemeyer, I dunno... both machiner and uniter feel too wooly for my liking17:29
fwereadeniemeyer, still17:29
niemeyerfwereade: We don't have a Uniter flag, I think17:30
fwereadeniemeyer, depending on how sleepy my family is, I may or may not have some things for you to look at17:30
fwereadeniemeyer, indeed so17:30
niemeyerfwereade: Cool17:30
fwereadeniemeyer, but that will only be determined later tonight17:30
niemeyerfwereade: Thanks a lot for bringing up the discussion.. it was quite useful17:31
fwereadeniemeyer, (I would I think in general like it if we just had one flag per task -- it would help my puny brain -- and I'm not quite clear on whether there are enough interesting groups of tasks that we should go to the effort of naming such things)17:32
fwereadeniemeyer, (and would be interested to hear arguments against that in particular)17:33
niemeyerfwereade: Interesting17:33
niemeyerfwereade: My gut feeling goes the opposite way17:33
niemeyerfwereade: I'd prefer to make the flags in the machine less directly connected to code implementation on the other side17:33
fwereadeniemeyer, strawman: firewaller/provisioner?17:33
niemeyerfwereade: and more like actual flags17:33
fwereadeniemeyer, I'd be fine with that too17:34
niemeyerfwereade: Because I anticipate one day we'll want to tweak the behavior of a machine without a direct connection to code17:34
fwereadeniemeyer, ok, I can understand that17:34
fwereadeniemeyer, I think I'm done blethering on for a bit17:35
fwereadeniemeyer, I'll steer clear of big renames and just get you a Deployer to look at17:35
fwereadelater all17:35
niemeyerfwereade: If we find a nice alternative, I'd actually be happy to bundle the flag rename change with it17:36
niemeyerfwereade: But let's keep that for the review perhaps, so we have something more tangible to discuss on top of17:36
rogpeppeniemeyer: i'm wondering if we should bump the major version number, just for the principle of it17:51
niemeyerrogpeppe: I'd rather not end up with version 10 of juju so soon :)18:07
rogpeppeniemeyer: i don't see why not, really.18:07
rogpeppeniemeyer: semantic versions shouldn't be about getting attached to particular numbers, really.18:07
niemeyerrogpeppe: In reality, we really don't want to be breaking major versions all the time18:09
rogpeppeniemeyer: definitely.18:09
rogpeppeniemeyer: but this is one such change18:09
rogpeppeniemeyer: still, i don't mind much.18:10
rogpeppeniemeyer: i should probably say something in juju-dev though18:10
rogpeppeniemeyer: or perhaps we leave that for the release notes18:10
niemeyerrogpeppe: I do mind.. this is exceptional, and I'm fine with handling it as an exception.. I'm not fine with major breakage every other week18:11
rogpeppeniemeyer: agreed. i'm not really sure why it's an exception as far as the major version number goes though.18:12
niemeyerrogpeppe: It's an exception because we're still in heavy development mode18:12
rogpeppeniemeyer: it would still be nice if people could rely on our version numbering, even in this mode.18:13
rogpeppeniemeyer: and it wouldn't be a bad thing if the major version number did actually count the number of breaking changes we've made since the initial release.18:15
niemeyerrogpeppe: Major breakage is bad.. it's not fine to do it all the time. I don't want to paint a picture that makes it feel like it's alright.18:17
niemeyerrogpeppe: Not to users, and not even to ourselves.18:17
rogpeppeniemeyer: absolutely. so we should take the hit and increment the major version number for this occasion, signifying that it's a significant thing, IMHO18:17
niemeyerrogpeppe: It's *not* ok to be doing it every week.18:17
niemeyerrogpeppe: and next week too? and in the following one too?18:18
rogpeppeniemeyer: if we break things in a major way, yes18:18
rogpeppeniemeyer: 'cos as you said, that's not ok18:18
rogpeppeniemeyer: so it should be rare18:18
niemeyerrogpeppe: No, that's exceptional because we're in heavy development mode, releasing alpha releases18:19
niemeyerrogpeppe: and not promising compatibility18:19
niemeyerrogpeppe: Let's focus on finishing the stuff due for that, and then we start respecting the version18:19
rogpeppeniemeyer: i agree. but our version numbers should reflect the compatibility of each release, i think. that's why we have them, no?18:19
niemeyerrogpeppe: I already responded to that above18:20
rogpeppeniemeyer: i think that if we say we do semantic versions, we should do them. i don't see that an aversion to the number 10 is a good reason not to.18:21
rogpeppeniemeyer: and it makes it obvious to anyone that *is* actually using our alpha versions when we are making a breaking change.18:22
niemeyerrogpeppe: Agreed. I already said we're not respecting the version right now at UDS.18:22
niemeyerrogpeppe: So we're good there.18:22
rogpeppeniemeyer: ok. it would be very easy to do so though.18:22
niemeyerrogpeppe: The mood of a team that cares about breakage is a different one. We're not there yet.18:23
rogpeppeniemeyer: ok, so it is ok to break things every week at the moment?18:23
niemeyerrogpeppe: That's what has been happening so far pretty much. You've just landed a change that does, and we've just discussed something like 5 other braking changes in the last couple of hours.18:23
niemeyerbreaking18:24
rogpeppeniemeyer: part of the reason for discussing them was that it might be nice to bundle the two together to reduce the overall breakage count.18:24
niemeyerrogpeppe: It would be nicer if we can not spend time managing three different forks, and instead focus on landing them and stabilizing the project.18:25
rogpeppeniemeyer: ok18:25
rogpeppeniemeyer: thanks for the discussion. time for me to stop now.18:34
rogpeppeniemeyer: have a good rest-of-day18:35
niemeyerrogpeppe: np, have a good evening18:35
niemeyerrogpeppe: Cheers18:35
rogpeppeg'night all18:35
niemeyerrogpeppe: Think about Go, since you're usually inspired there, btw.18:38
niemeyerArgh.. someone stole my usual bucket name :)18:58
fwereaderogpeppe, I seem to have a lot of tests hanging in trunk, it's not immediately apparent where but I'd imagine it's to do with state connections -- is there anything I should be sure to have a particular version of?19:15
niemeyerfwereade: I was just having a few issues too using it for real, but I suspect my own network was flaky19:47
fssniemeyer: ping20:58

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