summaryrefslogtreecommitdiff
path: root/server
AgeCommit message (Collapse)AuthorFilesLines
2009-06-22Add an info message about processing the control filembligh2-1/+6
Add a warning if parallel_simple is passed an empty list of machines. Signed-off-by: Scott Zawalski <scottz@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3314 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-22Changed server sysinfo support code to reinstall the sysinfo Autotestmbligh1-9/+36
object and recreate the temporary output dir if it notices they are missing (say if the test code removes them, they are allowed to do that). Also changed it to uninstall the sysinfo Autotest client and remove the contents of the outputdir after each sysinfo step if the test has set to True a flag attribute named 'disable_sysinfo_install_cache'. Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3311 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-22Import logging into the namespace of server control files, mbligh1-1/+1
as it is for clients Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3310 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-22* make utils.system* default to directing output to the logging module, ↵showard3-21/+8
instead of sys.std*. this involved refactoring the code out of ssh_host/paramiko_host/abstrash_ssh, which previously did the same thing (they still do, but now the use the common logic in utils) * change packages.py to suppress command output properly. it was using the verbose option previously, which was added to ssh_host.run() and paramiko_host.run() specifically for this call site. in this context, verbose=False meant "dont print the command and dont print the output either). but this doesn't make the interface of utils.run(), for which verbose=False just means "dont print the command", because utils.run() suppresses output by default (while *host.run() doesn't). to resolve that, i made verbose on *host.run() match the interface of utils.run(), and i made packages.py suppress the output properly by passing stdout_tee=None. * move tee.flush() calls in utils.BgJob code to where it makes more sense (and interacts with LoggingFiles better) Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3307 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-22remove "connected" messages, as a first step in cleaning up ERROR logs. ↵showard2-6/+2
they we introduced long ago, while stderr of commands was redirected to stdout, making noise relatively harmless. but i don't think they've served a very significant purpose, and now they're just noise on stderr, which we'd like to promote to ERROR level logging. Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3305 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-18add two logging-related options to autoserv:showard3-6/+17
--verbose sets the console to DEBUG level output (this is added to autotest client as well) --no_console_prefix disables the logging prefix entirely on the console Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3301 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-17get rid of some now-obsolete codeshoward4-51/+43
* client.common_lib.debug * abstract_ssh.LoggerFile Changed {SSHHost,ParamikoHost}.run() default args for std{out,err}_tee to a constant instead of None. This preserves the existing behavior (teeing to the logging module by default), but allows callers to explicitly avoid this teeing if desired, by passing stdout_tee=None. Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3293 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-17Remove output from packages.checksum echo. This is an interim step to ↵showard3-11/+20
cleaning up verbose logs in general Signed-off-by: Scott Zawalski <scottz@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3290 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-15Stop polling job results once we know them already. This shouldmbligh1-6/+5
reduce the number of RPCs to the server significantly Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3286 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-15Unittest and typo fix for previous CL.mbligh1-0/+1
Signed-off-by: Gregory Smith <gps@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3285 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-15Allow a couple of machines failing to install a kernel in the servermbligh2-18/+86
test kernel install stanza when >4 machines are supplied. This allows for large multi-machine tests to proceed even if some of the hosts die while failing to install or boot the kernel. This is not the ideal implementation. We should really have some way to get the max(sync_count) required by a control file's step_test() before calling the function. Ideas welcome. Signed-off-by: Gregory Smith <gps@google.com> (this patch breaks a unittest. the fix is the patch i am mailing immediately after this, sorry. 2 mails is easier than merging them into one patch before mailing for me) git-svn-id: svn://test.kernel.org/autotest/trunk@3284 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-15Fix unittest failure due to recent frontend.py changes.mbligh1-1/+1
Signed-off-by: Gregory Smith <gps@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3271 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-15change client-side logging to split files by severity and move them to the ↵showard1-1/+1
debug dir. this is quite a bit more involved than the server-side change because of some buggy directory clearing code and various places that depended on the old configuration. This also changes the TKO autoserv log viewers to point to the new .DEBUG and .ERROR autoserv logs. Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3266 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-15Update Autoserv logging config to write logs for each severity level (except ↵showard1-0/+1
CRITICAL -- going up to ERROR should suffice). Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3265 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-10Ensure all entry points get the import-time logging logic executed before ↵showard1-1/+1
other autotest imports. Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3253 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-10Make autoserv and autotest client use the new logging_manager system. I'd ↵showard6-145/+60
like to split them into separate changes, but the change in common_lib.test means it all has to change at once. this replaces the old ini-style logging configurations with code-based configurations. i know the ini files were easier to read, but we're doing a lot more fancy stuff with logging and these give us much more power and less duplication. as one example, we'll probably move very soon to having separate .DEBUG, .INFO, .WARNING, and .ERROR logs. This will allow us to make a centralized change to make that happen, rather than duplicating a whole bunch of information across .ini files, and it'll make the information much more concise. Risk: Gravely high Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3243 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Added specific exceptions for various failures in verify and changed thembligh3-45/+111
code that raised them to use these new exceptions. Completely reworked the 3 repair phases to try to fix things by handling the specific errors generated by verify (in a loop where it exits either by not being able to fix an issue or if the last verify ran successfully). Reorganized some code to support this new way to repair hosts. The code tries to remember each repair handler it used to catch the case where even after executing the handler the same verify failure is reported and it may execute the repair handler in an infinite loop. When it finds out that the same repair handler has already been executed it will re-raise the original exception hoping it will be cought in surrounding try/except contexts or the exception will make repair fail. Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3217 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Wrap the Host object garbage collection out so that it gets run onmbligh1-10/+10
verify and repair tasks, as well as normal jobs. Risk: Low Visibility: Should avoid leaving host garbage behind after repair and verify jobs. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3215 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Fix up the repair script to properly use auto_monitor=False on allmbligh1-4/+1
the hosts it uses. This should keep it from launching a bunch of spurious warning monitor processes. Risk: Low Visibility: Eliminate some pointless warning monitor usage. Signed-off-by: John Admanski <jadmanski@google.com> Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest git-svn-id: svn://test.kernel.org/autotest/trunk@3214 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Make server/frontend.py poll_job_results use one RPC for all hosts,mbligh1-17/+33
rather than a separate one per host Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3212 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08The collect failure logs code may fail if the profiler fails verymbligh1-2/+5
early on, since the results dir for it won't exist yet. Make sure we create it if not. Also, increase the timeout when waiting for the profiler to be ready from 30 seconds to three minutes, since taking 30-60 seconds to go from exec to "profiler is ready to run" is not unreasonable, particularly if the profiler is being retrieved via the packaging system. Risk: Low Visibility: More robust failure log collection added, and make the profiler.ready wait less racy. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3211 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Fix some uninitialized variables when poll_job_results ismbligh1-5/+9
called directly Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3210 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Double poll interval for now to lessen load on server untilmbligh1-1/+1
we make things a little more efficient - I'll try to rewrite the poll loop later today Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3208 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Changed server side sysinfo support code to remember the host/autotestmbligh1-21/+39
and temporary work dir values and reuse them across the various sysinfo steps. Still supports only a single host per sysinfo object instance (which means it works with multiple machines if one uses job.parallel_simple and such to run their server side test, it does not work with server side tests that don't do that and work directly with all the machines in their test class code). Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3207 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Add in some try-except handling to the server profiler launcher so thatmbligh1-6/+39
if it fails for some reason we try to get the client.log from the profiler. Otherwise there's no good way to determine why the profiler failed, since we run it in temp dirs that get cleaned up by the end of the job (and so nothing is available for a post-mortem). Risk: Medium Visibility: Adds some log collection during server profiler failures. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3204 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Changed Host.repair_full() to not raisembligh1-6/+7
AutoservHardwareRepairRequestedError but let the implementation decide how to handle hardware repair (either by just requesting and raising that exception or wait for the machine to be repaired and return normally). Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3203 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Make the frontend scripts log job results for each platformmbligh1-9/+51
as a test, so we can see the kernel qual results more easily Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3202 592f7852-d20e-0410-864c-8624ca9c26a4
2009-06-08Add a method to Host for doing something similar to os.path.exists.jadmanski1-0/+7
Risk: Low Visibility: Add a generic os.path.exists equivalent to Host Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3200 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-22Add a slightly friendlier repr for remote hosts. Since these objectsjadmanski1-0/+4
are often passed in as parameters to tests the repr will often show up in test keyvals (where we log all params). Risk: Low Visibility: Eliminates the (generally unhelpful) default repr for host objects. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3168 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Break the crashinfo up into a bunch of separate, documented functions.jadmanski1-24/+86
Risk: Low Visibility: Refactoring only. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3167 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Clean up _get_autodir in autotest.py a bit. Adds in some more loggingjadmanski1-5/+8
to make it easier to see what decisions it's making, and changes the final fallback to checking /usr/local/autotest and /home/autotest to just look for the directories, rather than an installed client. Only checking for existing clients at those locations is inconsistent with the other checks this call does. Risk: Medium Visibility: Adds logging to autotest._get_autodir and adjusts its search to be more consistent. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3166 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Change the server-side profilers to use their own host objects, insteadjadmanski6-105/+128
of trying to re-use existing ones. Using existing ones was making them unreliable since we avoided using Host objects with "normal" autotest installs associated with them to avoid conflicts, so sometimes your hosts would get used, sometimes not, and it's non-obvious from a user point of view. So instead we change the profilers to look and what hostnames are in use and then create their own Host objects. However, this led to another problem, namely that the host classes themselves have a dependency on the profiler module and so now we have a circular dependency. To get around this I extracted the crashinfo and crashdump collection into a separate module, server.crashcollect. Risk: High Visibility: Make server-side profilers run much more reliably. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3165 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Fix up the logging of unexpected client aborts to flush all thejadmanski1-4/+10
current client log buffers first so that the final client end message is logged after all the client logs. Risk: Low Visibility: An aborted client should never produce status logs after the final client end message. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3164 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21A new version of the fix to handle race conditions between consolejadmanski2-5/+18
warning logging and status warning disabling messages. Instead of using a clearly still-unreliable sleep, just hold up the logging of WARN messages on the server side until we start seeing new messages from after the warning coming in. While this kind of buffing is rather unfortunate and means we're delaying the logging of warnings, I just don't see any other choice. We don't have a way to re-order status logs after the fact, so if we log a WARN as soon as we get it then there's still always the posibility that more status messages will come in that should've been logged before it. This still unfortunately leaves the reverse problem (logging warnings too late instead of too early) but this is the much less common case. It's also a lot less serious when it occurs, since it doesn't break the warning enabling and disabling. Risk: Medium Visibility: Should prevent WARN messages from being logged before events that they occured after. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3163 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Modify reboot timeout to be 5 minutes longer than the warningmbligh1-1/+1
Signed-off-by: Scott Zawalski <scottz@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3160 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Properly handle failures in frontend.py. At the moment, we mbligh1-0/+2
return job results as good when we fail to get a valid RPC from the server. Ooops. Make sure we won't take a null set as valid results Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3159 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Make sure we do an explicit is_authenticated check, since it's notmbligh1-0/+3
always guaranteed that the get_exception code will actually have an error associated with it. Risk: Low Visibility: Authentication errors should always lead to an authentication exception being thrown. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3158 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-21Disable POWER_FAILURE class warnings during a hard reset, since this sort ofmbligh1-4/+10
event is expected. Risk: Low Visibility: POWER_FAILURE warnings are disabled during expected power failures Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3157 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-18Encode args as args, not dargs as args.jadmanski1-1/+1
Risk: Low Visibility: Fixes server-side profilers that pass in arguments. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3147 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Replaced os.environ['HOME'] usage with os.path.expanduser() to not failmbligh1-1/+1
when HOME is not defined. Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3140 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Ignore spurious repair failures that shouldn't be there, as wellmbligh1-3/+4
as spurious verify failures ;-( Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3139 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Adds a -G to autoserv to be able to set host_group_name in the group keyvalsmbligh4-13/+66
file that it writes. Useful only if someone has asked autoserv to run the parser itself. The scheduler does not need this as it will write that keyvals entry itself. Adds a unittest for autoserv_parser and fixes a minor bug in --args support. Signed-off-by: Gregory Smith <gps@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3137 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Fix args splitting when we don't have anymbligh1-1/+2
Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3126 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Consolidate control files to one central one.mbligh1-0/+3
Make ktest_nightly use arg passsing instead of creating a custom file Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3125 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Delete some of the autotest unit tests wrapped around the server/autotest.pyjadmanski1-58/+0
log retrieval code that Lucas recently deleted. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3120 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-13Summary: Remove 'client global keyval' retrieving, as it is a no-op most of ↵jadmanski1-63/+0
the time autoserv does have code that tries to retrieve a client side 'global' keyval file (global in the sense it's not associated to a test, and placed on the results directory (client/results/default/keyval)). Turns out that such a keyval is not automatically generated by the autotest client, and the only way to generate it would be the user using the write_keyval APIs directly at the control file level. So if someone wants to use such a feature, it would be better handled on a site internal extension. On the upstream repo only causes noise on the server log files. After conversation with Steve and John we think the best approach would just be to get rid of this part of the code. I have a patch ready for 0.10 and this is the one for the development branch (trunk). Risk: Low (This is a no-op in the vast majority of the cases anyway) Visibility: Autoserv users in general will notice one less failure on their logs. Signed-off-by: Lucas Meneghel Rodrigues <mrodrigu@redhat.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3119 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-12Kill duplicate import of tracebackmbligh1-1/+1
Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3117 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-12If kicking off one test doesn't work, don't stop, just carry onmbligh1-7/+10
with the others Signed-off-by: Martin Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3116 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-11Added utils.get_relative_path() to compute the path of an absolute pathmbligh2-8/+20
as relative to a given directory path and used it when creating the test results sysinfo/current_reboot symlink to create a relative symlink that would still be valid when relocated. Added a "preserve_symlinks" default False keyword argument to AbstractSSHHost.get_file/send_file to tell rsync to try to preserve the original symlink and not transform them into the referenced file/directory when copied (only for rsync as scp has no way to do this). Used the new flag when fetching the test result directory to preserve symlinks. Along with the previous change this should fix an issue of >100k sysinfo bloat because of duplicated content instead of preserving the client symlink. Signed-off-by: Mihai Rusu <dizzy@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3104 592f7852-d20e-0410-864c-8624ca9c26a4
2009-05-06Fix up a possible race in the profiler startup; have the serverjadmanski1-0/+2
wait for the profiler on the client to be ready before signalling that it should start. Otherwise you can run into situations where the server goes ahead and tries to wait for profiler.finished before the profiler is even ready to start. Risk: Medium Visibility: Fixes a potential race in the server-side profiler startup. Signed-off-by: John Admanski <jadmanski@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@3094 592f7852-d20e-0410-864c-8624ca9c26a4