]> git.apps.os.sepia.ceph.com Git - teuthology.git/log
teuthology.git
9 years agoMerge pull request #707 from dachary/wip-openstack-delete-wait
Zack Cerza [Fri, 20 Nov 2015 23:48:59 +0000 (16:48 -0700)]
Merge pull request #707 from dachary/wip-openstack-delete-wait

openstack: wait for server delete to complete

9 years agoMerge pull request #693 from dachary/wip-no-roles
Zack Cerza [Fri, 20 Nov 2015 23:48:40 +0000 (16:48 -0700)]
Merge pull request #693 from dachary/wip-no-roles

run: do not lock machines if there are no roles

9 years agotests: teuthology-* --invalid-option is a sure fail 693/head
Loic Dachary [Thu, 19 Nov 2015 10:53:07 +0000 (11:53 +0100)]
tests: teuthology-* --invalid-option is a sure fail

Providing the INVALID argument may succeed, depending on how the script
interprets arguments.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agoMerge pull request #708 from ceph/wip-tolerate-giterror
Andrew Schoen [Tue, 17 Nov 2015 18:14:01 +0000 (12:14 -0600)]
Merge pull request #708 from ceph/wip-tolerate-giterror

Be more tolerant of GitErrors in repo_utils

9 years agofetch_repo(): Call rmtree() when all attempts fail 708/head
Zack Cerza [Tue, 17 Nov 2015 17:46:22 +0000 (10:46 -0700)]
fetch_repo(): Call rmtree() when all attempts fail

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoDon't call rmtree() on GitErrors
Zack Cerza [Tue, 17 Nov 2015 17:44:34 +0000 (10:44 -0700)]
Don't call rmtree() on GitErrors

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoopenstack: wait for server delete to complete 707/head
Loic Dachary [Wed, 4 Nov 2015 12:20:06 +0000 (13:20 +0100)]
openstack: wait for server delete to complete

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agorun: do not lock machines if there are no roles
Loic Dachary [Thu, 29 Oct 2015 18:58:35 +0000 (03:58 +0900)]
run: do not lock machines if there are no roles

The worker runs the job, even if there are no roles: it is legitimate to
run a job that does not need machines.

Run only locks machines if there are roles and init_tasks is only
populated with tasks that make sense depending on the presence of roles
or not.

Move the internal task added in suite.py to run.py : there is no reason
to not have them with teuthology-run or teuthology-schedule (ansible +
clock).

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoceph.conf: filstore {ondisk,apply} finisher threads = 3
Sage Weil [Wed, 11 Nov 2015 14:23:15 +0000 (09:23 -0500)]
ceph.conf: filstore {ondisk,apply} finisher threads = 3

Exercise new finisher sharding in qa.

Signed-off-by: Sage Weil <sage@redhat.com>
9 years agoMerge pull request #698 from dachary/wip-openstack-instance-creation-poll
Zack Cerza [Tue, 10 Nov 2015 22:03:32 +0000 (15:03 -0700)]
Merge pull request #698 from dachary/wip-openstack-instance-creation-poll

openstack: poll every 30 seconds instead of 2

9 years agoMerge pull request #703 from dachary/wip-os-client-config
Zack Cerza [Tue, 10 Nov 2015 22:02:47 +0000 (15:02 -0700)]
Merge pull request #703 from dachary/wip-os-client-config

Unpin os-client-config

9 years agoUnpin os-client-config 703/head
Loic Dachary [Tue, 10 Nov 2015 06:23:21 +0000 (07:23 +0100)]
Unpin os-client-config

The bug found in 1.10.1 was fixed and version 1.10.2 is now current.

https://bugs.launchpad.net/os-client-config/+bug/1513919

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agoMerge pull request #702 from ceph/wip-empty-roles
Dan Mick [Tue, 10 Nov 2015 00:01:14 +0000 (16:01 -0800)]
Merge pull request #702 from ceph/wip-empty-roles

