Граф коммитов

243 Коммитов

Автор SHA1 Сообщение Дата
Nick Hurley b8e1505734 Update init scripts for OS X and Linux 2013-02-08 13:42:41 -08:00
Nick Hurley 5b57cde581 Add cron job entry for enqueuer 2013-02-06 15:24:30 -08:00
Nick Hurley 43350409eb Add enqueuer
This is the final bit of integration between the public push server and
the private stone ridge network, to allow pushes to actually work.
2013-02-06 15:22:15 -08:00
Nick Hurley 609ce26dd1 Fix netconfig & os post variables to be named what the server expects 2013-02-06 14:54:26 -08:00
Nick Hurley 1d98420885 Fixes after testing the pusher 2013-02-06 12:39:55 -08:00
Nick Hurley 7c8d0a923a This should be an almost-functional srpush
It may be entirely functional, I don't know. No testing has occurred yet
:)
2013-02-06 12:28:55 -08:00
Nick Hurley 9823578c2d Most of the work for the srpush script. See TODO inside for more info. 2013-02-06 08:32:41 -08:00
Nick Hurley 89558dfead Make points for a run line up on the graphs
We do this by setting the timestamp for the run (which is used for
graphing purposes) once we know we can actually do the run. We also
sleep for a second in order to avoid having 2 different runs show up
with the same timestamp.

