/srv/irclogs.ubuntu.com/2013/02/21/#juju-dev.txt

=== imbrando1 is now known as imbrandon
thumperdavecheney: what would your recommendation be around wanting a max that works with ints?01:39
davecheneythumper: what is the question ?01:42
thumperdavecheney: well, math.max works on float6401:42
thumperbut I'm trying to find the longest int01:42
davecheneyyou'll find lots of01:43
davecheneyfunc max(a, b int) int { if a > b { return a } return b } 's01:43
davecheneyin the codebase01:43
davecheneythat is the current standard01:43
thumperI just realized that codereview.appspot was sending email to my gmail account (that I don't actually read)01:48
thumperand I can't configure it to send email to my normal address01:48
* thumper chalks up another mark against rietveld01:49
thumperdavecheney: so why did your last comment not go to the merge proposal?01:52
davecheneythumper: i have no idea01:52
davecheneyto be honest, when I joined, the attitude was to ignore the MP and use Rietveld01:52
davecheneythe comment should arrive on the MP evnetually, it was cc'd on the review01:52
davecheneyso you should have got the comments via the route of01:53
davecheneyrietveld -> mp -> gophers group -> you01:53
thumperit is faster...01:59
thumperrietveld -> mp -> me (as I proposed the merge)01:59
thumperbut it doesn't arrive on the mp01:59
thumpersince I wrote all that email shit with abentley, I know how it works01:59
thumperoh I know what it is02:00
thumperthe email address that it is coming from is not linked to any known launchpad user02:00
thumperso it drops them on the floor02:00
thumpersince my gmail account isn't linked to my LP user, LP ignores all email from it02:01
davecheneybzzt02:01
thumperobviously roger has linked his gmail to LP user02:01
thumperhis default email address for the LP user is his canonical one02:01
thumperwhich is what the outgoing MP email is sent as02:02
davecheneymaybe, he was winging for months that he wasn't getting any updates02:02
thumperthat is what it is02:02
* thumper knows it02:02
thumperso what I have to do is to add my google mail address to LP02:02
thumperand so does every other user02:02
thumperwhich sounds crackful02:03
thumperwould be better if rietveld would allow me to configure my email address02:03
davecheneyhmm, that might be unpossible02:04
davecheneycanonical.com is a gapps domain02:04
davecheneybut the email portion is disabled02:04
davecheneyto send/recieve as your canonical identity you would need a google identity on canonical.com02:05
thumperdavecheney: OK, my question around this latest MP is that I have four different LGTM calls, but there is still a little contention around the init command AFAICS02:05
davecheneyfuckem02:05
davecheneyit's called source control02:05
davecheneyyou can always propose another change02:05
thumperheh02:06
* thumper emails juju-dev with this email revalation02:07
thumperdavecheney: so you reckon submit this alias branch for merging now?02:08
davecheneythumper: +102:10
thumperkk02:10
davecheneywhat is the worse people can do ?02:10
davecheneythey are miles away02:10
thumperwell... from past experience, the worst they can do is revert the merge, and yell publicly on the mailing list at how shit you are02:12
* thumper says mostly in jest02:12
davecheneyyou don't need to commit code for that02:12
davecheney:P02:12
thumperfucking conflicts...02:13
* thumper fixes02:13
* thumper goes to find his child02:17
=== wedgwood_away is now known as wedgwood
* thumper is confused03:32
thumperdavecheney: ping03:35
davecheneyack03:45
davecheneythumper: ack03:45
thumperdavecheney: nm, found that go build doesn't report all the errors03:45
thumperwhich is why  I was confused03:46
thumpergo test found them03:46
davecheneyok03:46
davecheneyoffline for 5-10 mins03:46
davecheneyrebooting + MOAR RAM!03:46
davecheneymmm, 8gb04:09
davecheneyi had forgotten that I had donated some to my other machine a while back04:09
davecheneyand only remembereed that when the said donated ram failed04:09
=== wedgwood is now known as wedgwood_away
TheMueMorning08:05
=== TheRealMue is now known as TheMue
fwereadeTheMue, morning08:21
fwereadeTheMue, can you think of any reason we have the --upload-tools flag on bootstrap/upgrade, instead of just an upload-tools command that puts stuff into the appropriate "public-bucket" (wtf? why not "tools-bucket"?) for the environment?09:51
TheMuefwereade: First, yeah, tools-bucket is more clear than public bucket. +1 on that. ;)09:52
fwereadeTheMue, do you recall anything else that it's used for?09:53
TheMuefwereade: I think the basic idea has been to upload the tools "on the fly", but I don't know if it's really better than having an explicit command for it.09:53
TheMuefwereade: Can't remember the discussion which led to this decision.09:54
fwereadeTheMue, I think it's way back before I even started on go09:54
TheMuefwereade: Yip, it's in there for a long time. Is our IRC archive searchable?09:55
fwereadeTheMue, I think it's just cargo-culting from python tbh :(09:55
fwereadeTheMue, (the public/private buckets, anyway)09:55
TheMuefwereade: Think so too. In the beginning we've ported much 1:1.09:56
fwereadeTheMue, the tools stuff was done round about lisbon 1 but I wasn't closely involved... guess I should talk to niemeyer this pm, see if he has context I lack09:56
TheMuefwereade: I'm sure he can answer your question.09:57
TheMuefwereade: http://irclogs.ubuntu.com/2012/05/01/%23juju-dev.txt09:58
frankbanhi fwereade: is there a bug for the default-series problem?10:11
fwereadefrankban, not yet, I'm looking into it more closely just now10:12
frankbanfwereade: ack thanks10:12
fwereadefrankban, quick check: were you using --upload-tools? because that seems to work in quite a surprising way10:19
frankbanfwereade: yes10:19
fwereadefrankban, right, yeah, ISTM that upload-tools is crack, because it just forces everything to run with the tools that have been uploaded regardless10:19
frankbanfwereade: so it takes the series I am running in the local machine?10:20
fwereadefrankban, yeah, and it looks like it's totally infectious10:20
frankbanfwereade: so, in theory, if I compile and run juju in a precise lxc it should work...10:21
fwereadefrankban, I have a nasty suspicion that even without upload-tools it will force the series/arch of the bootstrap node onto everything it provisions, but I'm still verifying that10:21
fwereadefrankban, hmm, yes, worth a try10:23
frankbanfwereade: I will10:23
fwereadefrankban, you will still be stuck with whatever you uploaded for absolutely everything you deploy, but at least you should be able to progress10:27
mariuskoHi, where should charm settings be saved?11:05
fwereademariusko, I'd expect charm settings to be declared in the charm's config and set individually for each service running the charm11:06
fwereademariusko, what sort of settings are you thinking of?11:06
mariuskofwereade: these are more locally cached ones11:19
mariuskoactually, they are from the relation to mongodb, but they needs to be reused in config-changed hook11:20
mariuskoI could not find an easy way to find it there without knowing the unit number11:21
mariuskoWhen there is just one relation possible to mongodb, I would expect to be ablo te get those relation config options easily11:22
fwereademariusko, there's a relation-list tool that will tell you what units are on the other side of the relation11:22
mariuskoI.e. in this case I would expect to write the example "user=`relation-get -r db:42 user mysql/0`" as "user=`relation-get -r db user mysql`" if there is a one-to-many relationship from mysql11:25
fwereademariusko, there's `relation-ids <name>` to tell you what relations exist; `relation-list <id>` to tell you what units are in each relation; and then you can `relation-get <id> <unit>`11:26
fwereademariusko, except I've done the syntax completely wrong, sorry11:26
mariuskofwereade: ok, let me see if it can solve the problem. Is there a way to debug these commands interactively?11:27
fwereademariusko, what version of juju are you using?11:27
mariuskoThey did not work in "juju debug-hooks"11:27
fwereademariusko, ok, you're using python... and that would have been what I suggested next11:27
mariusko0.6.0.1+bzr616-0juju2 from the ppa11:27
fwereademariusko, do you have a transcript of what didn't work by any chance?11:28
mariuskofwereade: "juju debug-hooks testapp4/0", then "relation-ids" gives "No JUJU_AGENT_SOCKET/-s option found"11:31
fwereademariusko, does any hook tools work at all?11:32
fwereademariusko, eg juju-log?11:32
mariuskonope, just when run automatically11:32
fwereademariusko, huh, that rather sounds like debug-hooks is just plain broken11:36
* fwereade tries to think who might be up to date with the python and awake at this hour11:36
fwereademariusko, you might be able to iterate *reasonably* quickly if you keep upgrading your config-changed hook from a local repo11:39
mariuskofwereade: pushed the current code: https://code.launchpad.net/~mariusko/charms/precise/node-app/lp1123939_procfile_support11:42
mariuskoCaching now happens in "/etc/juju_nodejs_app_${app_name}_mongodb.env"11:43
fwereademariusko, I'm not quite sure how well that will work when there are multiple mongodbs11:51
fwereademariusko, it seems like every unit of node_app will just store the most-recently-changed mongodb server?11:51
mariuskoI think there only could be one associated with one node app11:51
fwereademariusko, I'd better go take a look at the mongodb charm ;)11:53
mariuskoHmm japp, "app_name" is set by the user, so it could be other charm instances with the same app_name...11:53
mariuskoMaybe service name should have been included11:53
mariuskoThat would also break some of the existing stuff in the charm too11:55
mariuskoMaybe "$JUJU_SERVICE" should have been used instead12:00
fwereademariusko, that should definitely be unique, yeah12:00
fwereademariusko, and it does rather look as though it is just storing the most-recently-changed info12:02
fwereademariusko, which I think might be a problem is the most-recently-changed on ever goes offline12:03
mariuskothere are a lot of issues in the charm japp12:03
* TheMue is at lunch12:04
mariuskoit looks more like in a demo state now12:04
mariuskoAnyway, there should just run one instance on each machine anyway12:05
fwereademariusko, yeah, I'm not too bothered by the machine-sharing issue right now12:05
fwereademariusko, I think it would be noticeably better if it maintained an up-to-date seed list (I'm pretty sure the node.js drivers can work with replicasets, right?)12:06
mariuskobut if the mongodb dies, I hope that juju fires up a new one and then run the relation hook again to set the new info?12:06
fwereademariusko, if you've got 3 in a replicaset and the last one to change goes down, I fear that the node apps will only try to connect to that one and fail ignominiously12:07
mariuskoSeems it reads it: "replset=`relation-get replset`"12:07
fwereademariusko, that's just a string12:07
fwereademariusko, taken straing from the config12:07
fwereademariusko, AFAICT, anyway12:08
fwereades/straing/straight/12:08
mariuskohaven't started playing with mongo yet, so I don't know much about it12:08
mariuskoIt is now set to ""myset"12:09
fwereademariusko, I'm having some trouble spelunking through the mongodb charm -- it is certainly doing sane things in the replset relation hooks12:09
mariuskoI thought the relationship was many nodeapp->one mongodb->many mongodb nodes12:09
fwereademariusko, building up host:post,host:port lists... but I haven't figured out if/how they pass them on to database clients12:10
mariuskoI have a replica-set relation from mongodb12:10
fwereademariusko, that relation looks like it's being sensible -- ie it's causing the individual mongos to keep track of their replica sets, which is good12:11
fwereademariusko, so if you successfully connect to any one, your driver should be able to figure out the current rs state and go from there12:12
fwereademariusko, but if a node app only has one mongo address stored, and that address stops working for any reason, I don't think it'll be able to connect12:13
mariuskofwereade: firing up one more mongo unit now to see what happens12:19
mariuskoBut it was like that before my hacking too :)12:19
mariuskoJapp, the mongodb IP changed to the last added mongodb node12:20
fwereademariusko, sure, sorry, I think I've derailed you quite badly :(12:22
mariuskofwereade: japp, it seems like the client should list all nodes when connecting: "MongoClient.connect("mongodb://localhost:30000,localhost:30001/integration_test_?w=0&readPreference=secondary", function(err, db) {"12:23
mariuskoAt least more than one12:23
fwereademariusko, re uniqueness, incidentally, it's more-or-less ok to store that sort of cached information inside the charm dir12:24
fwereademariusko, the important bit is that if it's stored in the charm dir, it's for the consumption of the *charm* (which can then use it to write config files in /etc or wherever, in response to hooks)12:24
mariuskoIf all should be listed, it is maybe easier to try to do it properly and fetch all of them12:24
fwereademariusko, if it's for the consumption of the service in any way -- eg an actual config.js, definitely don't store it in the charm dir12:25
fwereademariusko, +1 to that, I think12:26
fwereademariusko, no sure how to handle connections to multiple mongodb *services* though... that might be a case where the "limit" setting on the charm would be helpful12:27
fwereademariusko, if only limit restrictions were actually implemented :/12:27
mariuskoHehe, juju looks a bit in alpha state at this time12:28
mariuskoBut seems to work in simple cases for test/development purposes12:28
mariuskoHope it will change for Raring12:28
fwereademariusko, hopefully we'll have something solid for you... but I'm not sure limit will make the cut12:29
fwereademariusko, on the plus side, I think that it's reasonably clear that the tools to get node_app doing the right thing are in place12:29
fwereademariusko, it takes a little while to get used to charm-writing though12:30
mariuskofwereade: tried to describe the problem here: https://bugs.launchpad.net/charms/+source/node-app/+bug/113118812:30
_mup_Bug #1131188: Does not support multiple mongodb units <node-app (Juju Charms Collection):New> < https://launchpad.net/bugs/1131188 >12:30
fwereademariusko, thank yu, that's extremely helpful12:30
mariuskoJapp, Heroku etc. seems to have a more complete service just now, but AFAIK it does not allow hacking on it like Juju :)12:31
fwereademariusko, I don't want to bash those at all, they do what they do just as they should, but we're not trying to do quite the same things :)12:32
mariuskoSure, those services also have their own proprietary tools so it is harder to change cloud providers. Sent a merge requst12:37
* dimitern lunch12:39
bachi jam, thanks for the review.12:43
baci don't understand your comment in the README about --upload-tools12:43
baceven if you use --upload-tools, i think it will complain if it sees a juju-origin12:44
jambac: for juju-core you can do 'juju bootstrap --upload-tools' which is how you get the 'current' version of tools available for things to use.12:44
jamWith Python juju12:44
bacso for people coming from pyjuju with a pre-existing environments.yaml they will see that complaint12:44
jamyou had to specify a source12:44
jamlike ppa12:44
jambac: sure, my point is, if someone was *using* a custom source for juju (like juju-origin: ppa) they most likely want "juju bootstrap --upload-tools".12:45
bacjam: gotcha12:45
jamI was mentioning it as "do we want to include a side reference so people can figure out where to get similar functionality"12:45
jamthough I imagine people tend to have that line because it was the magic voodoo that made things work12:45
jam(because precise has an old version of juju that is incompatible with lots of python-juju clients)12:46
bacjam: with the two positive reviews am i free to make the changes requested and then submit or do i need to re-propose?12:46
bacfor this one i will definitely re-propose.  just asking about the expectation for this project.12:47
jamIf you have 2 LGTM, then submit (though you should respond to make it clear that you've done the requested actions, etc.)12:47
fwereadebac, generally we take the string "LGTM" to be the indicator of sufficient positivity, so I'm not quite sure dfc's counts12:58
fwereadebac, I think his "weird API" comment has some legs... not because the API is weird, IMO it's a perfectly sensible one, but I'm not sure how nicely it will play with rog's RPC magic12:59
fwereadebac, jam: I'm also a little bit reluctant to recommend --upload-tools too loudly, but I have not yet figured out whether it breaks juju *enough* worse than it already is re series/arch selection13:01
fwereadebac, jam: and I am afraid I've just been called to lunch13:02
fwereadeniemeyer, heyhey13:41
niemeyerfwereade: Heya13:42
fwereadeniemeyer, I liked your ubuntu finder sketch :)13:43
dimiternniemeyer: hey13:43
niemeyerfwereade: Neat :)13:44
niemeyerdimitern: Heya13:44
bacdimitern: hi, thanks for the review.  i removed the 'cobzr branch -b' part b/c i found it did not work.  does it work for you?13:49
dimiternbac: yw, actually I never used it like that, I always use bzr checkout -b branchname (that's with cobzr)13:49
dimiternthat's maybe worth mentioning (if it's not there already)13:50
bacdimitern: i'll try that13:50
=== wedgwood_away is now known as wedgwood
TheMuere14:57
TheMueArgh, my system crashed. *grmpf*14:57
dimiternfwereade: ping16:13
fwereadedimitern, pong16:15
dimiternfwereade: i couldn't find anywhere Service.SetCharm is used, except for a few tests16:15
fwereadedimitern, it will be used by upgrade-charm16:15
dimiternfwereade: but a lot of the things it has to do are uniter operations16:16
fwereadedimitern, its current total lack of safety is the primary reason for the lack of upgrade-charm16:16
fwereadedimitern, sorry, restate?16:16
dimiternfwereade: e.g. downloading a charm to see what it implements, its config, etc.16:16
fwereadedimitern, the uniter should already handle those changes once they've happened16:16
fwereadedimitern, the upgrade-charm story is all about making sure those changes are sane16:17
fwereadedimitern, so that the uniter will itself respond sanely ;)16:17
dimiternfwereade: so all the things you described about changes to Service.SetCharm (well, most of them) will in fact happen in the uniter, before calling it16:17
fwereadedimitern, I don;t think so -- can I talk properly in a mo?16:18
dimiternfwereade: what, hangout?16:18
mgzdimitern: if you're not hanging out yet, can you hop on mumble quickly and tell me if my settings on this box are working okay?16:23
dimiternmgz: sure16:23
fwereadedimitern, ping17:05
fwereadedimitern, sorry17:05
dimiternfwereade: pong17:05
fwereadedimitern, quick hangout?17:05
dimiternfwereade: ok, i'll send you a link17:05
fwereadedimitern, with you in 2 mins17:05
jtvIs anyone else having trouble running "make check" in pyjuju?18:31
jtvAnd "make review" etc?18:31
dimiternfwereade: it seems there's no clean way to stop a watcher without a panic :(18:34
dimiternfwereade: am I to expect that? and check for a panic in the tests?18:35
fwereadedimitern, hmm, sorry good point: that's a line saying watcher.MustErr(relationsw) or something?18:37
fwereadedimitern, change that bit18:38
dimiternfwereade: yeah, that one18:38
=== deryck is now known as deryck[lunch]
fwereadedimitern, that's checking that no sneaky git stops the watcher underneath us; now that we're deliberately stopping it you should be fine with an err or nil18:38
fwereadedimitern, maybe only start the new watcher once the old one has stopped? that might actually be neatest18:39
dimiternfwereade: :)18:39
fwereadedimitern, to be clearer: if there's an err, return it; if it's nil, start a new one18:39
dimiternfwereade: hmm18:39
fwereadedimitern, that could probably use a comment though, it's a bit subtle, and don't forget to fix up the defer stop (or defer a new one)18:40
dimiternfwereade: yeah, ok18:40
dimiternfwereade: i was thinking exactly of the defer18:40
dimiternfwereade: so it'll call MustErr instead18:41
fwereadedimitern, hmm, no, I don;t think you want MustErr at all for relationsw18:41
fwereadedimitern, I think you probably want a defer that stops the current value of relationsw, rather than snapshotting it18:41
dimiternfwereade: ISTM the only place MustErr is called on relationsw is in the <-Changes() case18:42
fwereadedefer func() {relationsw.Stop()}() rather than defer relationsw.Stop()18:42
dimiternfwereade: ah! got you - yeah, it'll be different18:42
dimiternfwereade: so filter.go: 223 that if should be gone18:43
dimiternoops 21318:43
dimiternno18:44
dimiternsorry, finally 221 :)18:44
dimiternon the relationsw18:44
fwereadedimitern, yeah, around 222: if err == nil { relationsw = service.WatchRelations() } else { return err }18:46
fwereadedimitern, something like that18:47
dimiternfwereade: won't that screw up the defer above?18:47
dimiternfwereade: ah, no - because we'll be out already!18:48
fwereadedimitern, depends if relationsw is naked or only evaluated inside the deferred func18:48
fwereadedimitern, if it's `defer relationsw.Stop()` then it's *that* specific relationsw that will be stopped; if it's inside a func it'll take the value of relationsw at the time it's finally executed18:48
dimiternfwereade: no, I mean I though I saw a inf loop there, but then I realized <-Changes() and the restarting won't happen again while in the defer18:50
fwereadedimitern, yeah, exactly, once we're in the defer we can't go back :)18:50
dimiternfwereade: neat :)18:51
dimiternfwereade: and I can get the err from relationsw.Err(), right?18:51
dimiternfwereade: right, so to test the watcher was restarted, I should stick a change just before the upgrade is fired18:55
dimiternfwereade: or you don't think this needs testing?18:55
dimiternfwereade: sorry it seems you dropped off18:59
jtvCould anyone give me a review for these Makefile changes?  https://code.launchpad.net/~jtv/juju/makefile-fixups/+merge/14990719:09
=== deryck[lunch] is now known as deryck
bac.21:01
bacfwereade: when you have a moment could you do a second pass on my branch?  if you think it is ok do i need to wait for dfc to re-review too?21:01
bacfwereade:  https://codereview.appspot.com/7401043/21:02
fwereadebac, sure, just a mo21:04
fwereadebac, LGTM, couple of trivial typos21:07
fwereadebac, I think you're fine re dfc, you did address his point21:07
bacfwereade: thanks21:12
_thumper_mramm: ok, at home now, hangout?21:26
_thumper_mramm: needs to be personal one though21:26
_thumper_as the laptop is upgrading :)21:26
mrammok21:26
mrammshoot me an invite?21:26
_thumper_I'll try...21:27
BradCrittendenfwereade: i have made the final changes.  i cannot submit the branch b/c i'm not in ~gophers.  can you merge it for me?21:28
_thumper_mramm: the ipad app won't let me add you :(21:28
_thumper_don't know why21:28
mrammok21:28
mrammlet me try inviting you21:28
_thumper_ok21:28
* _thumper_ tries to recall which image is the personal one21:29
mramminvite sent21:29
_thumper_which did you use?21:29
_thumper_I don't see it21:29
mrammthough perhaps to your canonical acount21:29
_thumper_perhaps invite the other me :)21:29
mrammlooking for your personal...21:30
=== BradCrittenden is now known as bac
gary_posterHey mramm, could you please add ~juju-gui to ~gophers so we can propose?21:30
gary_postermramm alternatvely I can give you individual people, as you wish21:31
mramm_thumper_: trying again, seems that I lost google hangout21:39
_thumper_ack21:39
_thumper_mramm: you disappeared again21:40
mrammhmm21:40
mrammgoogle hangout is not my friend today21:40
mrammtrying again with another browser21:43
mrammyea, nothing working, trying a reboot21:45
mrammbe back in 2 min21:45
=== _thumper_ is now known as thumper
thumperI home mramm isn21:51
thumperisn't having shell issues too21:51
thumpers/home/hope21:51
thumperI have a horrible feeling that this day is going to be a write-off21:52
thumperI hope not...21:52
hatcharrrrgggggggg22:01
* hatch smashes things in hope that it solves his problem22:02
thumperhi mramm22:02
thumpermramm: long two minutes :)22:02
mrammyea22:02
mrammcomputer hung on reboot22:02
mramm:(22:02
thumper:(22:03
thumperbut you got a shell ok?22:03
mrammeventually22:05
mrammnot sure why but it just took forever to get there22:06
mrammbut then all is good22:06
thumpermramm: are you going to try a hangout again?22:07
mrammthumper: I'm in a hangout with dave at the moment22:12
thumpermramm: ok22:15
mrammthumper: you still around?23:17
davecheneythumper: when you get done with mramm, can we have a chat ?23:24

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