/srv/irclogs.ubuntu.com/2015/09/17/#juju-dev.txt

xwwthave just a couple of steps remaining00:00
rick_h_alexisb: lol00:01
wallyworldmenn0: sorry, just got out of meetings, can talk now00:04
menn0wallyworld: thanks. which hangout?00:05
wallyworldhttps://plus.google.com/hangouts/_/canonical.com/tanzanite-stand00:06
mwhudsonoh the cannot find encoding bug is fixed in trusty-proposed now00:18
mupBug #1496639 opened: juju get incorrectly reports boolean default values <canonical-bootstack> <juju-core:New> <https://launchpad.net/bugs/1496639>00:24
* thumper wanders off to make a coffee01:20
mupBug #1496652 opened: Relation settings watcher exposes txn-revno to uniter <juju-core:In Progress> <https://launchpad.net/bugs/1496652>01:24
mupBug #1496652 changed: Relation settings watcher exposes txn-revno to uniter <juju-core:In Progress> <https://launchpad.net/bugs/1496652>01:33
mupBug #1496652 opened: Relation settings watcher exposes txn-revno to uniter <juju-core:In Progress> <https://launchpad.net/bugs/1496652>01:39
thumpermenn0: here is the master branch for the uniter upgrade step work http://reviews.vapour.ws/r/2682/diff/#01:52
thumpermenn0: just a forward port of the 1.25 with the new step added01:53
axwwallyworld: FYI I'm doing the tweak to unblock master, just being held up writing a test01:54
wallyworldty, saw the bug comment01:54
thumperman I love my coffee machine01:54
menn0thumper: looking01:54
thumperdavecheney: re bug 1465317, what's the current status of the fixes you have been doing?02:03
mupBug #1465317: Wily osx win: panic: osVersion reported an error: Could not determine series <osx> <packaging> <wily> <windows> <juju-core:Triaged> <juju-core 1.25:Triaged> <juju-release-tools:Fix Released by sinzui> <https://launchpad.net/bugs/1465317>02:03
thumperdavecheney: should we assign this bug to you?02:04
thumperfor the work you have been doing?02:04
menn0thumper: ship it02:08
thumpermenn0: cheers02:08
axwwallyworld: http://reviews.vapour.ws/r/2683/02:12
wallyworldlooking02:13
menn0thumper, wallyworld: i'm beginning to think this idea of Juju using MAAS' cached images is a non-starter02:13
thumperbecause?02:13
menn0thumper, wallyworld: the images don't appear to be in the same format02:13
wallyworldnot surprised02:14
wallyworldi was sort of afaid of that02:14
menn0the MAAS images are a tarball of a root filesystem02:14
thumpermenn0: document your findings on the bug, and we'll look for another solution02:14
menn0the images served by the public server are a tarball with the kernal separate and a .img file which contains the root filesystem02:15
menn0thumper: ok02:15
menn0thumper: should I remove it from the 1.25-beta2 milestone?02:15
wallyworldaxw: ship it, thanks for temp fix02:16
thumperum... yeah02:16
axwwallyworld: ta02:16
wallyworldthumper: menn0: this maas image thing is a direct request from dan w so i suspect we'll be asked to make it work somehow02:17
wallyworldby we, i mean us and maas02:17
thumperwallyworld: perhaps mass need to cache the initial format, then unpack for themselves02:18
* thumper hopes it is more maas02:18
wallyworldyes02:18
* wallyworld does too02:18
axwI think there was a mailing thread list about this stuff a while ago...02:18
wallyworldrings a bell02:18
menn0i'll have a look around02:19
menn0and i'll still send an email to relevant people about this02:19
axwmenn0: not sure how relevant, "Juju + MAAS + Image Downloads" from may 201402:20
axwerr sorry sept02:20
axwcan't read US dates :)02:21
menn0axw: i've seen that one02:21
menn0axw: that's the discussion around the ticket i'm looking at02:21
axwah ok02:21
menn0axw: no one seems to have checked if the image formats are actually the same :)02:21
axwheh02:21
menn0maybe it's easy to convert between them02:22
menn0i'm just pulling down the maas code now to check a few things02:22
menn0then i'll send this email02:22
wallyworldaxw: going afk for an hour or so, bbiab02:42
axwwallyworld: no worries, ttyl02:43
menn0wallyworld, thumper: bradm mentioned this to me when I was chatting to him earlier: https://bugs.launchpad.net/juju-core/+bug/149663902:53
mupBug #1496639: juju get incorrectly reports boolean default values <canonical-bootstack> <juju-core:New> <https://launchpad.net/bugs/1496639>02:53
menn0does that ring any bells?02:53
thumpermenn0: nope03:07
thumperbut interesting03:07
menn0thumper: attach it to 1.25-beta2?03:13
thumpermenn0: sure, why not03:13
thumperhmm...03:15
thumperwrote a simple charm to test a problem03:15
thumperbut the charm's default apt-get is failing03:15
thumperE: There are problems and -y was used without --force-yes03:16
thumperseems a bit weird03:16
thumperwas my squid-deb-proxy being out of date somehow03:55
thumpermiken: here I am then :)03:58
thumpertrying to reproduce the failure03:58
mikenYep, re-running my mojo spec with the same code revision that caused the config-changed failure, to see if I still see the issue too.03:59
thumpermiken: this one https://bugs.launchpad.net/juju-core/+bug/149454203:59
mupBug #1494542: config-changed error does not cause error state <juju-core:In Progress by thumper> <juju-core 1.24:In Progress by thumper> <juju-core 1.25:Triaged by thumper> <https://launchpad.net/bugs/1494542>03:59
thumpermiken: ah... are you able to run the environment with --debug?03:59
thumpermiken: then let me have the logs?03:59
thumperI'm not able to reproduce with my trivial failing charm04:00
mikenpossibly - I'll let the current run finish so I know whether I can reproduce it. If I can, is that an option I can add to the juju-deployer call? /me checks04:01
thumperno idea04:01
thumpermiken: does the deployer bootstrap for you?04:01
thumperit is juju I want in debug mode, not really the deplower04:02
thumperyer04:02
rick_h_thumper: which problem is this? deployer/config-changed sounds like the thing eric and natefinch-afk fixed today?:04:02
mikenAh - just to bootstrap. Sure.04:02
thumpermiken: if you use --debug when bootstrapping, that flag is passed through to the remote server, and it logs everything at debug too04:02
thumperyou can set it afterwards04:03
thumperbut easiest if bootstrapping to just use --debug04:03
mikenNice. I'll try setting it now too in case it does reproduce (takes 10-15mins to run deployment)04:03
mikenHmm - how can I set it with the deploy already going?04:04
thumperjuju set-env logging-config=juju=DEBUG04:05
mikenGreat04:05
mikenrick_h_: https://bugs.launchpad.net/juju-core/+bug/149454204:05
mupBug #1494542: config-changed error does not cause error state <juju-core:In Progress by thumper> <juju-core 1.24:In Progress by thumper> <juju-core 1.25:Triaged by thumper> <https://launchpad.net/bugs/1494542>04:05
thumpermiken: has rick_h_ hit it too?04:05
rick_h_miken: ah ok, that's different then04:06
rick_h_thumper: no, the mention of a config-changed issue made me think of https://bugs.launchpad.net/juju-core/+bug/1495681 from today04:06
mupBug #1495681: quickstart delployments broken in 1.24 <blocker> <ci> <quickstart> <regression> <juju-core:Invalid> <juju-core 1.24:Fix Released by ericsnowcurrently> <https://launchpad.net/bugs/1495681>04:06
rick_h_thumper: so just checking, but looks like that's different04:06
thumperok04:06
thumperwhat causes quickstart to not work?04:06
* rick_h_ goes back to hiding :)04:06
rick_h_thumper: something to do with nil values and the API that got cleaned up04:07
thumperrick_h_: WTH are you doing answering IRC now anyway?04:07
thumperrick_h_: you are setting a bad precident04:07
rick_h_thumper: meeting in an hour :)04:07
thumperew04:07
thumperwell that sucks04:07
rick_h_thumper: fortunately not too many of these04:07
rick_h_thumper: if only all of you would move to the US :P04:07
thumperTBH I don't think the US would want us all04:09
thumperstealing all those jobs from real americans04:09
rick_h_thumper: heh we just say that a lot, but we don't really care.04:09
mikenthumper: ok, running with the same spec and code rev did reproduce it. I can give you logs, but I only switched on --debug half way through (but before the config-change error, afaict). Is it just the /var/log/juju/unit-sca-app-0.log that you're after?04:12
thumperyes, and machine-0.log04:12
thumperthe unit one so we can see what it thinks04:12
thumperand machine-0 to check any server side changes04:13
thumpersee where the problem is, client or server04:13
thumpermiken: can you attach the logs to the bug plz?04:13
mikenAck04:13
thumperawesome04:13
thumperta04:13
rick_h_thumper: are all those safe to attach? e.g. cloud info? /me hasn't looked lately.04:19
thumperhmm...04:19
thumperI *think* so04:19
rick_h_miken: might just give a quick grep for cloud creds or anything. I know there was work to not outut things but don't recall where it left off tbh04:20
mikenrick_h_: yeah, I was just checking through after noticing that they're root:root 600 in ~/.juju/local/logs04:22
mikenI can see lots of "Response": "'body redacted'" 's04:24
thumpermiken: yeah, need to set the logging level to TRACE to get the data in there04:27
* thumper is on kid duty, will check in later with the bug to look (maybe)04:28
thumperI have a feeling that all work later will be emails and comments on documents04:28
mikenthumper: YOu can grab the logs from:04:28
mikenthumper: chinstrap.canonical.com:/home/michaeln/bug-1494542-logs.tgz If you can see there's nothing sensitive there, feel free to attach.04:28
* thumper has to go cook dinner before school production tonight04:28
mikenthumper: Nice - enjoy!04:29
thumpermiken: ok, ta04:29
=== urulama_ is now known as urulama
thumperbad status test... embedding actual version numbers in expected output07:51
* thumper settles down to write a few final emails with a glass of wine07:51
thumperhopefully the wine will help07:51
axwfwereade: I would appreciate a review from you on http://reviews.vapour.ws/r/2685/ when you can. I'd particularly like validation of my assertion in settingsDocNeedsMigration... but really the whole thing is a *little* bit hairy07:55
fwereadeaxw, cheers07:56
mupBug #1496750 opened: Failed worker can result in large number of goroutines and open socket connections and eventually gets picked on by the OOM killer <juju-core:New> <https://launchpad.net/bugs/1496750>08:40
mupBug #1496750 changed: Failed worker can result in large number of goroutines and open socket connections and eventually gets picked on by the OOM killer <juju-core:New> <https://launchpad.net/bugs/1496750>08:49
voidspacejam: fwereade: stdup?09:01
jamvoidspace: I' believe its strdup :)09:01
voidspacejam: :-p09:02
mupBug #1496750 opened: Failed worker can result in large number of goroutines and open socket connections and eventually gets picked on by the OOM killer <juju-core:New> <https://launchpad.net/bugs/1496750>09:04
mupBug #1495542 changed: 1.20.x cannot upgrade to 1.26-alpha1 <blocker> <ci> <regression> <upgrade-juju> <juju-core:Fix Released by axwalk> <https://launchpad.net/bugs/1495542>09:37
bogdanteleagaunit-err-0[1975]: 2015-09-17 09:39:11 DEBUG juju.worker.dependency engine.go:438 "metric-sender" manifold worker stopped: failed to open spool directory "/var/lib/juju/metricspool": stat /var/lib/juju/metricspool: no such file or directory09:42
bogdanteleagaanybody getting this on master?09:42
ashipikabogdanteleaga: windows?09:44
bogdanteleagaashipika: trusty09:44
bogdanteleagait appeared on windows as well fwiw, but it fails on trusty too09:44
ashipikabogdanteleaga: that's a change that landed with the maltese falcon feature branch…09:45
ashipikabogdanteleaga: which test did you run?09:45
bogdanteleagaashipika: I'm trying to deploy a charm09:45
ashipikabogdanteleaga: will look into it! thanks for reporting it09:46
ashipikabogdanteleaga: could you please file a bug on launchpad?09:46
bogdanteleagaashipika: I'll try later09:47
ashipikabogdanteleaga: thank you..09:48
jamfwereade: voidspace: I was looking at https://github.com/juju/juju/wiki/mgo-txn-example the one thing that sticks out as odd is the "e, err = e.st.Environment()" to refresh itself10:08
jamit feels really strange to override the 'self' pointer, as it doesn't change the caller, just the local context, right?10:08
fwereadejam, rather than e.Refresh()?10:08
jamIMO it would be clearer if we use a real local variable there10:09
jamfwereade: well either Refresh or local var10:09
fwereadejam, i.e. `env := e` outside?10:09
jamfwereade: right10:09
fwereadejam, there's a convention in state that methods not change unexpected fields, which is why no Refresh()10:09
fwereadejam, I have no objection to local vars though10:10
fwereadejam, would probably be clearer10:10
natefinch+1 for not overriding the receiver... that's certain to cause confusion.10:10
jamfwereade: I'm fine with the no Refresh, cause I understand not wanting to have to introspect your object to see if there were any side effects.10:10
fwereadejam, then +1 to fixing it to use local vars10:10
axwanastasiamac: when you're working... please see https://github.com/axw/juju/commit/3168dd66426d018a00ff32c61b91c9141351e8b510:12
voidspacefwereade: jam: although if you *know* your data is out of date, deliberately *not* refreshing struck me as a little odd10:24
voidspacefwereade: jam: you're choosing to deliberately leave stale data for other "observers"10:24
voidspacebut I haven't gone back and read the doc yet10:24
fwereadevoidspace, all data is always stale anyway10:25
voidspaceI guess the risk is that you leave other observers with inconsistent data, and stale data is better than inconsistent data10:25
voidspacefwereade: possibly stale versus we actually know this is wrong10:25
fwereadevoidspace, it's not so much about other observers -- individual entity types are not generally goroutine-safe -- as it is about ensuring every individual client sees a consistent (if not correct) picture of the entity; part of that is putting the responsibility for Refresh in their hands, and not pre-empting it10:27
voidspacefwereade: right10:27
voidspaceinconsistent data could be arbitrarily bad10:27
voidspacefair enough, although then it would seem that Refresh is almost never safe10:28
fwereadevoidspace, *that said* the value of that approach is certainly diminished -- it came from a time when everything had a direct db connection, and there were many more long-lived *state.Things floating around in the system10:28
fwereadevoidspace, almost all our state types are now very short-lived -- one API call and that's it10:29
voidspacefwereade: I've addressed all the issues on my PR except the txn assert and the tests for that10:29
fwereadevoidspace, cool, thanks10:29
voidspacefwereade: will ping you when it's done as it's a different beast from when it was last reviewed10:29
fwereadevoidspace, (fwiw, it's a slightly subtle notion of inconsistency -- a refresh *will* give you new, consistent data, but it potentially invalidates assumption you checked in the scope you're looking at it from. so we try to keep showing you the same picture; even if it *is* a lie, the cause of any failures will still be reported, and it's up to the client to Refresh and reconsider or just give up)10:32
mattywfwereade, ping?10:39
fwereademattyw, pong10:40
mattywbogdanteleaga, are you blocked on that metric spool error?10:45
voidspacefwereade: sure, understood. A refresh at an arbitrary point on another goroutine could present a very odd view of the world to another observer.10:47
voidspacefwereade: so a Refresh is *only* safe if you know there are no other observers. So Refresh is probably a bit of an anti-pattern.10:48
fwereadevoidspace, most of them aren't goroutine-safe, so the two observers are the internal and external views of the object -- but, yeah10:49
fwereadevoidspace, (State itself should be, but most of the stuff you get from a state will not be)10:50
voidspaceright10:50
bogdanteleagamattyw: nope, it just made logs harder to read11:01
bogdanteleagait does try a lot :)11:01
mattywbogdanteleaga, yeah - it's the first time I've read the logs from the point of view of someone who doesn't know about the dep engine - how understandable they are leaves a lot to be desired11:11
mattywbogdanteleaga, we'll fix it, thanks for bringing it up11:11
bogdanteleagamattyw: np, shouldn't it create the directory itself though? it does still error differently if I create it manually11:13
mattywbogdanteleaga, all of that stuff should get handled automatically when it needs it11:16
mattywbogdanteleaga, but from the logs that'a all left very unclear :/11:17
bogdanteleagamattyw: oh, I think I get what you mean11:18
anastasiamacaxw: saw :D11:21
rogpeppeanyone got an opinion on what HTTP status code is appropriate for the error with code params.CodeOperationBlocked11:48
rogpeppe?11:48
rogpeppei'm pretty sure that ErrBadRequest is not correct11:48
rogpeppes/Err/Status/11:48
rogpeppeperhaps StatusForbidden, I guess11:48
jam403 Forbidden seems close (I understood you, but you can't do that)11:56
jam409 Conflict is potentially valid (you made a request which conflicts with the  fact it is currently blocked)11:57
jamrogpeppe: ^^11:57
rogpeppejam: i've gone with Forbidden11:58
rogpeppejam: (thanks)11:58
rogpeppe[11:47:59] <voidspace> fwereade: sure, understood. A refresh at an arbitrary point on another goroutine could present a very odd view of the world to another observer.12:05
rogpeppevoidspace: just picking up on that at random12:06
rogpeppevoidspace: you *can* get a refresh at an arbitrary point in a goroutine12:06
rogpeppevoidspace: if we had shorter refresh times, it would happen more often12:06
fwereaderogpeppe, expand? we were thinking of Refresh calls on state types12:08
rogpeppefwereade: ah, totally out of context then, ignore me :)12:08
rogpeppefwereade: i always thought that it was a bit of an anti-pattern that state types had any internal state at all12:09
fwereaderogpeppe, yeah, I think you're right there12:09
fwereaderogpeppe, hey ho, we endure :)12:09
jamcmars: still up for meeting in 10 or so?12:14
cmarsjam, yep, i'm in the hangout12:14
alexisbdimitern, ping12:16
dimiternalexisb, omw12:16
frankbanaxw: hi, could you please take a look at http://reviews.vapour.ws/r/2633/ ? it's proposed against a feature branch12:35
perrito666abentley: ping?13:43
abentleyperrito666: pong13:45
perrito666abentley: by any chance would you know how I can get a hold of the packaging script of juju-mongodb?13:45
abentleyperrito666: Sorry, I don't know where that's kept.  On our team, sinzui is the main packager, but I don't think he did juju-mongodb.  I think that was juju-core.13:47
natefinchkatco: sorry for the late notice, I'm going to have to jet at 15 past the hour - our 2 year old threw up this morning and so I'm going to have to run an errand that my wife was going to do, while she's home with the kids.  I'll only be gone an hour, but it's time sensitive.13:48
katconatefinch: no worries... it's just us for the standup, so shouldn't even take 15m13:49
natefinchkatco: oh yeah, forgot eric's gone now, too.13:49
perrito666abentley: thank you :) Ill keep hunting13:50
abentleySorry I can't help more.13:51
abentleyperrito666: Try jamespage: https://dogfood.paddev.net/ubuntu/+source/juju-mongodb/2.4.10-0ubuntu113:52
perrito666abentley: you did, :) one less palce to look for13:52
xwwtabentley: Notes look ok.  We are just looking for a time for those non-voting to be enabled14:18
abentleyxwwt: And commitment from core on the ones we can't enable without their help.14:19
xwwtabentley: yeah, commitment on timing.  we will continue to work through that on the release meeting too.14:22
jamespageabentley, perrito666: hello14:25
perrito666jamespage: hello :)14:25
rogpeppesecond part of my apiserver cleanup. reviews much appreciated. https://github.com/juju/juju/pull/330714:25
perrito666jamespage: do you happen to know how can I get a hold of the scripts required to create a custom package for juju-mongodb ?14:25
jamespageperrito666, bzr branch ubuntu:juju-mongodb14:26
rogpeppekatco: this carries on from yesterday's branch if you wanna take a look14:26
perrito666jamespage: that was easy, tx :)14:26
katcorogpeppe: probably won't have time today... meeting day14:26
rogpeppekatco: np, thanks for yesterday's review anyway14:27
katcorogpeppe: np14:27
rogpeppenatefinch: wanna take a look? 30 lines deleted :)14:27
katcorogpeppe: he had to run an errand... kiddos sick14:28
rogpeppekatco: ok, thanks14:28
mgzperrito666 darling, are you around?14:28
perrito666mgz: I am sweetie (I feel a bomb coming my way)14:29
mgz$ grep -F 1.24 cmd/juju/status_test.go14:30
mgz- new available version: "1.24.7" "1.24.7            \n"+14:30
mgzrev 3b8ee08c9dd6c27c1147f2aab157868987489d8c seems incomplete14:30
perrito666mm, I am pretty sure I replaced that after14:30
perrito666mgz: -n?14:33
perrito666shi***14:34
perrito666fixing14:34
mgzperrito666: 3026, 313114:34
mgzyou got *most* of them :P14:34
perrito666mgz: I suck14:36
perrito666mm, it is fixed everywhere excepting there14:39
perrito666mgz: running tests now14:40
mgzperrito666: we'll need to combine your branch with the version bump to get the landing allowed,14:44
mgzperrito666: see https://github.com/juju/juju/pull/329914:45
perrito666mgz: you can pull -r https://github.com/perrito666/juju/tree/hotfix_1.24_hardcoded_version_in_tests into the bump patch14:45
mgzperrito666: thanks, we'll do that14:45
perrito666mgz: sorry again14:47
mgzperrito666: worth it just to wind you up :)14:47
perrito666mgz: pleased to please :p14:49
katcoalexisb: our meeting conflicts with the juju-core meeting. want to move to after our 9am?14:50
dimiternfrobware, hey, I'm back again - should we start the call?15:00
frobwareyep15:00
dimiternfrobware, standup HO?15:00
frobwaredimitern, yes15:00
voidspacefwereade: ping15:18
voidspacedimitern: ping15:20
fwereadevoidspace, pong15:23
voidspacefwereade: I'm struggling to write the assert I need I'm afraid and would appreciate some help15:25
voidspacefwereade: I need to assert that the new address (type state.address) is in either the addresses field or machineaddresses field of the current machine doc15:25
voidspacefwereade: but the $in operator doesn't work like that, and as far as I can tell there are no good references on mgo asserts15:26
voidspacenor any similar examples that *I* can find15:26
voidspacefwereade: this is for state/machine.go15:27
voidspacefwereade: current state of code at http://reviews.vapour.ws/r/2593/diff/#15:27
voidspacefwereade: it would go inside the getPreferredAddressOps method15:28
fwereadevoidspace, something like {$or: {addresses: {$in: [ADDR]}, machineaddresses: {$in: [ADDR]}}} ?15:31
voidspacejust found the mongodb operator docs15:31
fwereadeah cool :)15:32
voidspacefwereade: will try that and see what happens, I had that as a straight $in and it said it needed an array15:32
voidspaceand that addr was not a valid value15:33
fwereadevoidspace, yeah, it's ugly but I think it works15:33
voidspacein some of the various permutations15:33
voidspace*I tried15:33
voidspaceI have a call, will try in a bit15:33
rogpeppedoes anyone know if the /environment/$uuid/charms GET endpoint is used at all by anything?15:34
rick_h_rogpeppe: is that used by the gui to get local charm info? /me isn't sure what endpoint is called but it looks like something we'd want15:35
rogpepperick_h_: i think that's an API call - i'm talking about the REST endpoint here15:36
rogpeppefwereade: ping15:42
fwereaderogpeppe, pog15:42
rogpeppefwereade:  your name seems to be associated with some of this code, so perhaps you can tell me...15:42
* fwereade gets nervous15:42
rogpeppefwereade: i'm looking at apiserver.charmsHandler15:42
rogpeppefwereade: it seems that sometimes it sends errors as JSON errors and sometimes just as text (with http.Error)15:43
* fwereade *thinks* he wants to point at frankban?15:43
rogpeppefwereade: can you think of a reason why that might be a good thing?15:43
fwereaderogpeppe, I certainly can't15:43
fwereaderogpeppe, I do remember drivebying some fix there a while back15:43
fwereaderogpeppe, but I don't think that was related?15:43
rogpeppefwereade: do you think it would considered API breakage to fix that?15:44
rogpeppefwereade: (FWIW i can find any client code in juju-core that does a GET from that endpoint)15:44
fwereaderogpeppe, probably :-/ but if you send the right thing *and* the wrong thing (with a comment explaining why) that might sound more sound plausible?15:44
rogpeppefwereade: (and none of those errors have any test coverage)15:45
fwereaderogpeppe, ffs :(15:45
rogpeppefwereade: the two things are mutually exclusive15:45
rogpeppefwereade: you can't send a JSON-encoded error *and* the error as text15:45
fwereaderogpeppe, oh balls ofc sorry15:45
fwereaderogpeppe, end of day ;p15:45
rogpeppefwereade: np :)15:45
rogpeppefwereade: for my purposes, I'd very much like it all to standardise on one error format that can return an error code too15:46
fwereaderogpeppe, I think it is api breakage then... can we have a /v2 handler, perhaps?15:46
rogpeppefwereade: my take on it is that there's currently no way to write a correct client15:47
rogpeppefwereade: so we're actually fixing things not breaking them15:47
=== tvansteenburgh1 is now known as tvansteenburgh
fwereaderogpeppe, juju error code, not an http error code?15:48
rogpeppefwereade: yes15:48
fwereaderogpeppe, I would like that too, but... I don't see why it's impossible to write a client? bloody hindering awkward, yes15:48
rogpeppefwereade: BTW if you have any time (unlikely, I know) it would be great to have a review of my ongoing apiserver cleanup http://reviews.vapour.ws/r/2689/15:49
fwereaderogpeppe, but I can't see how to change it without potentially breaking the clients that have gone to the effort15:49
rogpeppefwereade: so, the only decent way that I can see to write a non-breaking client is to check the content type and unmarshal as JSON if json and text otherwise15:50
rogpeppefwereade: so if we change the bad endpoints to return JSON, that client would still work15:50
rogpeppefwereade: also, all but one of the textual errors will be impossible to get unless there's juju internal breakage (corrupt charm cache files)15:51
rogpeppefwereade: the one error that may be possible to get would be "directory listing not allowed", but tbh the worst that can happen is that some client gets an error that doesn't look like the error they expect in that case.15:53
fwereaderogpeppe, honestly it's too hairy for me, I have convinced myself that breakage is impossible, and been wrong, too many times :(15:54
fwereaderogpeppe, would much rather see a new version15:54
rogpeppefwereade: the fact that this is only on a very unusual error path and that none of our actual juju code uses the endpoint makes me think that it should be ok15:55
rogpeppefwereade: do you know of any external programs that use this endpoint at all, let alone relying on juju internal service error formats?15:56
fwereaderogpeppe, no, and that's the problem -- if I knew who used it I'd be able to find out how15:57
voidspacefwereade: so this as a basic syntax (not yet with $or) at least is correct syntax16:00
voidspacefwereade: bson.D{{"addresses", bson.D{{"$in", []address{addr}}}}}16:00
voidspacefwereade: the value we're checking needs to be in an array, that's what was fooling me16:00
voidspacehowever...16:00
voidspacethat fails with: "cannot set addresses of machine 0: state changing too quickly; try again soon"16:00
rogpeppefwereade: i think it's reasonable to change the internal errors as they are not possible to trigger, and thus impossible to rely on anyway.16:00
voidspace(deterministically it seems)16:00
fwereadevoidspace, heh, ok, so that assert triggers? dammit16:01
rogpeppefwereade: i honestly think there's room for a small amount of pragmatism in the case of the "directory listing not allowed" error16:02
fwereadevoidspace, bugger, an address is a struct, isn't it, not sure how that'll play16:02
voidspacefwereade: yup16:02
rogpeppefwereade: especially given the marginal cost of a version change16:02
fwereadevoidspace, does anything stick out about how an address serializes?16:02
voidspacefwereade: it has a Value field which is really the  *only* important bit16:03
fwereaderogpeppe, that doesn't feel like it should be too terribly costly?16:03
rogpeppefwereade: it clutters everything to leave it as is16:04
fwereadevoidspace, heh, then I'm afraid I must direct you back to the mongo operator reference, I'm sure there's some way to do that but I completely forget16:04
rogpeppefwereade: i think the API we really need to worry about is the API that juju itself uses.16:05
voidspacefwereade: it's not documented on the $in page, but I will keep digging16:05
voidspacefwereade: I know what I'm searching for now, which makes life easier16:06
fwereaderogpeppe, I don't think that's the case at all, is it?16:06
rogpeppefwereade: that's the primary concern, yes16:06
fwereaderogpeppe, doing horrible things to ourself is much more justifiable thann doing horrible things to our external clients16:06
fwereaderogpeppe, at least we understand the scope of the pain when we do it to oourselves16:07
rogpeppefwereade: making an API endpoint consistent in the error format it hands out is doing a horrible thing to our external clients?16:07
fwereaderogpeppe, *changing behaviour* is being horrible16:08
fwereaderogpeppe, the aspects of X behaviour that people will find to depend upon are a continual source of amazement to me16:08
rogpeppefwereade: if we change this and there's a client that relies on this particular format of this particular error message, i will buy you beers for an entire sprint16:09
fwereaderogpeppe, we both have a poor track record re predicting "safe" api changes16:13
fwereaderogpeppe, please just make a new version of the endpoint that does the right thing?16:13
rogpeppefwereade: no, i guess i'll just keep the old behaviour16:13
fwereaderogpeppe, what is problematic about versioning it?16:14
rogpeppefwereade: it means duplicating all the code16:14
rogpeppefwereade: it's a cure worse than the ill16:14
fwereaderogpeppe, so we basically *can't* version http endpoints? that feels like an infinitely worse ill...16:15
rogpeppefwereade: i'm saying that providing a new version of an endpoint for one error message format is not worth it16:16
rogpeppefwereade: do you agree that changing the internal errors (that will never happen in practice) is OK ?16:17
fwereaderogpeppe, (that seems mainly to point to a failure to separate the behaviour from the transport? one would think that a v2 that shared all the code except the outermost error translation layer would be trivial...)16:18
fwereaderogpeppe, changing error *messages* does not bother me; changing error *codes* would bother me; changing error *formats* also bothers me16:19
rogpeppefwereade: if you don't mind changing error messages, this is essentially just changing the error message16:19
rogpeppefwereade: because there is no error code in this case16:20
fwereaderogpeppe, I see it as the format?16:20
rogpeppefwereade: if a client is reading it as a textual error message, then JSON is just the text16:20
rogpeppefwereade: if the client knows enough to inspect the content type, then it won't run into the problem16:21
rogpeppefwereade: my aim is to remain backwardly compatible and not to require clients to fetch /environments/$uuid/charms-v2 or whatever because of a marginal-case error message.16:22
voidspacefwereade: so this is a valid assert, but suffers from the same problem... (so not helpful, but the dot syntax for fields is interesting to note)16:24
voidspacebson.D{{"$or", []bson.D{16:24
voidspace                        bson.D{{"addresses.value", bson.D{{"$in", []string{addr.Value}}}}},16:24
voidspace                        bson.D{{"machineaddresses.value", bson.D{{"$in", []string{addr.Value}}}}}}}},16:24
fwereaderogpeppe, I maintain that this is a change in the *format* of the result, and in such cases we should always just add a new api version16:25
rogpeppefwereade: adding an api version is not free16:25
fwereadevoidspace, try a Find with your assert data and see what you get? it ought to match the doc you're looking for16:26
voidspacekk16:27
fwereaderogpeppe, externalising the costs by making secret api changes is not really ok, though16:27
rogpeppefwereade: i think there is room for pragmatism here16:28
fwereaderogpeppe, and if there is a certainty out there, it is that you will need to change your apis16:28
fwereaderogpeppe, my perception is that the last 3 times you've convinced me of that we've seen breakage ;p16:28
rogpeppefwereade: for an API that is just getting a file, I'm not sure.16:28
rogpeppefwereade: particularly when the API is inconsistent already, sometimes returning JSON, sometimes not, with no way for the client to know which might be returned.16:30
fwereaderogpeppe, (so it's not even that I don't trust you -- I don't trust myself, or *anybody else*, to modify apis in place without causing breakage)16:30
fwereaderogpeppe, eight or nine times bitten, $spanish-inquisition times shy16:31
rogpeppefwereade: oh, one other thing: you think that changing error codes is breakage. my code adds error code returns where previously there were none (Code field always empty). do you consider that breakage too?16:31
rogpeppefwereade: that is, now the error code will actually reflect the error16:32
fwereaderogpeppe, yes, it's clearly a change in behaviour, new version please16:32
fwereaderogpeppe, if you ask for v2 you can be sure you'll get an error code16:32
fwereaderogpeppe, v1 -- maybe, maybe not. do you feel lucky? ;p16:33
rogpeppefwereade: ok, another question then: how should we determine API version?16:33
rogpeppefwereade: at the moment i think my tendency is towards declaring it a request header16:33
fwereaderogpeppe, I have a mild preference for doing it in the url in general, but in all these cases we have to construct auth headers anyway, right?16:34
rogpeppefwereade: i'm not keen on the approach we've used elsewhere with the version as part of the URL path.16:34
rogpeppefwereade: yes16:34
fwereaderogpeppe, stable urls and varying headers seem sane then16:38
rogpeppefwereade: do you think i should just copy the whole apiserver directory?16:38
fwereaderogpeppe, ...no?16:38
rogpeppefwereade: so version-based if statements scattering the code?16:39
fwereaderogpeppe, should it not just be a few maps of versions to handlers?16:40
fwereaderogpeppe, first check the version, then dispatch to the appropriate handler16:41
rogpeppefwereade: if i'm copying the handler code, i might as well copy everything apart from the core16:41
rogpeppefwereade: honestly, i'm thinking it's not worth fixing.16:41
fwereaderogpeppe, so the error format is so inextricably bound up with the rest of the code that the rest of the code can't be shared?16:41
rogpeppefwereade: at the moment, the error generation is not tied to the request16:42
voidspacefwereade: so after the transaction, that same query finds the machine16:46
voidspacefwereade: the assert does see the result of earlier txn.Op in the same transaction doesn't it...16:47
fwereadevoidspace, ah-ha! this is an address that wasn't there before?16:47
fwereadevoidspace, certainly not16:47
voidspacefwereade: so extend the $or16:47
voidspacefwereade: no, can't that's kind of the point16:47
voidspacefwereade: needs to be done as a separate transaction then16:47
voidspaceset the new field, then set the addresses checking they still exist16:48
fwereadevoidspace, sorry, my brain was still tangled with the write-on-get code16:48
voidspacenp16:49
fwereadevoidspace, in this case I think you probably just want to check that addresses and machineaddresses are exactly what they were originally?16:49
fwereadevoidspace, so sorry I didn't make connection before16:49
voidspacefwereade: ok16:49
voidspacefwereade: it's better not to do it as a separate transaction as the first one could succeed then the second fail, and then what would we do16:50
voidspacefwereade: and if they've changed, what do we do? we don't want to repeat the transaction16:50
fwereadevoidspace, yeah, exactly, avoid multiple txns like the plague :)16:50
voidspacefwereade: we have an interesting race because of fallback scopes16:51
voidspacefwereade: if SetProviderAddresses and SetMachineAddreses are set concurrently, which is highly likely16:51
voidspacefwereade: the first time neither PreferredAddress will be (Public nor Private)16:52
voidspaceso the first one will set both (one correctly as it has the right scope and one as a fallback because the other isn't available yet)16:52
voidspaceand the second one will also attempt to set both16:53
voidspacewhereas we probably want ProviderAddresses to set one and MachineAddresses to set the other16:53
rogpeppefwereade: BTW are we allowed to change behaviour at all (e.g. add a field) without making a new version?16:54
voidspaceok, so I need to rebuild the slice of addresses which I'm not currently doing in buildTxn16:54
voidspacethat will work16:54
voidspacefwereade: sorry, using you as a rubber ducky16:55
voidspacefwereade: I think I have it16:55
voidspacefwereade: will need to craft a test to prove it...16:55
voidspacebut it will have to wait I'm afraid, EOD and PyCon UK tomorrow16:55
voidspaceI've told alexisb that this bug will be ready for beta 216:55
fwereaderogpeppe, AFAICS, you can only reasonably do that when you don't actually need to add the field at all -- otherwise you're screwing over your clients, who can't tell whether a given server will pay any attention to that field or not16:58
rogpeppefwereade: i'm talking about adding fields to a response16:58
fwereaderogpeppe, it's less harmful, for sure, but isn't it better for the client that might use the extra fields to ask for a response it *knows* will have those fields?17:00
rogpeppefwereade: not necessarily17:00
rogpeppefwereade: if the field is present, it can act on it17:00
fwereaderogpeppe, right, but what *actually happens* is that they use a new server to begin with, and come to depend on the field, and then their code breaks seemingly at random17:02
rogpeppefwereade: ha, one problem with doing the version-in-header approach is that a new client with an old server will still get the old response. but that's potentially an issue with doing it in the path too - a "not found" response might be a legitimate response to the new path, for example.17:03
fwereaderogpeppe, ha, good point17:03
fwereaderogpeppe, (see? I'm shit at predicting these subtle breaks)17:03
rogpeppefwereade: i'm thinking of adding an error code field to some responses (where there is none currently)17:03
fwereaderogpeppe, yeah, that sounds like a great thing but a new api version to me17:05
fwereaderogpeppe, and I kinda have to stop now :(17:05
rogpeppefwereade: one way to get around that issue is to include the API version with the response.17:12
wwitzel3looking at juju/charms I see Metadata has a Hooks() method that returns a map of all the hooks a charm might want to implement, I don't see where we call that in juju core18:55
wwitzel3so where in core do we determine what hooks should be run?18:55
wwitzel3or could be run I should say18:55
natefinchwwitzel3: not sure... haven't looked at that part of the code19:00
bogdanteleagawwitzel3: https://github.com/juju/juju/blob/master/worker/uniter/hook/hook.go#L24, it's taken from juju/charms19:01
bogdanteleagathough you can kinda tell from validate19:01
mupBug #1496972 opened: juju bootstrap fails to successfully configure the bridge juju-br0 when deploying with wily 4.2 kernel <hs-arm64> <juju-core:Confirmed> <https://launchpad.net/bugs/1496972>19:06
wwitzel3bogdanteleaga: ok, but where do we actually determine which hooks for a given charm should be run?19:06
wwitzel3bogdanteleaga: I mean, where is the information that Validate is check, set19:07
wwitzel3s/check/checking19:07
mupBug #1496972 changed: juju bootstrap fails to successfully configure the bridge juju-br0 when deploying with wily 4.2 kernel <hs-arm64> <juju-core:Confirmed> <https://launchpad.net/bugs/1496972>19:09
wwitzel3bogdanteleaga: since a hook is really any name and interface and those could be free form, I'm trying to understand the process of how we know that the %s-relation-changed hook should be run for example19:09
mupBug #1496972 opened: juju bootstrap fails to successfully configure the bridge juju-br0 when deploying with wily 4.2 kernel <hs-arm64> <juju-core:Confirmed> <https://launchpad.net/bugs/1496972>19:12
bogdanteleagawwitzel3: you mean how we choose which one is next?19:17
bogdanteleagawwitzel3: https://github.com/juju/juju/blob/master/worker/uniter/resolver/loop.go#L70, here we choose the next operation that should run and then we run it until some error19:19
bogdanteleaga(this just changed in master btw, so it's different in other versions)19:21
wwitzel3bogdanteleaga: not quite, so if I add a new provides interface to my charm and upgrade, how does juju know now there is a new hook to be run?19:39
wwitzel3bogdanteleaga: I looking for the code that actually generates the list of hooks19:39
mupBug #1496975 opened: upgrade-charm --switch does not warn about risks <juju-core:New> <https://launchpad.net/bugs/1496975>19:42
wwitzel3katco: ping19:43
katcowwitzel3: hey, in meeting19:43
wwitzel3rgr19:44
wwitzel3NewLiveHookSource19:57
bogdanteleagawwitzel3: I don't think there's a hook list and they're just taken from there, NextOp does the magic, it chooses a hook such that the localstate converges towards the remotestate20:02
bogdanteleagafor example the install hook: https://github.com/juju/juju/blob/master/worker/uniter/resolver.go#L22020:02
bogdanteleagaand config changed close below20:02
wwitzel3right, but there is something that determines the remotestate which is essentially the list of hooks to be run20:03
bogdanteleagawwitzel3, found anything? I can't see anything obvious in the resolvers and those are supposed to set whatever is going to run20:37
mupBug #1496997 opened: TestErrorReadingEnvironmentsFile calls chmod on win <blocker> <ci> <regression> <unit-tests> <windows> <juju-core:Triaged> <https://launchpad.net/bugs/1496997>20:42
=== urulama is now known as urulama__
sinzuiwallyworld: reports.vapour.ws doesn't now about this job yet. http://juju-ci.vapour.ws:8080/view/Juju%20Revisions/job/run-unit-tests-mongodb3/5/console21:46
perrito666thumper: are you around?21:47
thumperperrito666: yes, but on calls21:48
thumperwhazzup?21:48
perrito666thumper: I need someone a bit more local provider savvy than I21:50
thumperfor what?21:50
wallyworldsinzui: i guess it will soon?21:50
mupBug #1328129 changed: panic when apiaddresses not present <cts-cloud-review> <panic> <sts> <juju-core:Triaged> <https://launchpad.net/bugs/1328129>21:51
perrito666thumper: I am trying to introduce some changes to mongo connection and I have the sensation that ensureMongoAdmin is never being called but I am not getting logs either so I thought of asking while trying a few things21:52
thumpersure it isn't in jujud/ bootstrap?21:52
thumpergrep ?21:52
perrito666thumper: It should be, I just have the simptomps as if it wasnt ;) then again no logs make my life a bit harder :(21:54
sinzuiwallyworld: thumper: katco: deej in the #juju channel has an upgraded env that lost the apiaddress maybe bug 1366887. Who can help find and fix the mongo document21:55
sinzuiwaigani: menn0 : do either of you have experience fixing a mongodb that lost its apiaddress during an upgrade? deej in #juju needs help fixing a broken env where all the units lost and continue to loose the apiaddress22:07
menn0sinzui: i'll take a look22:09
menn0sinzui: give me 2 mins22:09
perrito666wallyworld: your lateness stands?22:20
wallyworldperrito666: got back in time22:20
perrito666wallyworld: cool, call me and tell me the lottery numbers then marty22:21
perrito666:p22:21
wallyworldi'll ask Biff22:21
perrito666mm, all internet seems to be in poor shape today, I wonder if the eartquake broke something22:27
* thumper heads to the gym to roll around23:44
perrito666good boy23:52

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