Run jobs even if 'roles' is empty

This was the original behavior pre-181256f3, and still seems better; the job will fail, but
this way worker won't keep it behind

Reviewd-by: Dan Mick <dmick@redhat.com>
9 years agoRun jobs even if 'roles' is empty 702/head
Zack Cerza [Mon, 9 Nov 2015 23:41:02 +0000 (16:41 -0700)]
Run jobs even if 'roles' is empty

They will fail immediately, but at least we'll know about them.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #701 from ceph/wip-suite-tests
Andrew Schoen [Fri, 6 Nov 2015 21:05:07 +0000 (15:05 -0600)]
Merge pull request #701 from ceph/wip-suite-tests

TestSuiteMain.test_main(): don't hit the network

9 years agoTestSuiteMain.test_main(): don't hit the network 701/head
Zack Cerza [Fri, 6 Nov 2015 20:35:37 +0000 (13:35 -0700)]
TestSuiteMain.test_main(): don't hit the network

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #700 from ceph/wip-pin-occ
Loic Dachary [Fri, 6 Nov 2015 18:54:13 +0000 (19:54 +0100)]
Merge pull request #700 from ceph/wip-pin-occ

Pin os-client-config to 1.9.0

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoPin os-client-config to 1.9.0 700/head
Zack Cerza [Fri, 6 Nov 2015 18:17:29 +0000 (11:17 -0700)]
Pin os-client-config to 1.9.0

This is to fix 'openstack image list --json' acting as if --debug were
passed. This was breaking things.

https://bugs.launchpad.net/os-client-config/+bug/1513919

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #649 from dachary/wip-install-doc
Zack Cerza [Fri, 6 Nov 2015 16:33:48 +0000 (09:33 -0700)]
Merge pull request #649 from dachary/wip-install-doc

install: document tag, branch and sha1 precedence

9 years agoMerge pull request #699 from ceph/wip-results
Andrew Schoen [Thu, 5 Nov 2015 20:59:33 +0000 (14:59 -0600)]
Merge pull request #699 from ceph/wip-results

teuthology-results: Be aware of all job statuses

9 years agoMore consistent spacing between sections 699/head
Zack Cerza [Thu, 5 Nov 2015 20:04:10 +0000 (13:04 -0700)]
More consistent spacing between sections

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoFormat durations as HH:MM:SS
Zack Cerza [Thu, 5 Nov 2015 19:56:14 +0000 (12:56 -0700)]
Format durations as HH:MM:SS

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoIncrease polling interval
Zack Cerza [Thu, 5 Nov 2015 17:43:13 +0000 (10:43 -0700)]
Increase polling interval

When we used the filesystem, we polled for a run's status every 10s;
that was more aggressive than necessary. Increase to 60s to avoid
overloading paddles.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoRefactor teuthology.results to remove copypasta
Zack Cerza [Thu, 5 Nov 2015 16:36:53 +0000 (09:36 -0700)]
Refactor teuthology.results to remove copypasta

And also stop mixing tenses in the email subject/body.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoHandle all possible job states
Zack Cerza [Thu, 5 Nov 2015 15:40:53 +0000 (08:40 -0700)]
Handle all possible job states

Instead of lumping jobs into a made-up 'hung' state, express that they
are in one of the following: dead, running, waiting, queued

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoUpdate unit tests for teuthology.results
Zack Cerza [Thu, 5 Nov 2015 00:36:06 +0000 (17:36 -0700)]
Update unit tests for teuthology.results

This commit updates the existing unit tests to match the new
paddles-based behavior.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoUse paddles instead of the filesystem
Zack Cerza [Wed, 4 Nov 2015 16:01:44 +0000 (09:01 -0700)]
Use paddles instead of the filesystem

