TestNet Changes for External/Internal Automation through rsync Purpose: Currently, BRT clients must * have the XML data files locally * be kicked off manually * have no communication with the server while running. These are the detailed changes necessary to make it possible to get more functionality out of remote tests. Overview: The new model would allow the same process or another 'automated' option. The process is as follows: * When a test request is registered, the info for the test is written to the external files server under a directory for the host. * The client configuration should say whether or not to automatically retrieve the test. * The client starts on a schedule and dies if a client is already running. ( Could we supress this once a test starts? That might affect performance runs though shouldd be fine for regression. ) * The client checks the file server for any test files. If its find them it begins the test sequence. Otherwise it exits. * If the host is remote, external reboot is not possible. Maybe an optional self reboot before the run is a good idea. Also, This polling method could work locally with the external reboot. ** Kernel install could be added as _optional_. ** Build set could be made optional. Instead detect the distribution and then do a dump of packages into the log directory. (In case of upgrades) * Additionally, server can now know the state of the SUT if the SUT can rsync the state back to the server. Details: Automate remote tests: Local infrastucture: An Rsync server is set up on our storage server and made available through the firewall. Associates/testers will need to upload their public ssh keys into the OSLD database. Our rsync server should be able to pull them in. Directories: /srv/autotest/host/state_file /srv/autotest/host/current/*.xml # Test Request Info /srv/autotest/host/config/directions /srv/autotest/host/config/* Server: When test is requested through www: * The xml files will be placed on the rsync server if the host is available. * If the host is busy, the test(s) will be placed in order as the other tests complete * If the host is in 'maint', the test(s) will be placed once it is re-activated * If SUT only wants to accept tests from the SUT owner the server will not record tests to be queued by other people. The state will be set to 'Install', once a test request is placed. Or perhaps better, we create a new state 'Pending'. Then the SUT will put it into 'Install' mode after picking up. The server will also be able to check the state of the SUT's running tests, as they will update it via rsync. Database Changes: The host_type/host will need an extra column to 'owner' and a flag to say whether to limit test_requests to that owner. (This will be the default). On client side: * Client will have the ssh private key on it to gain access. * The client will need to poll the server for test_requests, then will download the *.xml files prior to test execution. * It will update state as it runs. * When it completes it will update state to available and remove the *.xml files. * SUT will check if test requester is permitted to run a test here.