This also has the happy effect of making it so sum(totals) in the sql
queries for the graphs don't end up showing weird spikes on a day when
multiple runs are made. Hooray!
2013-02-04 12:15:27 -08:00
Nick Hurley b302929e08 Remove a couple unused imports 2013-02-04 12:11:44 -08:00
Nick Hurley d75281874b Add unit test support to collator 2013-02-01 16:51:22 -08:00
Nick Hurley 73e14ee874 Make downloader take srid into account 2013-02-01 16:43:29 -08:00
Nick Hurley 0ff88c4424 Make example config line up with local setup for download root 2013-02-01 16:43:06 -08:00
Nick Hurley e72db4a312 Add missing shutil import to archiver 2013-02-01 16:22:55 -08:00
Nick Hurley a32cc7a92f Make cleaner actually run
Somehow had an old argument parser stuck in there, that was causing us
to barf on a parameter required by the new argument parser. FAIL.
2013-02-01 16:22:55 -08:00
Nick Hurley ed3609f125 Make help work in stoneridge programs again
Automagically parsing out the log information had screwed up help output
from programs when -h or --help was passed in (but not any other way)
because the ArgumentParser for getting log filename was intercepting
that. By having it not generate its own help, we fix that issue.
2013-02-01 16:21:53 -08:00
Nick Hurley 709f4b8d19 Saner handling for unit tests in the runner 2013-02-01 16:00:07 -08:00
Nick Hurley c198cda4a4 Add unit test support in the runner 2013-02-01 15:51:53 -08:00
Nick Hurley 67845e1ba0 Fix incorrect config variable
Had renamed stoneridge.tests -> stoneridge.testroot, but forgot to
change that in the runner.
2013-02-01 15:51:34 -08:00
Nick Hurley ad165755fa Fix running xpcshell
Had missed a reference to an old global variable that now needs to be
determined at runtime in run_spcshell (specifically, the xpcshell
variable). This fixes that, as well as adds some logging of the
xpcshell command line being run.
2013-02-01 15:50:51 -08:00
Nick Hurley 39acdfa40e Fix tcpdump in runner
Had carried over a spurious stoneridge.outdir from the merge in from
master. Replaced with a reference to get_config('run', 'out')
2013-02-01 15:49:41 -08:00
Nick Hurley 7a4bea0d65 Add unit test mode to srdnsupdater
This makes it not send any messages to srdns, thereby not changing the
dns server. It logs everything, though.
2013-02-01 15:32:53 -08:00
Nick Hurley 4c1414c90e Change archive directory name
Normally we'd have been creating timestamped directories for any
netconfig/os pair that finished after the first netconfig/os pair to
finish for a particular srid. Now, the directories are named
srid_netconfig_os, so only re-runs of the whole 3-tuple will result in a
timestamped directory. This is what we want, really.
2013-02-01 15:26:10 -08:00
Nick Hurley b071e525f0 Put run.ini in outdir instead of top-level workdir
This allows us to easily save a copy of the run.ini when archiving,
which will make debugging easier in the future.
2013-02-01 15:16:44 -08:00
Nick Hurley c804e76ce0 Modernize more except clauses 2013-02-01 15:00:56 -08:00
Nick Hurley 7722f21cf9 Fix parameter name to handle in reporter
The metadata comes in named "metadata" instead of "metadata_b64" (even
though it's base64 encoded the whole time).
2013-02-01 14:51:24 -08:00
Nick Hurley 49fca2b4da Add unit test support to reporter
This avoids actually trying uploads to datazilla, which would not be
available during unit tests. Perhaps one day we'll mock it up, instead.
However, today is not that day.
2013-02-01 14:48:04 -08:00
Nick Hurley 80a5a9656b Don't blow away old archives in reporter
Instead, save versioned copies to timestamped directories
2013-02-01 14:46:10 -08:00
Nick Hurley a368677e16 Fix syntax error in reporter 2013-02-01 14:45:35 -08:00
Nick Hurley 59216f8cbc Make uploader use all json
Previously, we were serializing sub-objects (and sub-sub-objects) into
a string, before shoving them into the json object that gets passed
around the message queue. There's no particular need to do that, so
it's kind of dumb extra work we're doing in a couple places. This fixes
that by just passing around dicts serialized as json. Much cleaner, and
easier to read the contents while debugging, too!
2013-02-01 14:44:32 -08:00
Nick Hurley f1f9aaa92b Missing json import in uploader 2013-02-01 14:41:45 -08:00
Nick Hurley 88aaa5540a Fix a few minor bugs in the worker
*The inital call to self.reset() would barf because self.runconfig
 didn't exist
*We were trying to put the logs in a directory under / instead of under
 the stone ridge root
*Debug logs in unit test mode were going to the global worker log,
 instead of the single-run worker log
*We would barf if the run-specific logs directory already existed
2013-02-01 14:25:48 -08:00
Nick Hurley 7e7a8b73c1 Document the ini files, change example values
Document using comments so the example values can also be values that
work just fine on my local machines for testing. Hooray!
2013-02-01 14:06:23 -08:00
Nick Hurley 9cf1d26204 No longer need to use full path in worker
stoneridge.run_process already takes care of that for us now
2013-02-01 13:47:32 -08:00
Nick Hurley eb62629d65 Fix syntax error in worker 2013-02-01 11:30:44 -08:00
Nick Hurley 394e222774 Add support for running as a unit test
This lets things like the worker know not to call any subprocesses
2013-02-01 11:30:26 -08:00
Nick Hurley 6d051899bf Worker needs to return a value from handle()
Since handle() functions as an RPC, and all RPCs are expected to return
a value, we need to return something!
2013-01-31 15:18:38 -08:00
Nick Hurley 251714045f Add more logging in RPC calls 2013-01-31 14:47:28 -08:00
Nick Hurley 0f20475d66 Get channel properly in RPC Caller. It's a function, moron. 2013-01-31 14:29:29 -08:00
Nick Hurley 2831df0b9e Fix access of client queues in scheduler
Had been moved to a dict, never changed the scheduler. *Facepalm*
2013-01-31 14:28:39 -08:00
Nick Hurley 970818807a Better error message when killing a test run entirely 2013-01-31 13:36:29 -08:00
Nick Hurley 19c76033b1 Missing os import in deferrer 2013-01-31 13:32:00 -08:00
Nick Hurley 5a2cdc2ccf Make enqueuing a new test run work
* Was missing a couple arguments to the function
* Also need to handle operating systems/netconfigs properly
2013-01-31 13:31:13 -08:00
Nick Hurley b14d95cf35 Make deferrer start up properly
* Was using the wrong variable for operating system options, causing
  option conflicts
* Also was trying to get an argument that exists in the config file,
  instead!
2013-01-31 13:13:54 -08:00
Nick Hurley 61cc00a534 Fix call to stoneridge.run_process 2013-01-31 12:55:11 -08:00
Nick Hurley a0a1364c85 Make config filename available
This is for programs that need to pass it to sub-programs (master,
cloner, worker).
2013-01-31 12:54:36 -08:00
Nick Hurley 96efb99eb3 Move download path calculation into the cloner
The cloner is the ONLY thing that needs the path, so this removes one
place for things to go wrong (which I did when testing the cloner).
2013-01-31 12:41:29 -08:00
Nick Hurley 14e3401457 Fix crash when root directory does not exist
We would crash trying to get the prefix for the files if our root
directory did not exist (I found this out by accidentally passing the
wrong path for a nightly build). This fixes that problem by deferring if
we don't find any files.

We should probably also just put the source path into the cloner, too,
since that's the only thing that uses it.
2013-01-31 10:47:56 -08:00
Nick Hurley c35cb8d385 Add appropriate defaults for netconfigs and operating systems
Code expects it to be a list, make sure it's a list, not None
2013-01-30 15:29:30 -08:00
Nick Hurley 374d1b6294 Fix cli generation for cloner a bit
Make sure we have all the appropriate bits we need, in the places we
need them.
2013-01-30 15:27:08 -08:00
Nick Hurley a45bb5728e Add logging to master for each time a request comes in 2013-01-30 15:18:35 -08:00