We do still need the filesystem to generate coverage reports.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoProvide a default for --timeout
Zack Cerza [Wed, 4 Nov 2015 16:01:16 +0000 (09:01 -0700)]
Provide a default for --timeout

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoopenstack: poll every 30 seconds instead of 2 698/head
Loic Dachary [Wed, 4 Nov 2015 08:58:56 +0000 (09:58 +0100)]
openstack: poll every 30 seconds instead of 2

No cloud provider boots an instance within 30 seconds, no need to poll
aggressively. Also wait more than a total of 1200 seconds (3000 seconds)
because some providers may take more than 20 minutes to complete the
boot sequence.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #692 from dachary/wip-upload-order
Zack Cerza [Tue, 3 Nov 2015 23:29:55 +0000 (16:29 -0700)]
Merge pull request #692 from dachary/wip-upload-order

run: upload must happen after archive

9 years agoMerge pull request #691 from dachary/wip-suite-sha1
Zack Cerza [Tue, 3 Nov 2015 23:29:37 +0000 (16:29 -0700)]
Merge pull request #691 from dachary/wip-suite-sha1

suite: add the ceph-qa-suite hash to the job config

9 years agoMerge pull request #689 from dachary/wip-openstack-user-data
Zack Cerza [Tue, 3 Nov 2015 23:29:03 +0000 (16:29 -0700)]
Merge pull request #689 from dachary/wip-openstack-user-data

openstack: get user-data path relative to the sources

9 years agoMerge pull request #688 from dachary/wip-tests-openstack-resources
Zack Cerza [Tue, 3 Nov 2015 23:28:32 +0000 (16:28 -0700)]
Merge pull request #688 from dachary/wip-tests-openstack-resources

openstack: tests: use new resources hint style

9 years agoMerge pull request #690 from dachary/wip-openstack-sha1
Zack Cerza [Tue, 3 Nov 2015 23:25:38 +0000 (16:25 -0700)]
Merge pull request #690 from dachary/wip-openstack-sha1

openstack: disable teuthology-suite sha1 verification

9 years agorun: upload must happen after archive 692/head
Loic Dachary [Thu, 29 Oct 2015 08:36:03 +0000 (17:36 +0900)]
run: upload must happen after archive

The unwinding order is in reverse: internal.archive must be after
archive_upload so that it actually happens *before*.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agosuite: add the ceph-qa-suite hash to the job config 691/head
Loic Dachary [Thu, 29 Oct 2015 03:01:49 +0000 (12:01 +0900)]
suite: add the ceph-qa-suite hash to the job config

To be able to re-run a job we need:

* the ceph repository and hash
* the ceph-qa-suite repository and hash
* the job description

When reading the job log from the archive directory, we currently only
have the ceph-qa-suite branch name. If and when the branch name moves
on, the job description may cease to be valid and re-running the job
may no longer be possible.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: disable teuthology-suite sha1 verification 690/head
Loic Dachary [Wed, 28 Oct 2015 03:15:20 +0000 (12:15 +0900)]
openstack: disable teuthology-suite sha1 verification

By default teuthology-openstack builds packages dynamically and does not
rely on gitbuilder.ceph.com

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: get user-data path relative to the sources 689/head
Loic Dachary [Wed, 28 Oct 2015 01:34:52 +0000 (10:34 +0900)]
openstack: get user-data path relative to the sources

The user-data files are in the sources, in the teuthology/openstack
directory. By default the template path being used is
teuthology/openstack/openstack-{os_type}-{os_version}-user-data.txt and
assumes teuthology-suite / teuthology-openstack is run from the root of
the source directory.

If the user-data path is relative, make it absolute based on the
directory in which the openstack module is found.

http://tracker.ceph.com/issues/13416 Fixes: #13416

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: tests: use new resources hint style 688/head
Loic Dachary [Mon, 26 Oct 2015 23:14:46 +0000 (08:14 +0900)]
openstack: tests: use new resources hint style

The memory cannot be lowered by the hint: test that it increases to 10GB
instead of testing that it was lowered under a given limit.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #637 from dachary/wip-suite-sha1
Zack Cerza [Mon, 2 Nov 2015 21:57:13 +0000 (14:57 -0700)]
Merge pull request #637 from dachary/wip-suite-sha1

