/srv/irclogs.ubuntu.com/2013/03/25/#juju-dev.txt

=== jamespage is now known as 13WAATFJC
=== meetingology` is now known as meetingology
jamwallyworld_: would you rather do G+?06:01
rogpeppe1mornin' all07:45
=== tasdomas` is now known as tasdomas
=== mthaddon` is now known as mthaddon
dimiternmorning07:50
rogpeppe1dimitern: hiya07:51
jamdimitern: /wave, I'm just grabbing a coffee, and then I'll be back for mumble08:59
dimiternjam: i'll be there shortly08:59
fwereade__dimitern, ping09:05
dimiternfwereade__: heyhey09:05
fwereade__dimitern, I don't recall: did we write code for joining new peer relations on Service.SetCharm?09:05
dimiternfwereade__: not yet, this is upcoming09:05
fwereade__dimitern, ah -- am I right in thinking we *did* write it but it's been pushed back behind the command? or did we just talk about it?09:06
dimiternfwereade__: that's right - it's behind the cmd09:08
fwereade__dimitern, cool, thanks, just trying to construct a model of reality ;p09:08
dimiternfwereade__: np :)09:11
fwereade__jam, dimitern, rogpeppe1: so, I have a testing conundrum wrt the order in which the unit agent joins relations; I'm going to ramble about it for a bit in the hope that one of you will tell me what I should obviously do09:12
rogpeppe1fwereade__: i'm listening09:13
jamfwereade__: you should obviously drink some coffee and go for a walk :)09:13
fwereade__1) the unit agent should join relations in a particular order: peers first, then all others, and within those categories in creation order (ie id order)09:13
fwereade__jam, I've had a weekend to think about it, hasn't really helped ;p09:13
jamI will read traceback, currently OTP09:13
fwereade__jam, cheers09:14
fwereade__2) black-box testing of relation-join order is very tricky in the first place -- I can come up with tests that sometimes demonstrate a problem, maybe09:15
jam"ordering" definitely seems like a whitebox test09:15
fwereade__3) it's not currently possible to even *create* a peer relation for a service that has a higher id than any of the non-peer relations, because of missing functionality in Service.SetCharm09:16
fwereade__4) but I could probably do that with a test internal to state09:16
fwereade__5) how reasonable would it be to just define `type ByPriority []*Relation` in state -- which I think *can* be tested internally by doing inappropriate things to mongodb09:17
fwereade__(that's probably fine)09:17
rogpeppe1fwereade__: sorry, what exactly are you trying to test here? i seem to have missed that crucial detail.09:18
fwereade__1) the unit agent should join relations in a particular order: peers first, then all others, and within those categories in creation order (ie id order)09:19
rogpeppe1fwereade__: ah, you're testing the unit agent09:19
fwereade__rogpeppe1, yeah09:20
dimiternfwereade__: is it possible/valid to remove(destroy) peer relations?09:20
rogpeppe1fwereade__: what would ByPriority do?09:20
fwereade__6) and then, in the uniter, try to come up with an internal test that demonstrates that join order is consistent with a ByPriority sort even if I can't show that's what we're using09:21
fwereade__dimitern, not really, only as part of service destruction09:21
fwereade__rogpeppe1, sort as described in (1)09:21
fwereade__7) that's it09:21
rogpeppe1fwereade__: is the reason you can't test priority externally that the id isn't visible outside state?09:22
fwereade__rogpeppe1, no -- id is easy09:22
fwereade__rogpeppe1, but there's no clear way to get the order of relations joined on another goroutine09:22
fwereade__rogpeppe1, watchers coalesce events, remember ;p09:23
rogpeppe1fwereade__: please remind me why the order that the unit agent joins relations is important09:23
fwereade__rogpeppe1, a DB in a peer relation that handles replication, say, should not start talking to a client until it knows that peers exist09:24
fwereade__rogpeppe1, that said, *that* precise scenario may be impossible to tell anyway09:25
rogpeppe1fwereade__: ok, that's a reason why peers need to be joined before others. what about the secondary ordering?09:25
fwereade__rogpeppe1, I think it's just so that charms get a picture of the world that's as consistent as possible09:26
fwereade__rogpeppe1, and if you're defining a sort order you may as well do it completely rather than give up half way through ;p09:27
fwereade__rogpeppe1, I should probably sync up with hazmat, actually, the more I think the less sure I am that this will help at all09:27
fwereade__rogpeppe1, join order doesn't actually impact hook order anyway, even in python, afaict09:28
fwereade__rogpeppe1, and there's no point a hook checking whether a peer relation exists -- it must always do so implicitly09:29
fwereade__rogpeppe1, so, hmm09:29
fwereade__rogpeppe, yeah, screw this, I'll talk to hazmat later and find something else to do for now09:30
rogpeppeoops, sorry, my computer just spontaneously rebooted09:31
rogpeppefwereade__: last thing i saw was09:31
rogpeppe[Monday 25 March 2013] [09:29:04] <fwereade__> rogpeppe1, and there's no point a hook checking whether a peer relation exists -- it must always do so implicitly09:31
fwereade__rogpeppe, I said "so, hmm", and thought until I said "screw this"09:31
fwereade__sorry for the noise gents09:32
rogpeppefwereade__: oh yes, i saw that.09:32
rogpeppefwereade__: np.09:32
rogpeppefwereade__: you might be interested to see what i did on saturday: https://codereview.appspot.com/8010043/09:32
fwereade__davecheney, can I WIP 107b please? trying to get an accurate +activereviews09:33
rogpeppefwereade__: it generalises the transaction-space explorer i did before, and applies it to State. so far i only test a single operation though.09:34
* fwereade__ looks09:34
davecheneyfwereade__: sure09:40
=== negronjl` is now known as negronjl
=== racedo` is now known as racedo
fwereade__rogpeppe, that is very neat, but I'm not 100% sure it's a clean fit for the problem -- in my mind, it would be nicer to just allow tests to hook into a point where they can make arbitrary state changes just before the txn is run09:49
fwereade__rogpeppe, that seems more conducive to deterministic testing09:49
rogpeppefwereade__: i think both things may have a place09:51
rogpeppefwereade__: the advantage of my scheme is that it allows black-box testing09:51
rogpeppefwereade__: and also potentially the writing of very compact tests that test existing operations against one another.09:52
rogpeppefwereade__: actually, thinking about it, my scheme does provide the capability to allow make arbitrary state changes just before a txn is run too09:54
fwereade__rogpeppe, I am probably not seeing the consequences clearly09:54
fwereade__rogpeppe, but I was imagining something like http://paste.ubuntu.com/5645845/09:54
rogpeppefwereade__: i'm not sure that's sufficient - some operations execute several transactions in their normal course of action09:55
rogpeppefwereade__: so you'd want to be able to hook before or after any of those, i think09:55
fwereade__rogpeppe, what operations are these, that are not broken? ;p09:55
rogpeppefwereade__: if circumstances change underfoot09:56
rogpeppefwereade__: then an operation might legitimately execute several transactions09:57
fwereade__rogpeppe, oh, you mean when they abort due to state change rather than invalidity?09:57
rogpeppefwereade__: yup09:57
fwereade__rogpeppe, I don't see the problem there tbh09:57
rogpeppefwereade__: so, how do you test that the second transaction does the right thing even when the assumptions of *that* one are broken?09:58
fwereade__rogpeppe, close over a counter, if you can come up with a situation that really requires it09:59
rogpeppefwereade__: and i think you want to be able to test what happens if the state is mutated both before and after a transaction is run (it's not clear when SetTxnCallback would be called)09:59
fwereade__rogpeppe, I'm not following -- why afterwards too?09:59
fwereade__rogpeppe, that thing I posted was a complete test case that needs minimal machinery in state AFAICT10:00
rogpeppefwereade__: because if you get ErrAborted, you then inspect the state, which might have mutated in an unhelpful way since the transaction, and we'd like to be able to test that logic10:00
fwereade__rogpeppe, is that not just testing mgo/txn, rather than testing our own transactions?10:01
rogpeppefwereade__: i don't think so10:01
rogpeppefwereade__: for instance, consider Service.Destroy10:02
fwereade__rogpeppe, go on10:02
rogpeppefwereade__: if it gets ErrAborted, it does a Refresh, then proceeds to act on the basis of that state.10:02
rogpeppefwereade__: how do you test that logic?10:03
fwereade__rogpeppe, yes...10:03
rogpeppefwereade__: i suppose you can assume that it's always a straightforward loop and the logic at each cycle is the same as the previous10:03
fwereade__rogpeppe, well, you know what state change you made in the callback... that should either be sufficient to kill completely or to allow a second attempt to go through, regardless of the implementation10:04
fwereade__rogpeppe, so you test that the expected thing happens, and you're done10:04
fwereade__rogpeppe, right..?10:04
rogpeppefwereade__: i'm not quite following you there10:06
fwereade__rogpeppe, would you expand on why you need to assume it's a straightforward loop?10:07
fwereade__rogpeppe, I expect that in most interesting cases the construction of the new txn will be totally different from the old one10:08
rogpeppefwereade__: ok. first a little bit of terminology that i've been using when thinking about this:10:08
rogpeppefwereade__: an operation cycles between two states: "look" and "mutate". in look state, an operation queries the database and decides what op to perform; in mutate state, an operation runs a transaction.10:09
rogpeppefwereade__: i think that any operation can be considered to start in look and then alternate between look and mutate.10:10
rogpeppefwereade__: until it terminates10:10
fwereade__rogpeppe, ok...10:10
fwereade__rogpeppe, well, some start in a pre-looked state, but I expect we can handwave past that10:12
rogpeppefwereade__: so, in general, we want to test that the correct thing happens regardless of the interleaving of look and mutate states of concurrently running operations.10:12
rogpeppefwereade__: yeah, that's awkward, but we can get around it10:13
fwereade__rogpeppe, well, what I actually want to do is to test what happens to single operations when the state changes in prescribed ways between look and mutate10:13
rogpeppefwereade__: well yes - that "change in a prescribed way" is just simulating some other operation happening there, right?10:14
fwereade__rogpeppe, it's actually running the operation, in my model10:14
rogpeppefwereade__: ok, sure - so you're entirely encapulating all the look/mutate transitions of that other operation inside the SetTxnCallback hook10:15
fwereade__rogpeppe, yeah, if you like10:15
fwereade__rogpeppe, from my perspective the details of that other txn are a red herring, I think10:16
rogpeppefwereade__: look at it this way: could you use SetTxnCallback to actually produce an ErrExcessiveContention error?10:16
fwereade__rogpeppe, ofc10:16
fwereade__rogpeppe, in service.Destroy, for example, add/remove the single unit of the service every time you go through10:18
rogpeppefwereade__: yeah, i suppose so, by running a different operation at each stage, yeah10:19
fwereade__rogpeppe, maybe I'm not  following your approach right, though10:19
fwereade__rogpeppe, how would you do it?10:19
rogpeppefwereade__: in a similar way actually, but rather than have a closure, we'd run an operation that did for i := 0; i < 5; i++ {add unit; remove unit} concurrently with the Destroy op10:21
rogpeppefwereade__: in general, we can get arbitrary interleaving of look/mutate states between concurrent operations, and i'm interested in verifying that behaviour is correct in all those cases.10:23
fwereade__rogpeppe, I'm not seeing how you'd synchronize them to ensure proper coverage10:23
rogpeppefwereade__: well with txntest there are two possibilities.10:24
rogpeppefwereade__: if the state space is small enough, you can let it do it itself, and it'll run through all possible interleavings10:24
rogpeppefwereade__: otherwise you can specify a set of interleavings to test10:25
jammgz: morning10:25
rogpeppefwereade__: say we've got two concurrent operations, a set of interleavings looks something like: 0.1.0t.1t.0*.1*10:26
rogpeppefwereade__: where the number signifies the operation in question (one of two, in this case); a bare number indicates a look state; a "t" suffix indicates a transaction (mutate), and a '*' suffix indicates that the op terminates at that point.10:27
rogpeppefwereade__: so the above trace says something like: both ops look at the state, and execute a transaction based on that state; they each look at the resulting state and stop.10:28
fwereade__rogpeppe, that STM like you're mixing up the tests for two operations, which is just about ok for 2 but becomes more tricky when there are 6, and that that case it would be clearer to test 0 in the context of 1, 2, 3, 4, and 5 separately10:29
fwereade__rogpeppe, especially if 4, 5, and 6 don't interact with one another10:29
mgzjam: hey10:30
rogpeppefwereade__: i think that we are mixing up the tests for two operations because actually we want to know what happens when those two operations execute concurrently.10:30
fwereade__mgz, just quickly, did my suggestion on your review look like crack?10:30
rogpeppefwereade__: given that we know that those operations operate on the same part of the state.10:31
mgzfwereade__: nope, but I do wonder if that's preferable to just having a base struct that contains 'config map[string]interface{}' and methods for operation on10:31
mgzI still have no feel for what idioms make sense10:31
jammgz: I do think having a separate TestConfig attribute, and then that gets copied to something when it is actually used10:32
jamoverriding the Config member vs copying from another member10:32
fwereade__mgz, my experience has been that the prefer-composition-over-inheritance-turned-up-to-11 approach actually leads to surprisingly neat code, even though my OO instincts led me to reach for inheritance-alike approaches by default10:32
jam(eg)10:32
mgzI shall give it a hack.10:33
fwereade__mgz, there's another approach that says, hey, what I suggested is doing almost exactly that anyway in effect10:33
rogpeppefwereade__: your SetTxnCallback idea is definitely progress (and might well be all we need for the time being), but it still doesn't give me confidence that there's not some odd interaction between different concurrent operations that might not be predictable.10:33
fwereade__mgz, let me know how it goes, if it starts getting up your nose then your current approach is still progress10:34
fwereade__rogpeppe, it does mean we need to write the individual tests10:35
rogpeppefwereade__: sure; that's true in both cases i think10:36
fwereade__rogpeppe, I'm woried about how that'd look with the general approach though10:37
fwereade__rogpeppe, here's a pile of transactions, here's a pile of possible acceptable errors for each transaction, GO10:37
rogpeppefwereade__: it would probably be more like: here's two concurrent operations; verify that this condition holds after all these listed interleavings between the two.10:38
fwereade__rogpeppe, I worry that the condition will just be "either 0 won or 1 did"10:40
fwereade__rogpeppe, and that getting better than that, in the sense of detecting unknown weirdness, will be rather tricky10:40
fwereade__rogpeppe, some of them should of course be "both succeeded"10:41
fwereade__rogpeppe, anyway, thank you, that was an enlightening conversation10:41
rogpeppefwereade__: in the general (automatically explored) case, that's true, because that actually is the expected fuzzy result. but when specifying a specific set of interleavings, you can specify them such that you know the expected result and verify accordingly.10:41
fwereade__rogpeppe, yeah, that does make sense10:42
fwereade__rogpeppe, seems to me to make it harder to unit test individual operations clearly10:43
rogpeppefwereade__: possibly so. i'm not sure yet.10:44
rogpeppefwereade__: i've found it an interesting experiment, even if we don't use it.10:44
fwereade__rogpeppe, definitely -- and I'll try to give it another look later, because I definitely didn't follow all the details on the first run through :)10:45
rogpeppefwereade__: when i get a spare moment, i'll run up a test for Service.Destroy and see how it looks10:46
rogpeppefwereade__: 'cos there's quite a lot of untested logic there.10:46
fwereade__rogpeppe, the errRefresh action is untested, but I'm not sure what else you're referring to10:49
rogpeppefwereade__: errRefresh and ErrAborted10:50
mgzoh dear, my canonistack instance has just become very unhappy...10:51
fwereade__rogpeppe, but ErrAborted is tested really quite a lot10:51
frankbanrogpeppe: fwereade__: please take a look at this error (config-get while deploying juju-gui): http://pastebin.ubuntu.com/5645957/ It seems something is going wrong while calling state/service.go:*Service.Config()10:51
rogpeppefwereade__: ah, because we don't query mongo before making the initial transaction?10:52
fwereade__rogpeppe, yeah10:52
fwereade__rogpeppe, well, we do a bit, with the relations10:52
rogpeppefwereade__: yeah10:53
rogpeppefwereade__: i just saw that10:53
mgzMar 25 10:49:54 go kernel: [1433100.892933] EXT4-fs error (device vdb): ext4_journal_start_sb:370: Detected aborted journal10:53
mgzMar 25 10:49:54 go kernel: [1433100.894501] EXT4-fs (vdb): Remounting filesystem read-only10:53
fwereade__frankban, looking10:53
rogpeppefwereade__: anyway, Service.Destroy does seem to be one of the more complex transactions around10:54
rogpeppefwereade__: hence, i thought, a good example for trying to test thoroughly.10:54
fwereade__rogpeppe, Destroy txns are in general total bitches10:54
fwereade__frankban, what happens if you do a `juju get juju-gui` from the CLI?10:55
fwereade__frankban, hey, did you bootstrap with --upload-tools?10:56
frankbanfwereade__: yes10:56
fwereade__frankban, bah, ok, I keep doing that and being confused by biarre errors ;p10:56
frankbanfwereade__: and deployed using "juju deploy -e go --repository=/home/frankban/devel/juju/gostore local:precise/juju-gui"10:57
fwereade__frankban, would you paste me the full unit log please?10:57
frankbanfwereade__: sure10:58
fwereade__frankban, a thought: did you also rebuild the CLI tools rcently?10:59
frankbanfwereade__: http://pastebin.ubuntu.com/5645995/11:01
frankbanfwereade__: how to do that? I usually just run "go install ./..." in launchpad.net/juju-core11:01
fwereade__frankban, yeah, that's what I do, usually followed by a paranoid ls -al $(which juju)11:02
frankbanfwereade__: retrying11:03
frankbanfwereade__: I usually go in $GOPATH/bin and use ./juju from there11:04
fwereade__frankban, I've got $GOPATH/bin on my path but I never quite trust that I haven't been screwing around with something and forgotten about it ;p11:06
fwereade__frankban, (my thinking here, fwiw, is that the keys for service settings documents *have* changed recently, but I'm pretty sure they're tested in some detail, so I'm hoping it's just a mismatch on your end)11:07
* rogpeppe still thinks we should be changing our major version number every time we make a backwardly incompatible change. these kinds of issue are a pain to diagnose.11:08
frankbanfwereade__: I am retrying after re-compiling trunk11:12
fwereade__frankban, cheers11:13
fwereade__bbiab11:21
=== andrewdeane is now known as devhell
=== devhell is now known as awd
* TheMue dances around as he found why those too tests fail after the latest change11:31
dimiternmgz: standup?11:32
dimiternfwereade__: are you good for lunch aroung 13:30 (after standup)?11:35
TheMuelunchtime11:44
frankbanfwereade__, rogpeppe: same error. either using the local charm or cs:precise/juju-gui11:48
rogpeppefrankban: could you paste a script which replicates the problem from scratch?11:49
frankbanrogpeppe: it's just "juju bootstrap --upload-tools" and then "juju deploy cs:precise/juju-gui". it fails in the install hook.11:52
rogpeppefrankban: ok, i'll try it and see if i can reproduce the problem11:52
frankbanrogpeppe: thanks11:52
fwereadefrankban, sorry, everything went weird for a bit -- are you still seeing problems?12:00
frankbanfwereade: yes, rogpeppe is trying to reproduce, basically I see the same install hook failure running "juju bootstrap --upload-tools" and then "juju deploy cs:precise/juju-gui".12:01
=== gary_poster|away is now known as gary_poster
* dimitern lunch12:24
rogpeppefrankban, fwereade: ok, i've reproduced the problem12:28
frankbanrogpeppe: thanks, :-/12:29
rogpeppefwereade: here's the whole error log that i see: http://paste.ubuntu.com/5646211/12:30
rogpeppefwereade: sorry, uniter log12:30
frankbanrogpeppe: that seems a charm error, unrelated to the problem I am encountering, and probably not depending on juju-core. It seems that config-get worked for you.12:34
rogpeppefrankban: yes, i was just coming to that conclusion12:34
frankbanrogpeppe: so, it must be something in my configuration, maybe it's worth retrying after deleting stuff in $GOPATH/bin and /pkg?12:36
rogpeppehmm, it would be nice if juju status could print the agent-version urls12:36
fwereaderogpeppe, yeah, it would12:36
fwereadefrankban, rogpeppe: that's how it looks to me as well12:36
rogpeppefrankban: are you sure you're executing the juju from $GOPATH/bin ?12:36
* fwereade has to go to lunch, late already, back later at dimiter's12:37
rogpeppefwereade: enjoy12:37
frankbanrogpeppe: yes I am, I am explicitly calling $GOPATH/bin/juju.12:38
frankbanrogpeppe: in juju status I saw agent-version: 1.9.12 on machine 1 and agent-version: 1.9.11 on machine212:38
rogpeppefrankban: and you've done go install launchpad.net/cmd/juju, presumably?12:38
rogpeppefrankban: ah!12:39
rogpeppefrankban: did you do a destroy-environment before bootstrapping?12:39
frankbanrogpeppe: yes12:39
rogpeppefrankban: what does juju --version print?12:40
frankban$ ./juju version12:40
frankban1.9.12-quantal-amd6412:40
frankbanrogpeppe: ^^^12:40
rogpeppefrankban: what happens if you try: juju upgrade-juju --upload-tools ?12:41
rogpeppefrankban: it's really weird that you're seeing 1.9.11 on the second machine12:42
frankbanrogpeppe: yes12:42
rogpeppefrankban: hold on, do you mean machine 0 and machine 1 ?12:42
frankbanrogpeppe: do I need a bootstrapped juju before executing upgrade-juju?12:43
rogpeppefrankban: yeah12:43
rogpeppefrankban: but you've got that, no?12:43
frankbanrogpeppe: yes, I need to bootstrap again, I destroyed the environment12:43
rogpeppefrankban: ah, in that case, i recommend blowing away $GOPATH/bin and $GOPATH/pkg and doing go install launchpad.net/juju-core/...12:44
rogpeppefrankban: before trying again12:44
frankbanrogpeppe: ok12:44
=== teknico_ is now known as teknico
frankbanrogpeppe: same error :-/, and same agent version mismatch: http://pastebin.ubuntu.com/5646274/12:57
frankbanrogpeppe: FWIW, I am using "default-series: precise" in environments.yaml12:58
rogpeppefrankban: what result does juju status print if you use the juju command from this branch: lp:~rogpeppe/juju-core/256-more-status ?13:08
frankbanrogpeppe: http://pastebin.ubuntu.com/5646309/13:11
rogpeppefrankban: ah! i see the issue13:12
frankbanrogpeppe: cool!13:12
rogpeppefrankban: i'm not sure of the best way to fix it though :-)13:13
rogpeppefrankban: note that the bootstrap node is running quantal, and the other node is running precise13:13
frankbanrogpeppe: yes, that's maybe because I am bootstrapping the env using a juju compiled in my quantal machine13:14
niemeyerHello rockstars13:15
rogpeppefrankban: ah! this is because your charm is precise not quantal13:16
rogpeppefrankban: so it's doing exactly what we asked it to do13:16
rogpeppeniemeyer: hiya13:16
frankbanrogpeppe: indeed, I need the charm to be deployed on precise13:16
niemeyerrogpeppe: Yo13:16
rogpeppefrankban: so you're asking the impossible here13:16
rogpeppefrankban: because you're building the tools on quantal and expecting them to be used by a precise charm13:17
rogpeppefrankban: if we had changed the major version number as we should when we changed the db schema, you should have got a better error (no tools found)13:18
frankbanrogpeppe: aha! so the machine in precise will always get the latest released version of the agent for that platform?13:18
rogpeppefrankban: the machine in precise will grab what tools it can find that match its series.13:19
rogpeppefrankban: this is arguably wrong. the latest thinking, i think, is that if there's anything at all in the private bucket, it should ignore anything else.13:19
rogpeppefrankban: anyway, your best best for fixing the problem is to create a quantal version of the gui charm13:20
frankbanrogpeppe: ok, got it. so, I am deploying from trunk because I need "default-series" to be respected, but this way I am preventing the tools to be shared, because my machine is quantal, right?]13:21
rogpeppefrankban: yeah13:21
rogpeppefrankban: so if you deployed --upload-tools from precise, it would work (as it does for me)13:21
* rogpeppe goes for lunch13:29
dimiternback13:42
frankbanrogpeppe: so, I should be able to develop a precise charm bootstrapping from trunk (quantal) once a newer precise juju (containing latest settings changes) will be added to the cache, right?13:52
rogpeppefrankban: yeah13:56
frankbanrogpeppe: cool, any plan on when this will happen already?13:57
rogpeppefrankban: next release date13:57
rogpeppefrankban: i'm not quite sure when that will be13:57
rogpeppefrankban: i think it's once every two weeks13:57
frankbanrogpeppe: great, thanks for your help13:58
=== wedgwoodz is now known as wedgwood_away
fwereaderogpeppe, ping14:38
rogpeppefwereade: pong14:38
fwereaderogpeppe, Conn.PutCharm just adds 1 to revision -- was this thought about carefully or just cloned from python?14:38
fwereaderogpeppe, (when bumping revisions, that is)14:39
fwereaderogpeppe, (if you recall)14:39
rogpeppefwereade: it was reasonably carefully thought about (i started with one approach, then gustavo suggested the current one)14:39
rogpeppefwereade: erm, actually i might be thinking of bump-version14:41
fwereaderogpeppe, that's what I want you to be thinking about :)14:41
fwereaderogpeppe, I'm trying to figure out the right approach when upgrading14:41
rogpeppefwereade: i mean upgrade-juju --bump-version14:41
fwereaderogpeppe, ah, ok14:41
fwereaderogpeppe, I guess it's essentially the same question: are we deliberately handwaving multiple users with their own local repos?14:41
rogpeppefwereade: what other behaviour might you consider?14:41
rogpeppefwereade: i think so.14:42
rogpeppefwereade: the whole issue of local charms is wrong anyway14:42
rogpeppefwereade: because one user's local charm might be nothing like another's14:42
fwereaderogpeppe, one greater than max rev of matching charms in state and local repo14:42
* fwereade tries to figure out what's the worst thing that can happen if we just use PutCharm from upgrade-charm14:43
fwereade...or if we actually can use it at all14:43
rogpeppefwereade: i think we *should* use PutCharm from upgrade-charm14:44
fwereaderogpeppe, ok, but we need to get the charm twice then14:44
rogpeppefwereade: and fix it if it's got the wrong behaviour14:44
fwereaderogpeppe, I fear it's more a rewrite than a fix14:44
rogpeppefwereade: once when we deploy and once when we upgrade?14:45
fwereaderogpeppe, no, twice on upgrade14:45
rogpeppefwereade: ah, how so?14:45
fwereaderogpeppe, we can't know what bumpRevision should be before we have a charm14:45
rogpeppefwereade: bumpRevision only works with local charms, no?14:45
fwereaderogpeppe, charm dirs, specifically, local charms don't have to be dirs14:46
rogpeppefwereade: bumpRevision doesn't work unless it's a dir14:46
fwereaderogpeppe, and we don;t know charm kind until we've got it14:46
rogpeppefwereade: and i think that's probably ok14:46
fwereaderogpeppe, yes14:46
fwereaderogpeppe, so we can't know what's safe to pass for bumpRevision unless we get the charm and find out the type14:47
rogpeppefwereade: this is client-side, right?14:47
fwereaderogpeppe, yeah14:47
rogpeppefwereade: so what's wrong with just calling PutCharm with bumpRevision if specified, and just failing if it's not a dir?14:48
fwereaderogpeppe, bumpRevision, if sane, is automatic when upgrading14:48
fwereaderogpeppe, the question is determining sanity14:48
rogpeppefwereade: ah, i see14:48
rogpeppefwereade: hmm, i'm not sure that's right14:49
rogpeppefwereade: that means that if i upgrade-charm a bundle, it will silently do a different thing than if i upgrade-charm a dir14:49
fwereaderogpeppe, yes -- when working with dirs, we do different things14:50
rogpeppefwereade: i think i'd hope that upgrade-charm would do exactly the same thing regardless of the source of the charm.14:50
rogpeppefwereade: currently we only do different things if you explicitly *ask* to do different things, no?14:50
fwereaderogpeppe, define "currrently"14:51
fwereade;)14:51
rogpeppefwereade: in the current trunk14:51
* fwereade shrugs14:51
rogpeppefwereade: of juju-core14:51
fwereadeit's not implemented ;)14:51
rogpeppefwereade: well, we have deploy --bump-revision14:52
rogpeppefwereade: which i'd expect to be the same as upgrade --bump-revision14:52
rogpeppesorry, upgrade-charm14:52
rogpeppefwereade: i think making it explicit forces the user to think about potential multi-user issues14:53
fwereaderogpeppe, it was a heavily requested feature14:54
rogpeppefwereade: bump-revision? or the automatic nature of it?14:55
fwereaderogpeppe, automatic bump14:55
rogpeppefwereade: i'd be happier if upgrade-charm didn't change the local charm at all, but uploaded it at one revision higher than the charm in the state14:56
rogpeppefwereade: the side-effect on disk seems unnecessary14:56
fwereaderogpeppe, not unreasonable14:57
rogpeppefwereade: and in that case you can do it with any charm at all14:57
fwereaderogpeppe, hmmmm, not sure that makes sense to me14:57
rogpeppefwereade: yeah, you probably want it to happen only with local charms14:58
rogpeppefwereade: where there's no automatically updated revision when it changes14:58
fwereaderogpeppe, yeah14:58
fwereaderogpeppe, trying to figure out if I can forget about the charm in state and just do one higher than the local one though14:59
rogpeppefwereade: if you're not changing it on disk, that won't work14:59
rogpeppefwereade: BTW is there some way of finding out the highest revision number for a given charm in the state?15:00
fwereaderogpeppe, I didn't specifically agree to not-changing-on-disk, but I'm still considering it15:00
fwereaderogpeppe, nope15:00
rogpeppefwereade: i think it might be best to go for the simplest possible approach here15:01
rogpeppefwereade: for the time being15:01
fwereaderogpeppe, I think, though, that if we say local repos are only supported in single-user mode, we can get away with just bumping locally15:01
rogpeppefwereade: yeah15:01
fwereaderogpeppe, ok, thanks, we'll see where we can get to with that15:01
rogpeppefwereade: and don't worry about getting the charm twiece15:01
rogpeppefwereade: (you could have PutCharm return a particular error if it can't bump the version)15:02
fwereaderogpeppe, as long as I check repo type I'll only do that when it's local15:02
fwereaderogpeppe, ah, hmm, yeah15:02
fwereaderogpeppe, cheers15:02
rogpeppefwereade: np15:02
rogpeppefwereade: does this code look right for adding then removing a relation? http://paste.ubuntu.com/5646600/15:11
mattywanyone know a reason I might be getting connection timed out to when trying to run juju status?16:03
rogpeppemgz: ping16:11
mgzrogpeppe: hey16:11
rogpeppemgz: i was just looking at the test images stuff in environs/ec216:12
rogpeppemgz: what's supposed to be the difference between TestImagesContent and imagesData ?16:12
rogpeppemgz: because as it is, anyone that runs the tests on i386 will get failing tests16:13
rogpeppemgz: because TestImagesContent has no i386 entries16:13
mgzrogpeppe: right.16:13
mgzdo you think the juju test suite passes on i386?16:13
rogpeppemgz: i know it doesn't16:14
rogpeppemgz: for this one reason (at least, i guess)16:14
rogpeppemgz: i don't see any other reason why it shouldn't16:14
mgzso, this is an intermediate state. there's no reason to have a static imagesData at all.16:14
rogpeppemgz: it's just for tests, right?16:14
mgzthe tests that need it aren't testing the mapping of cloud thingy data to image ids16:15
mgzso, they should just be given something that will work16:15
rogpeppemgz: yeah, the problem is that various pieces of logic use version.Current16:15
rogpeppemgz: that is being fixed, but for the time being, i guess i'll add an i386 line to TestImagesContent16:15
mgzI envisioned the next step as just generating the right string from the same values as the lookup will use16:16
rogpeppemgz: i think just fixing version.Current for the tests should do the job16:16
rogpeppemgz: which is a little bit less whiteboxy16:17
rogpeppemgz: it took me ages to work out why the lines in imagesData weren't being used :-)16:18
dimiternrogpeppe: care for a review? :) https://codereview.appspot.com/7927043/16:45
rogpeppedimitern: will do16:45
dimiternrogpeppe: cheers16:45
TheMuefwereade: ping17:06
fwereadeTheMue, pong17:07
TheMuefwereade: just too a look into deploy.go. could it be that deploy --config is already implemented?17:07
* fwereade looks17:08
TheMuefwereade: it reads the YAML and passes it to conn.DeployService()17:09
fwereadeTheMue, hmm, seems so17:10
fwereadeTheMue, that's good news :)17:10
TheMuefwereade: seldom been so fast. *lol*17:10
fwereadeTheMue, nice :)17:11
fwereadeTheMue, just reviewed the $HOME stuff17:11
fwereadeTheMue, please let me know if there's any uncertainty17:11
TheMuefwereade: yep, will read it now. did you find any Init() outside of main()? sh**, should be all removed. *sigh*17:12
fwereadeTheMue, only a couple17:12
TheMuefwereade: ok, will clean it. thx for the review17:13
rogpeppedimitern: am looking at your review. while i'm at it, if you want a simple one: https://codereview.appspot.com/801604317:14
fwereadeTheMue, as a suggestion, the two nastiest places are repo.go and cloudinit_test.go17:14
dimiternrogpeppe: sure17:14
rogpeppefwereade: this branch should fix trunk tests under i38617:14
rogpeppehttps://codereview.appspot.com/801604317:14
fwereadeTheMue, single small CLs to unmess those particular areas would probably make your life easier17:15
* fwereade looks17:15
TheMuefwereade: yes, it started small, but then the effect growed17:16
fwereadeTheMue, I know how it happens :)17:16
fwereaderogpeppe, LGTM17:18
rogpeppefwereade: thanks!17:18
TheMuefwereade: regarding the cache path, could it be a problem if two different environments share the same cache path?17:19
fwereadeTheMue, don't think so, at the moment, they both have the same store17:19
fwereadeTheMue, this will probably end up changing but we don;t have to worry about that now17:20
TheMuefwereade: ok, hmm, thinking about one who has no $HOME/.juju/cache, because she only uses $JUJU_HOME for her environments17:21
fwereadeTheMue, surely we just have to use JujuHome()?17:21
TheMuefwereade: yes, no more constant. and that has been the original idea, where Init() always ensures a $JUJU_HOME. ;)17:22
fwereadeTheMue, I don't think that should be internal to the charm package though... seems like the simplest thing is to make cachePath a param17:22
fwereadeTheMue, although that's probably out of scope17:22
TheMuefwereade: but not this CL, my technical leador told me. :D17:23
fwereadeTheMue, just get it from JujuHome at runtime and forget that constant17:23
fwereadeTheMue, :)17:23
dimiternrogpeppe: reviewed17:23
fwereadeif anyone's free, frankban's https://codereview.appspot.com/7947043/ lacks for a recent second LGTM17:24
rogpeppefwereade: will have a look after i've finished dimitern's17:24
frankbanthanks rogpeppe17:24
TheMuefwereade: ah, your reviewd branch hasn't been the newest one. the Init()s seem already to be removed. *phew*17:33
fwereadeTheMue, oh, damn, sorry17:34
* fwereade wonders how he did that17:34
TheMuefwereade: no pro, only good for me.17:34
TheMuefwereade: the patch set is no 6, your comments on no 5.17:35
fwereadeTheMue, hell, could have sworn I refreshed17:35
fwereadeTheMue, sorry again17:36
TheMuefwereade: you still found enough ;)17:37
jamanyone around to ask about connection problems?17:37
jamI'm trying to bootstrap, and then status fails with lots of "connection established" but the immediately disconnecting.17:37
mattywjam, do you mean me?17:37
jamI mean a juju-dev person17:38
jamlike TheMue or fwereade17:38
TheMuejam: connecting to what?17:38
jamTheMue: this is the start of /var/log/juju/machine-0.log http://paste.ubuntu.com/5647008/17:39
jamconnecting to mongo is failing because of auth17:39
jamjuju the client does: http://paste.ubuntu.com/5647012/17:40
jamover and over17:40
TheMuejam: hmm, no, not had during my tests17:40
mattywjam, TheMue you seen anything like this? https://bugs.launchpad.net/juju-core/+bug/115988517:41
_mup_Bug #1159885: juju status fails with connection timed out (1.9.12-precise-i386) <juju-core:New> < https://launchpad.net/bugs/1159885 >17:41
TheMuejam: but i also made no life test this afternoon17:41
jammattyw: connection refused looks more like mongod isn't running17:42
jamand I can see that it is17:42
mattywjam, it looks like it fails to install - see the 404 error?17:42
jammattyw: right, bug 1159885 is because mongod isn't running, what I'm running into is because mongod is running but doesn't have the right auth keys17:43
_mup_Bug #1159885: juju status fails with connection timed out (1.9.12-precise-i386) <juju-core:New> < https://launchpad.net/bugs/1159885 >17:43
mattywjam, yeah I saw that, I just wondered if you'd seen anything like that before17:44
jamI have not specifically seen that17:44
fwereademattyw, I think I have seen that with version mismatches... did you run bootstrap (1) build against your local tree (2) with --upload-tools (3) with a default-series matching your own machine?17:48
fwereademattyw, soory, I mean jam17:49
jamI'm not using --upload-tools17:49
mattywfwereade, no problem, If you're able to spare a few minutes to take a look at mine after helping jam I'd appreciate it17:49
jamthis is failing immediately after bootstrap17:49
fwereadejam, mattyw, I need to hit the shops before they close I'm afraid -- jam, I would suggest that rogpeppe is your man for that error if it's on the machine17:52
jamk17:53
fwereademattyw, ah-ha! there's no i386 mongo build available17:54
fwereademattyw, tyvm for excellent bug report17:54
jammattyw: right, good catch fwereade, you have to run an amd64 target. I have a small patch for that17:54
mattywfwereade, good news, no problem, I've been at the receiving end of too many bad bug reports17:54
fwereadegtg, nn all17:55
mattywjam, thanks for the patch, I'll give that a go tomorrow morning18:00
jamfwereade, rogpeppe: looks like a version skew. cloud-init is passing '--constraints' to jujud on startup, but that obviously isn't supported by juju 1.9.1118:01
rogpeppejam: which issue are you referring to here?18:03
jamrogpeppe: I was trying to bootstrap today without passing --upload-tools18:03
jamit fails b18:03
jambecause trunk tip18:03
jamasks jujud to use '--constraints'18:03
jambut it doesn't support it18:03
rogpeppejam: yes, we've made a backwardly incompatible change18:05
rogpeppejam: it's a problem that we never increment the major version number18:06
jamwell, we bump the minor, but yeah, that is a 1.9.12 won't suceed to bootstrap a 1.9.11 binary18:06
jambut we haven't finished publishing 1.9.1218:07
rogpeppejam: exactly, and that's what you're trying to do18:07
rogpepperight, that's me for the day18:36
rogpeppeg'night all18:36
rogpeppethere's a trivial proposal up for review here, BTW: https://codereview.appspot.com/793104518:36
=== Makyo is now known as Makyo|out
thumpermorning20:05
niemeyerthumper: Yo21:12
thumperhi niemeyer21:12
vdsI'm trying to juju bootstrap on precise with trunk juju-core but I get the following error:  error: juju-origin: expected nothing, got nothing22:10
=== hazmat` is now known as hazmat
vdsdavecheney, maybe I can disturb you for this, I'm trying to juju bootstrap on precise with trunk juju-core but I get the following error:  error: juju-origin: expected nothing, got nothing22:27
davecheneyvds: never heard of that configuration key22:34
davecheneyi'22:34
davecheneyid' suggest deleting it22:34
davecheneyvds: as a general comment, environments.yaml are not portable between the py and go versions22:35
davecheneythis could be considered a bug22:35
davecheneybut it is what it is22:35
thumperdavecheney: hey22:36
vdsdavecheney, ah, that's good to know, now I have a similar error for s3-uri22:36
thumperdavecheney: can I get some time from you this afternoon to chat about general State stuff?22:36
davecheneythumper: your afternoon or my afternoon ?22:37
davecheneygotta piss of to get a haircut about 2.2, 2.5 hours from now22:37
thumperdavecheney: after lunch my time, would love to do it now, but I'm going to the gym in about 20 minutes22:37
davecheneyok22:37
davecheneyhit me up when you get back22:37
thumperok, ta22:38
vdsdavecheney, I'm afraid there's something broken, no matter what option I fix or comment, I always get the same error: expected nothing, got SOMETHING_ELSE22:43
vdsdavecheney, can you point me to who could be interested in that behavior?22:43
davecheneyvds: I am the bugmaster for juju-core22:51
davecheneyi can help22:51
davecheneyvds: can you provide me with a copy of the environments.yaml ?22:51
vdssure22:52
vdsdavecheney, http://pastebin.ubuntu.com/5647900/22:55
davecheneyvds: try removing line 1923:00
davecheneylocal should be ignored23:00
davecheneybut just in case remove it, we don't have a local provider23:00
davecheneyalso, canonistack is unlikely to work23:00
davecheneyit hasnot free public ips23:00
davecheneyyour best bets are hp cloud an ec223:00
vdsdavecheney, ok I'll try ec223:01
vdsdavecheney, thanks23:01
davecheneyThurloat: so here is the problem, the prototype for ServeHTTP does not return anything23:24
davecheneyyou have a request, and a writer which you can write to about things in the request23:24
davecheneysorry23:24
davecheneywrong  ch23:26
=== sidnei` is now known as sidnei
m_3davecheney: hey, so I don't see any man pages in the goju package23:48
m_3davecheney: shall we try to repurpose the juju-0.6 manpages?23:49
m_3davecheney: this came up when adding update-alternatives... the juju-2.0 just didn't have one :)23:49
m_3davecheney: perhaps just a build step that dumps the cli options to troff?23:50
davecheneym_3: will raise a bug23:56
davecheneyTBH, nobody has considered man pages23:56
m_3davecheney: ha.. nm... found issue 101... https://code.google.com/p/go/issues/detail?id=10123:57
davecheneyeven better (or worse)23:57
davecheneyoh, that23:57
m_3no biggie.. just wondering23:57
davecheneyyeah, sort of related23:57
davecheneym_3: good catch, this is a compatabilty gap between pyjuju and gojuju23:57
m_3seems like it'd be pretty easy to format help output dynamically... bet that's there in the issue23:57
davecheneythumper: ping23:58
m_3the juju-0.6 man is really just the list of subcommands... essentially the output of `juju`23:58
davecheney^ thumper is putting his energy into making juju help tell you stuffs23:58
davecheneyi dunno if that superceeds or augments the man pages23:58
m_3rockin23:58
m_3I'll just version juju-0.6 accordingly and we can go from there (do the same in the 2.0 packaging)23:59
m_3planning on having MP for you on that one23:59

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