/srv/irclogs.ubuntu.com/2014/07/25/#maas.txt

=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== CyberJacob|Away is now known as CyberJacob
=== jfarschman is now known as MilesDenver
=== CyberJacob is now known as CyberJacob|Away
=== jfarschman is now known as MilesDenver
rvbabigjools: meanwhile, would you have time for a review (the diff looks big because there is a migration in it but the changes are pretty mechanical): https://code.launchpad.net/~rvb/maas/improve-broken-state/+merge/228132 ?07:41
bigjoolsrvba: I saw it don't worry, just clearing my inbox and then I'll get to it07:43
rvbabigjools: cool, thank you07:44
=== jfarschman is now known as MilesDenver
allenapDoes anyone have a moment for a review? https://code.launchpad.net/~allenap/maas/rpc-call-get-preseed-data/+merge/22817909:32
rvbaallenap: sure, I'll take it09:33
=== jfarschman is now known as MilesDenver
rvbaallenap: at the bottom of the diff, why are you changing metadata_url to be of type `urlparse.ParseResult`?  Doesn't that parameter come from `absolute_reverse` which returns a string?10:02
allenaprvba: It actually gets passed via RPC as a tuple; see the ParsedURL type. I had previously stubbed it out using a string instead of a urlparse.ParseResult.10:05
allenapWhich was a mistake.10:05
rvbaallenap: oh, I see; the conversion is actually done in src/maasserver/clusterrpc/osystems.py:get_preseed_data;  that's the part I was missing.10:10
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
bigjoolsallenap: can you help me set up python's logger in pserv please?  There's currently zero feedback from the downloader service which is a little jarring :)11:50
allenapbigjools: Quick and dirty is to call logging.basicConfig(level=logging.DEBUG) in p.plugin…makeService().11:52
bigjoolsallenap: yesterday you said the loggingobserver needs setting up11:53
bigjoolsI detest logging in twisted11:54
allenapbigjools: That’s to get Twisted’s logs to go via the stdlib’s logging module.11:54
allenapSo you can configure both in there.11:54
allenapbigjools: Fwiw, so do most people who use Twisted.11:54
allenapWhere “configure both in there” means you can select levels and whatnot using the familiar stdlib’s logging stuff.11:55
allenapFor Twisted logs.11:55
bigjoolsallenap: I am slightly confused by it all.  The log there now is direct from twisted, right?  If Python's log is configured will it just pick it up and show it?12:02
allenapbigjools: They’re separate at the mo. If you call twisted.python.log.err or .msg it’ll print something to can’t remember where (that’s configured in the plugin). If you use the stdlib’s logging module then it must be configured to show your messages; by default the level is set to WARN.12:04
allenapbigjools: PythonLoggingObserver can be used to bridge the Twisted logs over to logging, but that’s not in there yet.12:05
allenapnot in there = not being used yet12:05
bigjoolsallenap: yeah I think the pserv service is started with --logfile=/dev/null12:06
bigjoolsstdout is redirected instead12:06
allenapbigjools: p.services.LogService gets all Twisted logs to go to the filename specified, which is defined in pserv.yaml iirc.12:09
bigjoolsyeah12:10
bigjoolsso is that going to pick up python's logging?12:10
bigjoolsGuess I'll try it out12:10
allenapbigjools: Nope… but you could add a call to logging.basicConfig into LogService.startService.12:19
bigjoolsallenap: that's what I mean, if it's configured, where will it go?12:19
allenapbigjools: basicConfig send the logs to stdout or stderr iirc.12:20
bigjoolsallenap: yeah I think so.  might interleave with twisted...12:21
allenapbigjools: The —logfile=… argument to twistd only affects Twisted’s logs I think. It doesn’t redirect stdio or configure the logging module.12:21
allenapbigjools: As long as you can see the logs for development that’s a start.12:21
bigjoolsI think we added the loggingservice to make the log location sane12:22
bigjoolsI am past development, thinking of production/QA now12:22
allenapbigjools: I would think about changing LogService to create a new PythonLoggingObserver to bridge Twisted logs over, and to configure the logging module using the log file defined in pserv.yaml.12:29
allenapThe latter can be done in p.plugin…makeService().12:30
bigjoolsallenap: yeah, sounds reasonable12:30
allenapbigjools: The current functionality of LogService can be removed.12:30
bigjoolsright12:30
=== jfarschman is now known as MilesDenver
rvbaallenap: I'd like to create a RegionRPCFixture similar to the CluserRPCFixture.  I'm thinking about doing something like: http://paste.ubuntu.com/7855652/ but it requires Region (from maasserver) to be import from provisioningserver which is obviously wrong… Any idea what I can do instead?13:10
allenaprvba: Yeah :) Import Region from p.rpc.region instead; that’s where it’s defined.13:11
allenaprvba: Btw, self.patch() doesn’t work on Fixture.13:12
rvbaallenap: oh, right, I'll MonkeyPatcher then13:12
rvbaallenap: thanks!13:12
rvbaI'll use* MonkeyPatcher13:13
allenaprvba: And I’m wrong about Region().13:13
rvbaallenap: yeah, that's what I just found out13:13
allenaprvba: I think you’ll have to make it easy to create stubs.13:14
rvbaallenap: okay, I'll look into it… but I'd like a fixture that wires things up magically (i.e. a fixture that removes all the AMP transport and calls the 'responder' directly).13:16
bigjoolseasy karma for someone: https://code.launchpad.net/~julian-edwards/maas/touch-maasmeta/+merge/22830113:16
bigjoolsrvba, allenap: we really need a full end-to-end fixture...13:17
allenaprvba: That’s not going to be easy at all; you’ll need to get Django configured and all that jazz.13:17
allenapbigjools: I don’t think we do. I’ve cheated with ClusterRPCFixture and I’m having second thoughts. We should develop the region and cluster against each other’s RPC schema. We ought to get into the habit of writing QA tests for the whole-system side of things.13:19
bigjoolsallenap: but I want integration tests that talk each way13:20
allenapbigjools: You may think you want that ;)13:20
* bigjools dodges allenap's meta-argument :)13:21
bigjoolscan someone review my simple branch please!13:23
rvbabigjools: looking at your branch now13:30
bigjoolsthank you rvba!13:31
=== jfarschman is now known as MilesDenver
jseutterbigjools: I have a workaround for that grub issue where maas couldn't install on some nodes from earlier this week.  I dropped several drives from the raid array (down to 1.1TB array size) and the maas install worked.  What is weird is that the ubuntu cd installer works with all drives in the array.13:42
bigjoolsjseutter: I've seen the installer fail for me when I've got raid partitions present (outside of maas)13:49
jseutterbigjools: ok, good to know :)13:50
=== Ratabunti is now known as Anolorat
=== jfarschman is now known as MilesDenver
bigjools600-line upper decker for your Friday afternoon enjoyment. https://code.launchpad.net/~julian-edwards/maas/replace-celery-download-job-with-pserv/+merge/22816816:05
bigjoolsno takers?  Beuller? :)16:05
bigjoolsallenap: the logging is doing my head in, let's talk about it next week16:10
allenapbigjools: Yeah, let’s :)16:11
allenapbigjools: I haven’t looked at it in a long long time and it does need some attention.16:11
bigjoolsallenap: if we send to stdout it makes things somewhat awkward16:11
bigjoolswe have our own custom logging service16:11
bigjoolsthat takes a filename16:11
bigjoolsnot sure we need a filename, but at the same time we do need to write a log to the right place16:11
=== jfarschman is now known as MilesDenver
=== CyberJacob|Away is now known as CyberJacob
=== CyberJacob is now known as CyberJacob|Away
=== jfarschman is now known as MilesDenver
=== jfarschman is now known as MilesDenver
=== sebas538_ is now known as sebas5384
=== beisner- is now known as beisner
=== Beret- is now known as Beret

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