suite: add config.suite_verify_ceph_hash when no gitbuilder

9 years agoMerge pull request #687 from ceph/wip-sh-tests
Loic Dachary [Mon, 2 Nov 2015 21:04:48 +0000 (22:04 +0100)]
Merge pull request #687 from ceph/wip-sh-tests

Fix misc.sh() tests on MacOS

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #2 from zmc/wip-suite-tests 637/head
Loic Dachary [Mon, 2 Nov 2015 21:03:44 +0000 (22:03 +0100)]
Merge pull request #2 from zmc/wip-suite-tests

suite: Fix updated unit test

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agosuite: Fix updated unit test
Zack Cerza [Mon, 2 Nov 2015 20:18:26 +0000 (13:18 -0700)]
suite: Fix updated unit test

First, split half of test_schedule_suite into
test_schedule_suite_noverify. Also reflect the fact that Mock doesn't
provide a simple assert_called().

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoFix misc.sh() tests on MacOS 687/head
Zack Cerza [Mon, 2 Nov 2015 17:35:25 +0000 (10:35 -0700)]
Fix misc.sh() tests on MacOS

It needs to be specifically told to use /bin/echo. Also add some
newlines to make the linter happy.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #685 from dachary/wip-13656-openstack-remove
Zack Cerza [Mon, 2 Nov 2015 16:49:26 +0000 (09:49 -0700)]
Merge pull request #685 from dachary/wip-13656-openstack-remove

openstack: more robust server deletion

9 years agosuite: add config.suite_verify_ceph_hash when no gitbuilder
Loic Dachary [Tue, 15 Sep 2015 10:50:49 +0000 (12:50 +0200)]
suite: add config.suite_verify_ceph_hash when no gitbuilder

The suite_verify_ceph_hash configuration option is added to disable the
gitbuilder package verifications.

If True, teuthology-suite verifies that a package matching the ceph
branch exists in the gitbuilder. If False, no verification is done and
teuthology-suite assumes the packages are either not necessary to run
the task or they are created on demand.

Signed-off-by: Loic Dachary <loic@dachary.org>
9 years agosuite: implement git_branch_exists with ls-remote 684/head
Loic Dachary [Thu, 29 Oct 2015 22:40:00 +0000 (07:40 +0900)]
suite: implement git_branch_exists with ls-remote

Use git ls-remote to verify the existence of a branch instead of a
github specific interface so that it plays well with all valid git
remote URL.

Rename github_branch_exists into git_branch_exists.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agosuite: add the git_ls_remote function
Loic Dachary [Thu, 29 Oct 2015 02:59:08 +0000 (11:59 +0900)]
suite: add the git_ls_remote function

It was inlined and used as a fallback when not extracting the ceph hash
from gitbuilders.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agosuite: split build_git_url out of github_branch_exists
Loic Dachary [Thu, 29 Oct 2015 02:57:34 +0000 (11:57 +0900)]
suite: split build_git_url out of github_branch_exists

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: more robust server deletion 685/head
Loic Dachary [Fri, 30 Oct 2015 19:06:58 +0000 (04:06 +0900)]
openstack: more robust server deletion

When removing a server and the volumes attached to it, the following can
happen:

  * the server goes in ERROR status instead of being deleted
  * if removed before the server is deleted, the volume may fail detach
    and consequently the deletion can fail with "still attached, detach
    volume first"
  * some volumes go in ERROR status instead of being deleted

This will cause problem when and if an instance is assigned the same IP
as an instance in ERROR state. They will both have the same name and
confuse teuthology.

Instead of assuming deletion is a reliable operation, assume it is a
best effort:

   * rename the server and volumes to REMOVE-ME
   * delete the server and then the volumes: ignore failures

