/srv/irclogs.ubuntu.com/2014/02/13/#juju-dev.txt

thumper-lunchwallyworld: can't use UserHomeDir because I don't have an 'ubuntu' user00:50
=== thumper-lunch is now known as thumper
* thumper forgot to reset nick00:50
* thumper looks at how to mock differently00:51
wallyworldyou create a fake home dir, add the dir for unbuntu00:51
wallyworldoh ok00:52
wallyworldUserHomeDir won't work00:52
thumperright00:52
thumpernm, I'll think of something00:52
wallyworldbut NormaliseFile or something like that will00:53
wallyworldi can't recall exactly00:53
thumpernah00:53
thumpernormalise calls UserHomeDir00:53
thumperwallyworld: may mock that out with an interface :-)00:54
thumperthe package call00:54
wallyworldwhatever works :-)00:54
wallyworldthumper: why not replace /home/ubuntu with NormaliseFile("~/ubuntu")00:55
wallyworldor something like that00:55
thumperbecause that still looks for the ubuntu user00:55
wallyworldno, the ~ will be replaced00:56
thumperoh, you mean ~/../ubuntu00:56
wallyworldby the fake home00:56
thumperbecause that's awful00:56
wallyworldwhy?00:56
thumperit is also wrong00:56
thumperwe need it to be /home/ubuntu00:56
thumper~/ubuntu -> /root/ubuntu00:56
thumperby the agent00:56
wallyworldoh agent runs as different user00:56
thumperyeah00:57
thumperif it was the ubuntu user00:57
thumperit would still be /home/ubuntu/ubuntu00:57
thumperwhich is also wrong00:57
thumperI think you mean ~00:57
wallyworldsorry, i meant ~unbuntu00:57
thumperbut still wrong00:57
thumper~ubuntu looks for the ubuntu user00:57
thumperI'm going to mock out that looking bit00:57
wallyworldso why hard code /home/ubuntu - have a helper function and override in tests00:57
thumperwell, we have to mock out one of two things00:58
thumpereither the dir to use00:58
wallyworldextend the ~ idea which we already handle00:58
thumperof the thing that maps the dir00:58
wallyworldthe dir to use i reckon is better00:58
thumperI was going to do the latter00:58
thumperI have no strong preference00:59
wallyworldcause we already have the concept of FakeHome, seems like a more natural fit to extend that00:59
wallyworldto allow for a fake /home00:59
thumperthis will have nothing to do with the home00:59
wallyworldi mean /home00:59
thumperit'll just be a dir01:00
wallyworldyes01:00
thumpernah, that is getting too complicated01:00
* thumper sticks with easy01:00
wallyworldi just dislike anything that can touch your real /home01:00
wallyworldi think that's bad test imppementation01:00
=== arosales_ is now known as arosales
wallyworldwhat happens if a test is buggy and it deletes stuff01:01
thumperwe can continue this in the hangout :)01:01
wallyworldthink of stubbing out /home as like stubbing out the charm store url01:01
wallyworldthumper: pull your finger out cause i need the new agent config stuff on context01:51
* wallyworld taps fingers impatiently01:51
thumperyeah yeah01:52
=== _mup__ is now known as _mup_
_thumper_wallyworld__: test created for the upgrade03:37
wallyworld__\o/03:38
_thumper_proposal being updated now03:38
* _thumper_ has to go make dinner03:38
wallyworld__ok ta03:39
=== _thumper_ is now known as thumper
axwgtg out for a while, seeing my brother off at the airport03:51
bradmanyone got any suggestions on how to debug why a juju 1.17.2 environment will bootstrap, but not deploy an instance?04:02
bradmas in, I'm trying to juju deploy a local charm and its just sitting there04:03
bradmhttps://pastebin.canonical.com/104754/ <- been sitting there for a good minute or more04:03
thumperaxw: ack04:04
thumperbradm: it could be downloading the lxc template04:05
bradmthumper: this is on a juju deployed openstack using maas04:05
thumperoh..04:06
thumpermaybe not then...04:06
bradmthumper: as in, on openstack deployed using juju on top of maas04:06
thumpersorry, not sure04:06
=== thumper is now known as thumper-afk
bradmI just can't see anything going on04:06
bradmthumper-afk: no worries04:07
bradmnobody else has any suggestions for debugging why juju deploy is hanging?04:44
bradmwallyworld__: ^^ ? :)04:49
wallyworld__um04:50
wallyworld__bradm: i've not deployed any local charms before, all i can think of is perhaps an issue uploading the charm to cloud storage04:50
bradmbest I can tell it doesn't matter where the charm comes from, it just hangs04:51
wallyworld__it still has to copy the charm to cloud storage though04:52
bradmhmm, I guess04:53
wallyworld__maybe you can ssh into the machine and see if the charm has been unpacked04:53
bradmit hasn't spawned a 2nd machine yet, I only have the bootstrap node up04:53
wallyworld__what does juju debug-log say?04:54
bradmoddly, not a real lot05:01
bradmlet me try all this again05:01
bradmyeah, this is weird, its like too much network traffic and it drops05:05
bradmdoesn't seem like a juju thing if thats the case05:06
=== mwhudson is now known as zz_mwhudson
axwwallyworld__: terse review, squashed my finger in the car door :\07:50
=== zz_mwhudson is now known as mwhudson
rogpeppe2wallyworld: you just got a review of https://codereview.appspot.com/61510049/09:27
=== bigjools_ is now known as bigjools
dimiternwallyworld, meeting?10:05
dimiternmgz, ^^10:05
mgzdimitern: ta10:06
=== mwhudson is now known as zz_mwhudson
dimiternmgz, if you can take some time to look, i've updated the networking document to include a preliminary list of needed changes to goose13:25
TheMuedimitern: one short question. how do configuration values come into the environ config?13:46
dimiternTheMue, what do you mean?13:47
dimiternTheMue, from env.yaml ?13:47
dimiternTheMue, or from CLI juju set/etc. ?13:47
TheMuedimitern: when a system is bootstraped the environment has a config (EnvironConfig() *config.Config)13:48
TheMuedimitern: somehow the initial values have to be written into it13:48
dimiternTheMue, yes, so the env.yaml settings + some other things get validated and created at prepare time, then stored in the .jenv file13:49
TheMuedimitern: and when does this jenv file gets into the database?13:49
dimiternTheMue, and the actual *config.Config gets stored in mongo in the settings collection13:50
mgzdimitern: sure, I'll have a look13:50
dimiternmgz, ta13:50
TheMuedimitern: hmm, still have to find the flow where this all happens. reason is that I need to write another value into this config13:51
dimiternTheMue, take a look what happens in environs.Prepare13:51
dimiternTheMue, ah, for that you just need to add it in environs/config's schema13:52
TheMuedimitern: yip, detected that already, only the writing is missing. but the prepare hint is good. thx.13:54
dimiternTheMue, and add some get methods, etc. look a recent CL of mine that does that: https://codereview.appspot.com/58170045/13:54
TheMuedimitern: ah, nice, having somebody doing the same is very helpful13:55
dimiternTheMue, np :)13:57
sinzuiabentley, jcsackett thedac, I am double booked through the morning14:33
* sinzui has announcements for the standup14:33
sinzuitoo14:33
abentleysinzui: I see.  Should we postpone the standup or go on without you?14:33
sinzuiabentley, might as well14:34
abentleysinzui: what are those announcements?14:45
abentleysinzui: I guess just email them to us.14:45
sinzuiabentley, yeah, that will be best14:46
rogpeppe2fwereade, natefinch, wallyworld, dimitern, thumper: updated errgo names as discussed: http://paste.ubuntu.com/6925794/14:46
dimiternrogpeppe2, looking14:47
rogpeppe2natefinch: how does that feel to you?14:47
=== rogpeppe2 is now known as rogpeppe
rogpeppedimitern: we're going with Cause instead of Diagnosis, and Underlying instead of Cause.14:47
rogpeppedimitern: and Mask instead of Wrap14:48
rogpeppedimitern: and Notef instead of Wrapf14:48
dimiternrogpeppe, i'm +1 on all but last two - i liked wrap, what's wrong with it?14:48
rogpeppedimitern: i liked it too, but this is the way we decided to paint the shed :-)14:49
dimiternrogpeppe, and how's mask/note better?14:50
rogpeppedimitern: the thought is that it's a good idea to make it clear that we're masking the underlying cause14:50
natefinchrogpeppe: can you drop location from the public API?  It's not really necessary14:50
rogpeppenatefinch: you mean, make it a private field in Err?14:51
rogpeppedimitern: and everyone seemed to like Note, so we went with that14:51
rogpeppedimitern: (better than Annotate anyway, i think)14:52
dimiternrogpeppe, hmm..14:52
natefinchrogpeppe: Yeah, so the way I did it was instead of Locationer I had Detailed (Detailer if you must)  and that way you don't dictate a specific set of info from a sub-error, you just call Details() on the sub error and it formats how it wishes14:52
dimiternwell, meh, it's just an api and it just needs getting used to14:53
rogpeppedimitern: yeah, that's my thought14:53
rogpeppedimitern: as long as the semantics are right, i'll get used to most names14:53
natefinchrogpeppe: I'm just trying to narrow the public API so there's less to grok.  There's a ton of stuff to ingest in your public API14:53
dimiternrogpeppe, yep14:54
rogpeppenatefinch: yeah, the public interface that we'd like people to see most of the time looks like this: http://paste.ubuntu.com/6925836/14:55
rogpeppenatefinch: it is useful to have each error responsible only for returning data and not for actually formatting things14:58
rogpeppenatefinch: it means that we can potentially provide different views on the same data14:59
rogpeppenatefinch: for example, a web interface might implement an alternative version of Details that formats the errors as html with source code links.14:59
natefinchrogpeppe: that's true15:00
rogpeppenatefinch: it is arguable, i suppose, whether Locationer, Wrapper and Causer should all be separate interfaces, but i think it could make sense to provide some and not others.15:01
natefinchrogpeppe: yeah I think that's fine.  small interfaces are nice.15:01
rogpeppenatefinch: Details should document how the interfaces are used though.15:02
natefinchrogpeppe: it's honestly the func(error)bool stuff that really complicates the API.... which is unfortunate given that they're likely not to be used except in limited cases15:02
natefinchrogpeppe: yep15:02
rogpeppenatefinch: they're used a fair amount actually (about 10% of the time)15:03
natefinchrogpeppe: what's the use for Any?  Isn't that the same as note?15:03
rogpeppenatefinch: no, Note masks the cause15:04
rogpeppenatefinch: Any allows any cause through15:04
natefinchrogpeppe: cause is now what you used to call diagnosis, right?15:04
rogpeppenatefinch: yes15:05
rogpeppenatefinch: Notef is basically equivalent to fmt.Errorf except that it adds source line info15:05
natefinchrogpeppe: how do you note and let the error type pass through?  Or is that only doable through mask(err, Any)?15:06
rogpeppenatefinch: you can use NoteMask15:07
rogpeppenatefinch: (which may well be better named MaskNote; i can't quite decide)15:07
rogpeppenatefinch: NoteMask is actually the underlying wrap primitive, used by all the other wrapping functions except WithCausef15:08
natefinchrogpeppe: I wish there was a function that didn't require the function argument that just always let the underlying error become the cause15:09
rogpeppenatefinch: var mask = errors.MaskFunc(errors.Any)15:09
rogpeppenatefinch: but, as i keep on asserting, that case is actually pretty rare15:10
natefinchrogpeppe: yeah, should be15:10
rogpeppenatefinch: because returned errors are part of *your* contract, and you should be responsible for knowing what they are15:11
natefinchrogpeppe: right15:11
natefinchrogpeppe: So mask(err) is effectively the same as just notef(err, "")15:12
rogpeppenatefinch: yes15:13
rogpeppenatefinch: those two are identical15:13
abentleyrogpeppe: The current unit test against amd-64-precise got some panics: http://162.213.35.54:8080/job/run-unit-tests-amd64-precise/66/console15:21
rogpeppeabentley: looking15:22
rogpeppeabentley: hmm, i haven't seen this before15:23
rogpeppe... Panic: unauthorized db:presence ns:presence.presence.beings lock type:0 client:127.0.0.1 (PC=0x414311)15:23
abentleyrogpeppe: Just telling you because you said you were interested in panics.15:23
abentleyrogpeppe: previous run did not panic this way (but also failed)15:23
rogpeppeabentley: yes, thanks - that's very interesting to see15:24
rogpeppelooks like the presence watcher panicked at some point, probably because of the permission changes going on the the db underneath15:26
=== lazyPower_ is now known as lazyPower
rogpeppenatefinch: one potential way of simplifying things a little is to accept only a single function argument rather than a slice.15:28
rogpeppenatefinch: but then you'd always have to pass it, so the most common case becomes harder.15:28
rogpeppenatefinch: (the most common case being "return mask(err)" of course)15:28
natefinchrogpeppe: yeah.,.. I don't think that's a big deal, I think it's the fact that Note sounds like it doesn't mask the error, because it's obviously named differently than Mask...15:29
rogpeppenatefinch: yeah, i quite liked Wrap and Wrapf. but i can accept that and move on, i think.15:30
natefinchrogpeppe: Mask and Maskf?15:30
rogpeppenatefinch: people said they particularly liked "Note". so Note we have.15:31
rogpeppenatefinch: (as agreed)15:31
sinzuifwereade, I think we can denominate https://bugs.launchpad.net/juju-core/+bug/1255242 . This change in behaviour is a problem, I am not convinced juju is a fault15:31
_mup_Bug #1255242: HP cloud requires 4G to do what AWS does in 2G mem <ci> <hp-cloud> <intermittent-failure> <regression> <upgrade-juju> <juju-core:Triaged> <https://launchpad.net/bugs/1255242>15:31
=== JoshStrobl is now known as JoshStrobl[afk]
natefinchrogpeppe:  I guess if you start from the assumption that everything gets masked, except for things that pass a mask function, or when using WithCausef, that makes it easier to understand,15:34
rogpeppenatefinch: yeah15:34
fwereadesinzui, +1, although it would be nice if we can figure out what's at fault... something the image does differently?15:36
natefinchrogpeppe: ok, enough bikeshedding for me.  I'm sure we'll get used to it, and if not, we can always find and replace the names if we think of something better.15:36
sinzuifwereade, The image is my own suspicion. One day Hp will use our images15:37
rogpeppenatefinch: thanks15:37
rogpeppeha, 9889 lines of diffs in 5 seconds. gofmt -r FTW! http://paste.ubuntu.com/6926047/15:42
natefinchrogpeppe: nice15:43
natefinchrogpeppe: gofmt is pretty awesome15:43
rogpeppenatefinch: it would be nice to be able to do statements and declarations as well as expressions, but yeah, it's great15:43
natefinchrogpeppe: yeah, I wish it could do more, too.  But for what it can do it's great15:44
sinzuifwereade, mgz: are these bugs backportable? Can I tartget them to 1.16.7? https://bugs.launchpad.net/juju-core/+bug/1241674 and https://bugs.launchpad.net/juju/+bug/118812615:47
_mup_Bug #1241674: juju-core broken with OpenStack Havana for tenants with multiple networks <cts-cloud-review> <openstack-provider> <juju-core:Fix Released by gz> <https://launchpad.net/bugs/1241674>15:47
_mup_Bug #1188126: Juju unable to interact consistently with an openstack deployment where tenant has multiple networks configured <canonistack> <cts-cloud-review> <openstack-provider> <serverstack> <pyjuju:Triaged> <juju-core:Triaged by gz> <https://launchpad.net/bugs/1188126>15:47
fwereadesinzui, mgz is fuguring out if we should be hotfixing them for cts instead15:48
fwereadesinzui, they involve a config change15:48
fwereadesinzui, but we could handwave them to be "this config setting doesn't work properly in old 1.16s" I suppose15:48
fwereadesinzui, so it's just a bugfix ;p15:49
=== makyo_ is now known as Makyo
mgzsinzui: it's ugly, but possible15:51
sinzuimgz, I am happy to not release 1.16.715:52
mgzI would much prefer we get an earlier 1.1815:52
rogpeppenatefinch: any chance you're going to merge that voyeur branch some time?17:08
natefinchrogpeppe: oh crap, sorry, yeah17:19
natefinchrogpeppe: I added the tests you suggested, not sure if there's anything else that needed to be done: https://codereview.appspot.com/5770004417:30
rogpeppenatefinch: i think it's good as is. one more test though: we never test what happens when NewValue is called with a non-nil arg17:31
rogpeppenatefinch: with that in, LGTM17:31
natefinchrogpeppe: cool17:32
natefinchrogpeppe: will do that right now17:32
rogpeppenatefinch: when you've submitted it, i'll be adding a patch that makes the zero Value ok to use, which i found useful elsewhere.17:32
natefinchrogpeppe: nice17:33
natefinchrogpeppe: actually there is a test for a non-nil arg, TestValueInitial, it's near the top of the file17:37
rogpeppenatefinch: oh yes, i missed it17:37
rogpeppenatefinch: LGTM then17:37
natefinchrogpeppe: oh ok, I missed your new lgtm, thanks17:38
natefinchrogpeppe: it's merging (in theory)17:39
rogpeppenatefinch: cool17:39
=== JoshStrobl[afk] is now known as JoshStrobl
=== FunnyLookinHat_ is now known as FunnyLookinHat
TheMueawsome, my new way of debug-log works even with the local provider via api w/o passing infos during the call18:18
natefinchrogpeppe, mgz, fwereade: anyone know what the minimum version of mongo is that we support?18:19
TheMuerogpeppe: have to do a bit cleanup, but I think you'll like it18:19
rogpeppeTheMue: cool18:19
rogpeppenatefinch: no i don't, sorry18:19
rogpeppeTheMue: how did you end up doing it?18:19
TheMuerogpeppe: I extended the environ config. default log location in there is the standard one, but the local provider sets the local one18:20
TheMuerogpeppe: then I can do logLocation = state.EnvironConfig().LogLocation() (a bit more due to returned error of ErrorConfig)18:21
rogpeppeTheMue: that seems like a reasonable solution, thanks18:22
TheMuerogpeppe: the local provider already sets the location as /var/log/juju-<user>-<envname>/all-machines.log. but it forgets the value after creating the dirs18:22
rogpeppeTheMue: you'll need to make sure that it's not a value that the user can set with set-environment18:23
TheMuerogpeppe: yeah, it definitely feels better. also the UI needs only to pass lines and filter during the call. how shall the UI installed in a container know about the local user?18:23
rogpeppeTheMue: yeah, it was definitely wrong to pass the log location as an arg to the API call18:24
TheMuerogpeppe: full agree now18:24
rogpeppeTheMue: putting the location in the env config feels a *little* bit like a hack, but i can't currently think of a better idea18:25
TheMuerogpeppe: the ensuring of not overwriting it is done where?18:25
rogpeppeTheMue: in EnvironProvider.ValidateConfig i think18:25
rogpeppeTheMue: just Valid actually18:26
TheMuerogpeppe: not in config.go immutableAttributes?18:26
rogpeppeTheMue: ah, perhaps there. let me check.18:26
rogpeppeTheMue: yes, that'll be the place18:27
TheMuerogpeppe: fine, then I've got it right18:28
rogpeppemgz: ping18:43
rogpeppemgz: scratch that, i don't expect you to be around at this time of the evening :-)18:43
rogpeppea bzr question for anyone: i've got a load of commits with a merge from trunk in the middle them. what's the best way to undo the merge and pretend i never did it?18:44
rogpeppes/them/of them/18:45
natefinchrogpeppe: make a new branch and cherry pick everything but that branch?  I don't know if there's a better way.  I'm not a bzr expert18:53
natefinchs/branch/merge/18:53
rogpeppenatefinch: yeah, i've done that, but it's not ideal18:53
rogpeppenatefinch: i always feel that whenever i use patch(1) i've failed18:54
natefinchrogpeppe: wow, I don't think I ever tried bzr help commands before... that is a friggin' huge UI18:58
rogpeppenatefinch: it's minute compared to git...18:58
rogpeppenatefinch: vcs's are like OS's before unix came along18:58
natefinchrogpeppe: yeah, git looks even bigger.  Man.  I sorta miss SVN.18:59
hatchwhaaaaa??19:08
* hatch pinches19:08
hatchnatefinch you can probably rebase the merge out19:09
hatchohh bzr.....yeah no idea19:09
hatchsorry :)19:09
natefinchhatch: heh, yeah, same here :)19:16
=== zz_mwhudson is now known as mwhudson
thumpernatefinch: ping20:08
natefinchthumper: howdy20:09
=== mwhudson is now known as zz_mwhudson
* thumper reboots20:37
=== zz_mwhudson is now known as mwhudson
=== wallyworld___ is now known as wallyworld

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