install-autotest-server.sh: Allow more install possibilities

The install server script so far was rather unflexible:

 * Only the reference repo, master branch, could be installed
 * Only /usr/local/autotest could be used as install root

So rework the script a bit so that it is possible to:

 * Use an arbitrary autotest repo
 * Use an arbitrary autotest branch
 * Use an arbitrary autotest base dir

With this, it will be possible to automate server deployment
testing, a big win in the regular next testing of our code.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
install-autotest-server.sh: fix typo

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Fixed apache wsgi configuration

Added directive to pass authorization token in wsgi
apache config, without that rpc (including CLI)
was broked and it was not sending the user name
properly since without that HTTP_AUTHORIZATION was
being striped. Also renamed wsgi process group
to be autotest specific to make it easier to
coexist with other apps on the same server.

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
client.shared.base_packages: Override checksum feature for GitFetcher

This is a solution for the issue #603.

When adding a git repo as the package provider for autotest
deps, the method BasePackageManager.install_pkg() will download
and try to verify the checksum files for the given dependency.

For example, if you use the following snippet:

job.pkgmgr.add_repository("git://10.0.0.12/tools/iometer.git")
job.setup_dep(['iometer'])

This will fail because a GitFetcher doesn't have the ability
to fetch .checksum files. So, to avoid the error, if the package
repo is a git repo, let's skip checksum verification altogether,
even overriding what the callers may have passed, since it
doesn't make sense for the git fetcher anyway.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
move creation of basic admin group to post migrate

with change to using south the previous was of
creation of admin in sync handler stopped working, here
we move it instead to post_migrate south signal

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
client/tests: Update to the latest master

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
make locked field sortable in host table

use 'locked' filed as table column but
change the text on the fly using preprocessrow

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
prevent exception when user select paltform or labeles to sort by

since thes are derived columns they are not handled
by default sorting mechanism - instead inform the user
that columns are not sortable

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
prevent sorting on profile column

since this is not supported display message
informing the user instead of throwing exception

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
prevent sorting on profile column

instead tell user that column is not sortable

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
fixing sorting for Jobs table

- make created sortable field
- prevent sorting on status, display friendly message instead of error

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
client.shared.base_utils: Add log_last_traceback function

This function can be used to log the last traceback.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
server.autotest_remote: Fix obsolete docstring

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
server.autotest_remote: Fix autotest remote for distro package installs

As an attempt to fix problems found on our distro packages
for Fedora and RHEL, define that when autotest is running
using distro packages, it won't rsync any of the client code
to the client machines, instead, it will rely on the distro
packages themselves.

This of course reduces the usefulness of the autotest server,
since it can't test any client distro that does not have the
autotest client packaged, but this is an acceptable compromise
given the situation (frequently people using the distro
packages will be testing clients using that very same distro).

Simplify the code by ruling out rsyncs, and install/remove
autotest fom the clients using the distro supplied tools
(for now it works only for Fedora and RHEL).

Also add some more logging to the job log collector, so
we know which directories are being synced back to the
autotest server.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.base_job: Select tests dir correctly

If running on a system wide install, the usual client/tests
directories won't be available. But there is a setting that
stores the path for this dir, so use it if available.

This avoids having to artificially create a client/tests
dir in the autotest tarball for packaging.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend/setup.py: Fix removed module from install

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.version: Get same version name with new tagging convention

Github won't host our arbitrarily uploaded tarballs
anymore, so in order to have our upstream tarballs
to have a nicer name, we'll have to start calling
our tags differently, such as:

autotest-0.15.0

In order to tell the version name the same way as
before, strip the prepended 'autotest-'.

This commit also fixes a bug when executing the script
from an arbitrary directory outside of the git tree
dir.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
apache conf: moved statements to -web config file

Because these will fail when the web client is not present, such
as when only the -server package is installed.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
contrib/install-autotest-server.sh: check for apache modules before linking

Newer versions of apache2 packages on Ubuntu (as of 12.10) do not ship
with mod_version.c as a separate shared object, but back again built into
the apache2 binary.

So, check before we link to a possibly non-existing file.

This is a fix for github issue #601.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
install-autotest-server.sh: Update tested systems help text

We have resolved the issues found on Ubuntu 12.10, and
now Fedora 18 also works well, assuming it is clean and
up to date. So update the help text to reflect the current
state of support.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>