The names instances and volumes in error state no longer conflict with
the name of running instances and can be dealt with at a later time,
and kept around for the cloud provider support to investigate.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #681 from dachary/wip-instance-create-global-lock
Zack Cerza [Thu, 29 Oct 2015 20:25:16 +0000 (14:25 -0600)]
Merge pull request #681 from dachary/wip-instance-create-global-lock

openstack: global server creation lock

9 years agoMerge pull request #678 from dachary/wip-git-url
Zack Cerza [Thu, 29 Oct 2015 19:25:41 +0000 (13:25 -0600)]
Merge pull request #678 from dachary/wip-git-url

suite: use get_ceph_*_url when checking branches

9 years agoMerge pull request #682 from dachary/wip-sh-verbosity
Zack Cerza [Thu, 29 Oct 2015 01:25:19 +0000 (19:25 -0600)]
Merge pull request #682 from dachary/wip-sh-verbosity

misc: .sh must not log the output twice on error

9 years agomisc: .sh must not log the output twice on error 682/head
Loic Dachary [Wed, 28 Oct 2015 23:43:36 +0000 (08:43 +0900)]
misc: .sh must not log the output twice on error

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: global server creation lock 681/head
Loic Dachary [Wed, 28 Oct 2015 23:20:46 +0000 (08:20 +0900)]
openstack: global server creation lock

An attempt to reduce the instance error rate on OVH. When all workers
are on the same machine, it makes them wait for an instance creation to
complete before running another one. If not, it is possible for 200
workers to run 200 server creation simultaneously. While this should be
throttled by OVH, these bursts may be the cause for occasional instance
creation errors: few tenants are likely to have such a pattern.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #677 from dachary/wip-openstack-cliff
Zack Cerza [Wed, 28 Oct 2015 20:06:14 +0000 (14:06 -0600)]
Merge pull request #677 from dachary/wip-openstack-cliff

openstack: server show must always return array

9 years agoMerge pull request #680 from dachary/wip-sh-verbosity
Zack Cerza [Wed, 28 Oct 2015 19:37:55 +0000 (13:37 -0600)]
Merge pull request #680 from dachary/wip-sh-verbosity

misc: reduce misc.sh verbosity

9 years agomisc: reduce misc.sh verbosity 680/head
Loic Dachary [Wed, 28 Oct 2015 18:25:40 +0000 (03:25 +0900)]
misc: reduce misc.sh verbosity

Only shows the first 128 characters of the output when the command
succeeds and show all of it only when it fails.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agosuite: use get_ceph_*_url when checking branches 678/head
Loic Dachary [Tue, 20 Oct 2015 00:03:10 +0000 (02:03 +0200)]
suite: use get_ceph_*_url when checking branches

Otherwise the check is always done on the default
http://github.com/ceph/xxx

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: server show must always return array 677/head
Loic Dachary [Mon, 26 Oct 2015 09:09:47 +0000 (18:09 +0900)]
openstack: server show must always return array

If cliff-tablib is not present, the output of openstack server show is a
dictionary, otherwise it is a list of Field/Value pairs. Since
cliff-tablib is not a required dependency of python-openstack client,
the output format of openstack server show may vary. Add cliff-tablib as
a dependency so that the output format is always the same.

https://bugs.launchpad.net/python-openstackclient/+bug/1510546

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #675 from dachary/wip-openstack-timeout
Zack Cerza [Tue, 27 Oct 2015 15:51:49 +0000 (09:51 -0600)]
Merge pull request #675 from dachary/wip-openstack-timeout

openstack: increase ssh timeout to 240

9 years agoMerge pull request #673 from dachary/wip-openstack-doc-pulpito
Zack Cerza [Tue, 27 Oct 2015 15:51:33 +0000 (09:51 -0600)]
Merge pull request #673 from dachary/wip-openstack-doc-pulpito

openstack: the web interface is pulpito

