/srv/irclogs.ubuntu.com/2014/01/10/#juju-dev.txt

* thumper goes to look for food for lunch01:06
thumperaxw, wallyworld_: I have the last of juju-run up for review in three hunks01:07
wallyworld_ok, will look in a bit01:07
axwthumper: yup, was about to have a look01:09
wallyworld_thumper: dumb logging question01:24
wallyworld_thumper: i have a logger i have just created in the mock charm store01:24
wallyworld_if i log Infof, nothing is written. i have to log Errorf to see some output01:25
wallyworld_i'm not sure why in this once case the messages are being filtered like that01:25
thumperwallyworld_: got the code?01:26
wallyworld_this is in a test where i capture log output01:26
wallyworld_i'll pastebin01:26
thumperok...01:26
thumperthe default logging for the test is probably set to warning01:26
thumperwhat I do in test setups where I want more logging is this...01:27
thumperloggo.GetLogger("my.test.thing").SetLogLevel(loggo.TRACE)01:27
thumperthe logging levels get cleared during the logging test suite setup01:27
thumperin testing/testbase01:27
wallyworld_thumper: https://pastebin.canonical.com/102760/01:29
wallyworld_the same code works elsewhere i think01:29
wallyworld_i can try setting the log level to trace01:29
wallyworld_when i say the same code works elsewhere, i mean that in non test code, log capture works as expected01:29
wallyworld_ie the logger is created in prod code and no SetLogLevel is required01:30
wallyworld_in my pastebin, if i change Infof to Errorf it works01:30
thumperhave I mentioned recently that using logging to confirm things is a terrible idea?01:31
wallyworld_yes01:32
wallyworld_but it's not easy to do anything else01:32
thumperI bet your logger isn't using "juju." as the base01:32
thumperlook at testing/testbase/log.go:4801:33
wallyworld_ah i changed it to juju and it worked01:33
wallyworld_didn't realise juju was special01:33
thumperjuju is always special01:34
wallyworld_so with the log verification thing, the header value passed in has no effect on the mock store functionality, it is just a label so to speak. so very hard to verify that is has been passed through01:35
axwthumper: dunno if you saw, I put up a CL for destroy-env in manual. I've been doing testing of bootstrap on Windows, and found more problems (unrelated to my changes)01:51
thumperaxw: ok01:51
thumperI'm just looking at your review01:51
thumperpaste a link and I'll look next01:51
axwwill carry on with that, and then get onto getting manual provisioning in non-null working01:51
axwthumper: did I miss anything at the end of the meeting yesterday? my wifi died01:52
thumperaxw: not really01:55
axwthumper: "sure, although this is paranoia as there is no other return options." -- I was thinking about panics, mainly. not going to happen with the code as it stands, but someone else might come along and botch it up02:08
thumperaxw: ah, interesting point02:08
thumperweird having a language that "kinda" has exceptions,02:08
thumpereither you should, or shouldn't, but mixing them is weird02:08
axwlike I said, it's me being paranoid; as the code stands, it's actually not necessary and your code works fine02:09
thumperI still changed it :)02:10
thumperaxw: where is the code that removes the upstart job on SIGABORT?02:14
axwthumper: preexisting, in cmd/jujud/machine.go, uninstallAgent02:15
axwthumper: the same code that runs when destroy-machine is run, is exercised by this02:15
wallyworld_axw: i'm looking at your ssh fingerprint branch. two issues - 1.for me md5.Sum() is not valid. i need to use md5.New().Sum() and 2. the fingerprint is different to ssh-keygen -lf which is why I abandoned ny attempt to write a go version02:16
thumperaxw: ok, nice02:16
axwwallyworld_: md5.Sum is not valid?02:16
wallyworld_not for me. my go src does not have it02:17
axwwallyworld_: if the fingerprint is different, why do all the tests pass?02:17
thumper:P02:17
axwwat02:17
axwmaybe it's a 1.2 thing02:17
wallyworld_axw: perhaps the fingerprint is different when not using 1.202:18
axwwallyworld_: if you changed it to use md5.New.Sum, I know why it's not working02:18
axwbecause the slice returned does not have len == md5.Size02:18
wallyworld_ah ok02:19
axwwallyworld_: are you on 1.1?02:19
axwdoes crypto/md5 have the Size constant?02:19
wallyworld_i think so yeah02:19
wallyworld_let me check02:19
wallyworld_firsly, i'm on go 1.1.202:19
axwit would be nice if the docs had "since <version>" like the Python docs02:20
wallyworld_it does have the SIze constant02:20
axwthanks02:20
wallyworld_+1 to that02:20
thumperaxw: you gocrpto ssh branch is kinda hefty02:21
axwthumper: yeah I'm going to split it02:21
axwthat was silly02:21
axwI did want to get feedback on general direction tho02:22
thumperI'll look after my coffee02:25
axwI will write some fingerprint tests after my tea02:25
thumperhmm... looks like the bot is stuck maybe?03:00
thumperaxw: what do you think we should do if the results aren't utf-8 capable?03:01
thumperaxw: how about base64 encoding it and add a flag?03:02
axwthumper: json/yaml will do that for you if it's []byte03:03
thumperhmm...03:03
axwif you're running one command, I'd just write it directly to Stdout/Stderr as it is03:03
thumperaxw: a key reason I didn't like keeping it as []byte is that it isn't easy to compare against03:04
axwthen you cat binaries and whatever :)03:04
thumperaxw: perhaps that doesn't matter...03:04
thumperexcept...03:04
thumperif you are running on multiple machines03:04
thumpereven with smart03:04
thumperyou'll get multip results03:04
thumperI'd prefer to have a string if I can, and be explicit if I can't03:04
axwdoesn't smart go to json/yaml if there are multiple targets?03:05
thumperyaml03:05
thumperbut if the stdout is []byte03:05
thumperit is unreadble03:05
axwyeah, so I'm just suggesting it be base64-encoded if it's not a valid utf-8 string03:06
thumperthat I can do03:06
axwyou might have to add an additional field tho03:06
axwso you can distinguish base64-encoded binary from something that was already base6403:07
thumperyeah, that was my thinking too03:07
thumperalso, I do like the idea of supporting globs...03:07
thumperbut perhaps not just yet03:07
thumper:)03:07
thumperlet's get the basics out there03:07
axwyep fair enough03:08
* axw wishes the bot would hurry up and merge destroy-env, so he can do a happy dance03:09
thumperaxw: how do I check for valid utf8?03:09
thumperaxw: bot is stuck03:10
axwthumper: utf8.Valid03:10
axwaw poop03:10
thumperis that encoding/utf8?03:10
* thumper pokes the bot03:10
axwjust utf803:10
* thumper tries to remember all the steps...03:10
thumperthere was a lock file there03:14
* thumper deleted it03:14
thumperand is watching the log03:14
thumperfor some reason, chose mine first03:14
thumperit is running again03:14
thumperaxw: unicode/utf803:15
axwthumper: eh, yes, sorry03:15
thumperctrl+. ctrl+p uft803:16
thumperaxw: example invalid utf8 for a test?03:18
axwumm03:19
axw0xFF ?03:19
thumperkk03:19
axwthumper: MSB indicates there's more bytes coming after to make up the rune03:20
=== waigani_ is now known as waigani
wallyworld_thumper: i commented on one of your branches - i disagree with the need to pass in apiConfig03:21
thumperwhile I agree only the datadir is needed right now, it seemed more reasonable to pass in the entire config interface than a single value03:22
thumperhowever I don't care strongly03:22
wallyworld_thumper: it's just that we have a method off agentConfig which extracts values03:23
wallyworld_so with your approach we are inconsistent03:23
wallyworld_we are extracting values off the config, and then passing the config in anyway03:23
wallyworld_and someone wrote that StateAPIInfo method or whatever it's called to get just the bits needed03:24
wallyworld_I'm neutral on the need for that method etc - just want to be consistent03:24
thumperwallyworld_: that was mostly to avoid rewriting too many tests...03:25
thumperbut I can fix03:25
thumperI was trying to be lazy03:25
wallyworld_:-)03:25
thumperlike all good programmers03:25
thumperyes I realised it was a little icky03:25
thumperbut my fucks to be given was approaching zero03:25
wallyworld_can understand that03:25
wallyworld_but i twitched a lot reading the code03:26
wallyworld_my view - StateAPIInfo shgould return a struct03:26
wallyworld_not individual attrs03:26
wallyworld_and then you can add dataDir to that struct03:27
wallyworld_and we can extend easily if needed03:27
wallyworld_without changing method signatures etc03:27
* axw happy dances03:52
axwmanual provider is complete03:52
* wallyworld_ -> shops for dinner food04:08
thumperwallyworld_: I actually took your advice and just passed through the datadir04:15
* thumper runs the tests to see if all are still good04:15
rogpeppemornin' all08:22
fwereadedimitern, hey, would you give the bot a little kick please? there are a few branches that are lying around approved10:09
dimiternfwereade, sure, looking10:10
dimiternfwereade, jam, standup10:48
natefinchwhen anyone gets a chance, very small change to fix the tests in trusty (or for anyone else with a newer version of git): https://codereview.appspot.com/4947004711:12
natefinchrogpeppe: ^^ this should help your tests on trusty11:24
rogpeppenatefinch: reviewed11:27
natefinchdimitern, mgz: bot appears out of disk space11:38
natefinchrMsg:"syncThread: 14031 Can't take a write lock while out of disk space", Healthy:true, State:5, Uptime:60, Ping:0}}}11:38
dimiternnatefinch, hmm - I cleaned up /tmp/ - maybe it managed to get into a loop or something and exhaust it again11:39
dimitern(so soon anyway - it never happened like this before)11:39
rogpeppethis hopefully mean we can lose the forked http package from gwacl: https://codereview.appspot.com/4858004311:40
dimiternnatefinch, it doesn't seem it runs out of space: http://paste.ubuntu.com/6726123/11:40
hazmatany simple streams experts around?11:41
dimiternnatefinch, maybe you're looking at an earlier log/11:41
dimitern?11:41
dimiternhazmat, wallyworld_  is your man11:41
hazmatwallyworld_, you around? got a user on irc  (private channel) having some issues getting set up with their private openstack cloud11:42
wallyworld_hey, i've had a few drinks but i'm here :-)11:42
hazmattheir doing the juju-metadata generate-images but they still get errors against it11:42
wallyworld_log?11:43
hazmatwallyworld_, coming up via priv msg11:43
wallyworld_ok11:43
natefinchdimitern: it was from 15 minutes ago... but maybe somethnig else is going on11:46
TheMuefwereade: heya, would you mind another look at https://codereview.appspot.com/44540043/?11:47
dimiternnatefinch, bizarre.. have you tried turning it off and on again? :) reapprove i mean11:48
fwereadeTheMue, should get to it soon, but probably after lunch11:52
fwereadeTheMue, (stuttering: tailer.FilterFunc reads better than tailer.TailerFilterFunc)11:52
natefinchdimitern: trying again11:56
mattywfwereade, would you be ok if we resheduled the juju id meeting to monday?12:16
fwereademattyw, sure :)12:18
mattywfwereade, tue instead if that's ok12:20
TheMueback from lunch12:21
TheMuefwereade: ah, ok, will change that12:22
wallyworld_mgz: ping14:12
mgzwallyworld_: hey14:13
wallyworld_hi, there's a guy having trouble with openstack and juju14:13
wallyworld_he has his image metadata in a container, the perms seem correct, but he can't read the json files14:13
mgzis there a bug or mailing list thread I should be looking at?14:14
wallyworld_ie if he pastes the link in a browser, it says unauth14:14
wallyworld_mgz: i'll pm you the private irc channel details14:15
=== hatch_ is now known as hatch
rogpeppefwereade: i just left you a query on https://codereview.appspot.com/49470047/16:09
natefinchrogpeppe: I don't think you actually CC'd fwereade in this: https://codereview.appspot.com/49470047/#msg616:28
rogpeppenatefinch: I pinger him above16:28
rogpeppepinged16:28
natefinchrogpeppe: oh, missed it, ok.16:29
rogpeppenatefinch: i presume he sees the emails anyway16:29
fwereadenatefinch, rogpeppe: sorry, I'm kinda focused on a weird bug16:32
rogpeppefwereade: no probs16:32
natefinchfwereade: no rush, definitely16:32
rogpeppenatefinch: i'd appreciate a review of this, if you could. it's only a staging post, but I'm hoping that it implements the core part of the replica set maintenance algorithm reasonably: https://codereview.appspot.com/4992004519:08
rogpeppefwereade: ^19:08
* rogpeppe is now done for the week19:08
rogpeppehappy weekends all!19:08
natefinchrogpeppe: sure thing19:16
=== gary_poster is now known as gary_poster|away

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