9 years agoMerge pull request #672 from dachary/wip-openstack-tests-capture-log
Zack Cerza [Tue, 27 Oct 2015 15:51:15 +0000 (09:51 -0600)]
Merge pull request #672 from dachary/wip-openstack-tests-capture-log

openstack: tests: look in caplog

9 years agoMerge pull request #671 from dachary/wip-openstack-dead-code
Zack Cerza [Tue, 27 Oct 2015 15:50:26 +0000 (09:50 -0600)]
Merge pull request #671 from dachary/wip-openstack-dead-code

openstack: remove dead code

9 years agoMerge pull request #669 from dachary/wip-openstack-set-provider
Zack Cerza [Tue, 27 Oct 2015 15:50:11 +0000 (09:50 -0600)]
Merge pull request #669 from dachary/wip-openstack-set-provider

openstack: implement OpenStack.set_provider

9 years agoMerge pull request #667 from dachary/wip-openstack-reset-gitbuilder-host
Zack Cerza [Tue, 27 Oct 2015 15:49:44 +0000 (09:49 -0600)]
Merge pull request #667 from dachary/wip-openstack-reset-gitbuilder-host

openstack: reset the gitbuilder_host on stop

9 years agoopenstack: increase ssh timeout to 240 675/head
Loic Dachary [Mon, 26 Oct 2015 08:35:34 +0000 (17:35 +0900)]
openstack: increase ssh timeout to 240

When the connectivity is not great, this is required.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: the web interface is pulpito 673/head
Loic Dachary [Tue, 27 Oct 2015 00:09:24 +0000 (09:09 +0900)]
openstack: the web interface is pulpito

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: tests: look in caplog 672/head
Loic Dachary [Mon, 26 Oct 2015 23:10:59 +0000 (08:10 +0900)]
openstack: tests: look in caplog

The output is now logged, use caplog instead of capsys and add it as a
test dependency.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: remove dead code 671/head
Loic Dachary [Tue, 20 Oct 2015 16:24:06 +0000 (18:24 +0200)]
openstack: remove dead code

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #670 from ceph/wip-nuke-ovh
Loic Dachary [Sat, 24 Oct 2015 07:38:30 +0000 (09:38 +0200)]
Merge pull request #670 from ceph/wip-nuke-ovh

Fixes related to ProvisionOpenStack.destroy()

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agomisc.sh(): Use Popen instead of check_output() 670/head
Zack Cerza [Fri, 23 Oct 2015 22:26:49 +0000 (16:26 -0600)]
misc.sh(): Use Popen instead of check_output()

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agomisc.sh(): Don't log.exception() before raise
Zack Cerza [Fri, 23 Oct 2015 22:00:06 +0000 (16:00 -0600)]
misc.sh(): Don't log.exception() before raise

log.exception() logs the traceback, and raise will also cause it to be
logged. There's no need to have it logged twice; additionally, when sh()
was being called within a try/except clause we were confusingly logging
an expected failure. Callers can choose to log if they want.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agomisc.sh(): Don't log empty output
Zack Cerza [Fri, 23 Oct 2015 20:38:53 +0000 (14:38 -0600)]
misc.sh(): Don't log empty output

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoSkip volume detachment on broken instances
Zack Cerza [Thu, 22 Oct 2015 21:14:36 +0000 (15:14 -0600)]
Skip volume detachment on broken instances

That is, if the state is 'ERROR', don't attempt to detach volumes before
deleting.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoProvisionOpenStack: Cache server info in destroy()
Zack Cerza [Thu, 22 Oct 2015 21:05:22 +0000 (15:05 -0600)]
ProvisionOpenStack: Cache server info in destroy()

So we don't have to call "openstack server show" twice

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoOpenStack: Enable caching instance info
Zack Cerza [Thu, 22 Oct 2015 21:02:52 +0000 (15:02 -0600)]
OpenStack: Enable caching instance info

... via a new show() method, which returns the information from
"openstack server show -f json"

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoOpenStack.get_value(): Be case-insensitive.
Zack Cerza [Thu, 22 Oct 2015 20:07:03 +0000 (14:07 -0600)]
OpenStack.get_value(): Be case-insensitive.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoProvisionOpenStack.destroy(): Don't pass --wait
Zack Cerza [Thu, 22 Oct 2015 16:44:02 +0000 (10:44 -0600)]
ProvisionOpenStack.destroy(): Don't pass --wait

... when deleting the instance

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoopenstack: implement OpenStack.set_provider 669/head
Loic Dachary [Thu, 22 Oct 2015 13:57:11 +0000 (15:57 +0200)]
openstack: implement OpenStack.set_provider

Setting the provider name depending on the OS_AUTH_URL content is
generally useful and moved to the OpenStack base class. There is a need
to cope with public OpenStack providers special cases, even if
temporarily (i.e. no volumes on OVH, no security group on RackSpace
etc.).

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: reset the gitbuilder_host on stop 667/head
Loic Dachary [Thu, 22 Oct 2015 23:18:05 +0000 (01:18 +0200)]
openstack: reset the gitbuilder_host on stop

The package-repository instance is destroyed and requests to it will
timeout which takes time. Reverting to the default gitbuilder.ceph.com
is quicker and easier.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoMerge pull request #668 from dachary/wip-openstack-timeout
Zack Cerza [Fri, 23 Oct 2015 22:08:42 +0000 (16:08 -0600)]
Merge pull request #668 from dachary/wip-openstack-timeout

openstack: increase timeout from 4 hours to 6 hours

9 years agoMerge pull request #666 from dachary/wip-openstack-volumes-ownedby
Zack Cerza [Fri, 23 Oct 2015 22:07:59 +0000 (16:07 -0600)]
Merge pull request #666 from dachary/wip-openstack-volumes-ownedby

openstack: add ownedby property to volumes

9 years agoMerge pull request #665 from dachary/wip-openstack-zero-volumes
Zack Cerza [Fri, 23 Oct 2015 22:07:34 +0000 (16:07 -0600)]
Merge pull request #665 from dachary/wip-openstack-zero-volumes

openstack: revert to zero volumes default

9 years agoMerge pull request #664 from dachary/wip-13580-openstack-resources-hint
Zack Cerza [Fri, 23 Oct 2015 20:50:58 +0000 (14:50 -0600)]
Merge pull request #664 from dachary/wip-13580-openstack-resources-hint

openstack: resources hint is the max of all hints

9 years agoopenstack: increase timeout from 4 hours to 6 hours 668/head
Loic Dachary [Thu, 22 Oct 2015 22:15:13 +0000 (00:15 +0200)]
openstack: increase timeout from 4 hours to 6 hours

It takes more than 4 hours for some upgrade jobs to complete.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: add ownedby property to volumes 666/head
Loic Dachary [Thu, 22 Oct 2015 23:39:07 +0000 (01:39 +0200)]
openstack: add ownedby property to volumes

And delete the volumes owned by a teuthology instance on restart.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: revert to zero volumes default 665/head
Loic Dachary [Fri, 23 Oct 2015 10:37:42 +0000 (12:37 +0200)]
openstack: revert to zero volumes default

Volumes are rarely needed, having no volumes by default is sane.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoopenstack: resources hint is the max of all hints 664/head
Loic Dachary [Thu, 22 Oct 2015 14:00:02 +0000 (16:00 +0200)]
openstack: resources hint is the max of all hints

Exactly one OpenStack resources hint can be included in a given job, as
part of an existing facet. It is error prone because it is sometimes not
trivial to figure out how a given job is composed and if two resources
hint are included only one of them will be taken into account which can
lead to problems difficult to diagnose. Another undesirable side effect
is to artificially increase resources usage. It is easier and more
reliable (from the test maintainer point of view) to increase the
resources of all jobs when a few need more RAM or disk rather than
trying to figure where to write the hints so that they are used by these
jobs and these jobs only.

Instead of being a fixed hint for a given job, the max of all hints
found in each facet is used. For instance, rados/thrash can have a facet
requiring that all jobs are given 3 devices.

cat rados/thrash/cluster/openstack.yaml
  openstack:
    - volumes:
        count: 3

If one task in rados/thrash needs 16GB RAM instead of the default of 8GB
RAM, it can have:

cat rados/thrash/tasks/bigworkunit.yaml

  task:
    - workunit: highmemoryusage.sh
  openstack:
    - machine:
        ram: 16 # GB

And a job composed of rados/thrash/{cluster/openstack.yaml
tasks/bigworkunit.yaml} is aggregated as the max of all resources,
including the default, that is:

  task:
    - workunit: highmemoryusage.sh
  openstack:
    - machine:
        disk: 20 # GB
        ram: 16 # GB
        cpu: 1
      volumes:
        count: 3
        size: 1 # GB

Signed-off-by: Loic Dachary <ldachary@redhat.com>
9 years agoProvisionOpenStack.destroy(): Detach volumes
Zack Cerza [Thu, 22 Oct 2015 16:43:21 +0000 (10:43 -0600)]
ProvisionOpenStack.destroy(): Detach volumes

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoOpenStack.exists(): Don't list every instance
Zack Cerza [Thu, 22 Oct 2015 16:39:36 +0000 (10:39 -0600)]
OpenStack.exists(): Don't list every instance

Instead of "openstack server list", dumping the entire tentant's list of
instances, use "openstack server show" to show a single instance. While
"list" can accept a "--name" argument to filter, it does not have an
"--id" argument.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoWhitespace correction for linter
Zack Cerza [Thu, 22 Oct 2015 16:26:10 +0000 (10:26 -0600)]
Whitespace correction for linter

My editor makes these changes automatically.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoFix typoed exception name
Zack Cerza [Wed, 21 Oct 2015 21:00:02 +0000 (15:00 -0600)]
Fix typoed exception name

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #663 from ceph/wip-ovh-fixes
Loic Dachary [Tue, 20 Oct 2015 22:53:09 +0000 (00:53 +0200)]
Merge pull request #663 from ceph/wip-ovh-fixes

Fixes for unlock-related issues in OVH

Reviewed-by: Loic Dachary <ldachary@redhat.com>
9 years agofind_stale_locks(): Only query locked nodes 663/head
Zack Cerza [Tue, 20 Oct 2015 22:35:20 +0000 (16:35 -0600)]
find_stale_locks(): Only query locked nodes

Simple performance oversight.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoDon't retry unlocking when it fails normally
Zack Cerza [Tue, 20 Oct 2015 22:34:33 +0000 (16:34 -0600)]
Don't retry unlocking when it fails normally

We only want to retry when there is a connection error.

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #662 from ceph/wip-retry-unlock-one
Andrew Schoen [Tue, 20 Oct 2015 16:14:32 +0000 (11:14 -0500)]
Merge pull request #662 from ceph/wip-retry-unlock-one

Break out of retry loop

9 years agoBreak out of retry loop 662/head
Zack Cerza [Tue, 20 Oct 2015 15:45:44 +0000 (09:45 -0600)]
Break out of retry loop

Signed-off-by: Zack Cerza <zack@redhat.com>
9 years agoMerge pull request #660 from dachary/wip-openstack-ports
John Spray [Mon, 19 Oct 2015 22:34:15 +0000 (23:34 +0100)]
Merge pull request #660 from dachary/wip-openstack-ports

openstack: open ports 1:65356 for all targets

Reviewed-by: John Spray <john.spray@redhat.com>
9 years agoopenstack: open ports 1:65356 for all targets 660/head
Loic Dachary [Mon, 19 Oct 2015 21:56:37 +0000 (23:56 +0200)]
openstack: open ports 1:65356 for all targets

Signed-off-by: Loic Dachary <ldachary@redhat.com>