Commit Graph

48023 Commits

Author SHA1 Message Date
Matthew Treinish d083eceea3 Fix test runner config issues with os-testr 1.0.0
The os-testr 1.0.0 release had a couple of required config changes due
to it's internal usage of stestr. This commit fixes those by adding a
.stestr.conf (to remove a warning) sets the fixture env variables in
the tox.ini instead of being hidden in .testr.conf and removing the
quotes around posargs to make passing args to ostestr actually work.
Also to keep the expected dev experience stestr is used directly for
places where ostestr was called directly.

Change-Id: Ib0fbcb2e7710a6b8219c56ef2a4462c61ea498a9
2017-09-13 17:11:57 -04:00
Jenkins 92b860fa6c Merge "Enable test_iscsi_volume in live migration job" 2017-09-13 17:55:30 +00:00
Jenkins a28b79adb3 Merge "doc: fix flavor notes" 2017-09-13 17:54:47 +00:00
OpenStack Proposal Bot cfdec41eee Updated from global requirements
Change-Id: I043babceb3b1be03550c8e90c9abb9450d5f5cde
2017-09-13 12:57:19 +00:00
Jenkins f01bda973a Merge "Remove dest node allocation if evacuate MoveClaim fails" 2017-09-12 21:05:36 +00:00
Jenkins 9dbeed69cb Merge "Add a test to make sure failed evacuate cleans up dest allocation" 2017-09-12 21:05:04 +00:00
Jenkins 48a5c5edea Merge "Add recreate test for evacuate claim failure" 2017-09-12 21:03:35 +00:00
Jenkins ffb26b2330 Merge "Create allocations against forced dest host during evacuate" 2017-09-12 21:03:08 +00:00
Jenkins 58c09628a1 Merge "Handle keypair not found from metadata server using cells" 2017-09-12 20:59:13 +00:00
Jenkins 9302b48c1d Merge "Transform instance.resize.error notifications" 2017-09-12 19:12:49 +00:00
Matt Riedemann 5bc137f7eb Remove dest node allocation if evacuate MoveClaim fails
If the MoveClaim during an evacuate fails we need to
remove the destination node allocation since the
ResourceTracker isn't going to do it.

This also fixes test_rebuild_server_exc which was faking
a rebuild failure by raising an error that would not
actually happen during a rebuild. ComputeResourcesUnavailable
only happens if a claim fails, and for a rebuild, which
is on the same host that the instance is already on, doesn't
involve a claim attempt.

Change-Id: I59ff47bf773c9831d0f44e1caf7877fe08c911c3
Closes-Bug: #1713786
2017-09-12 11:15:38 -04:00
Matt Riedemann 30946f9a5e Add a test to make sure failed evacuate cleans up dest allocation
If we actually make the MoveClaim but the evacuation fails
in the virt driver, the drop_move_claim via the MoveClaim.abort
will remove the destination node allocation. This adds a functional
test to show that works.

Change-Id: Ib58c487e97a041b8498746e8a276efffee239c56
Related-Bug: #1713786
2017-09-12 11:15:38 -04:00
Matt Riedemann 6ed80ddcdd Add recreate test for evacuate claim failure
This adds a functional recreate test for when the MoveClaim
fails on the destination node and the allocation on the
destination node is not cleaned up. This is because the
MoveClaim fails in it's constructor so it never exits the
Claim context manager to call the drop_move_claim which
would remove the destination node allocation.

Eventually we'll have to manually remove the destination
node allocation in the ComputeManager.rebuild_instance method.

Change-Id: I8900ace4436c4837beb8b4eb1e1d05905efc6dce
Related-Bug: #1713786
2017-09-12 11:15:38 -04:00
Matt Riedemann d564266a01 Create allocations against forced dest host during evacuate
If a host is specified during an evacuate with the force=True
flag, conductor bypasses the scheduler. Since the scheduler
is what creates the "doubled up" allocation on the destination
node, and the scheduler is bypassed in the force case, we have
to create the allocations against the destination node in
conductor directly.

The unit tests cover the failure scenarios. The functional
test covers the happy path.

This is a short-term backportable fix. Long-term we'll likely
want to call the scheduler even in the 'force' scenario but pass
a flag to the scheduler to tell it to skip the filters but still
create the allocation on the destination node so we don't have
to duplicate that in conductor.

Change-Id: I6590f0eda4ec4996543ad40d8c2640b83fc3dd9d
Partial-Bug: #1713786
2017-09-12 11:15:38 -04:00
Matthew Booth ea00db9cca fake_notifier: Refactor wait_for_versioned_notification
A subsequent change will add wait_for_legacy_notifications(). This
refactor achieves 2 things:

* Make it easier to return the notifications we were waiting for,
  required in both current tests and subsequent legacy tests.
* Allow code re-use between fake legacy and versioned notifications.

It incidentally fixes a minor bug in
NotificationSampleTestBase._wait_for_notifications where we may wait for
up to double the specified timeout. It is also thread safe without
having to audit all code paths for potential eventlet context switch
points.

Change-Id: Ie4676eed0039c927b35af7573f0b57fd762adbaa
2017-09-12 14:20:05 +00:00
Béla Vancsics 804dd877dc Transform instance.resize.error notifications
The instance.resize.error notification
is transformed to the versioned framework.

Change-Id: Ieb4ae4605fee8fbf58de4c5efb3c00083b4bd62c
Implements: bp versioned-notification-transformation-queens
2017-09-12 14:18:58 +00:00
Matt Riedemann 3f6447120b Refactor ServerMovingTests for non-move tests
This came up as a review comment in change
c19ebcbd58.

The tests being moved aren't related to move
operations, so they shouldn't be in the
ServerMovingTests class.

This moves them to separate classes and uses
distinct fake virt drivers to avoid monkey
patching the compute manager code in a functional
test.

Change-Id: I55edd2c6e4c752dbe675b6d51d71a047bf49597a
2017-09-11 22:05:16 +00:00
Jenkins 07d9f13eba Merge "Revert "Revert "Fix AZ related API docs""" 2017-09-11 20:16:00 +00:00
Jenkins d83e9c0b17 Merge "Remove Xen networking plugin" 2017-09-10 22:08:41 +00:00
Jenkins 7195c63f80 Merge "Remove two testing stubs which aren't really needed." 2017-09-10 20:09:22 +00:00
Sean Dague f657efcdc5 Revert "Revert "Fix AZ related API docs""
Fix AZ related API docs

While we have a big fat comment in the development docs explaining why it's so
terrible to use default AZ values for either booting an instance or setting
an aggregate AZ metadata, we still have confusing API docs that provide the
wrong name for the AZ...

Fixing that and trying to explain the problem within the docs, too.

This reverts commit 92ca21abd6.

Co-Authored-By: Sylvain Bauza <sbauza@redhat.com>
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>

Change-Id: Ie4bfe32bbef0f8060bfc0ad4190f262d4a8bd3b2
2017-09-10 13:51:47 -06:00
Jenkins d35f26b25c Merge "Revert "Fix AZ related API docs"" 2017-09-10 17:17:00 +00:00
jimmygc 334a48bbda Remove Xen networking plugin
Since nova-network is deprecated, networking is controlled by neutron.
This plugin here was used by nove-network and will confuse operators.
I tested on my own environment, and it seems safe to remove.

Change-Id: I1b64ea1f5906b0c4dd1d5e311095cfe41e884ff7
2017-09-10 17:15:08 +00:00
Jenkins 8ff61dc4b1 Merge "Document tagged attach in the feature support matrix" 2017-09-10 17:13:23 +00:00
Chris Dent 92ca21abd6 Revert "Fix AZ related API docs"
This reverts commit 71a7eda44b.

This is breaking the gate due to the change in the az name.

Change-Id: Idd7d1aab113f3d4aba8b1deb6e5dc3871a75aa29
Closes-Bug: #1716247
2017-09-10 16:32:59 +00:00
Jenkins 3c9365c0ac Merge "Fix AZ related API docs" 2017-09-09 03:04:14 +00:00
Jenkins 1aa1462b98 Merge "[placement] api-ref GET /traits name:startswith" 2017-09-08 21:29:24 +00:00
Jenkins 4a8020c2e6 Merge "Move execs of touch to privsep." 2017-09-08 18:21:28 +00:00
Jenkins def81cace8 Merge "Move libvirt usages of chown to privsep." 2017-09-08 18:16:34 +00:00
Jenkins 8a1a7c1531 Merge "Amend the code review guide for microversion API" 2017-09-08 18:12:20 +00:00
Matt Riedemann a9f11002cc doc: fix flavor notes
This fixes the two points in the note at the top of the
flavors page:

1. The policy rule in the first bullet was old so it's updated.

2. As of Ifa4e9cdfbbac1a1d4bf28679b24a17b13f637ddd in Pike,
   Horizon no longer allows you to 'edit' a flavor by default.
   Rather than try to explain historical bad behavior and the
   new default behavior in the Dashboard, the second bullet is
   simply removed.

Closes-Bug: #1715995

Change-Id: I372bf1e159d1db32461f843bd94c453d2e7df8d2
2017-09-08 12:10:27 -04:00
Sylvain Bauza 71a7eda44b Fix AZ related API docs
While we have a big fat comment in the development docs explaining why it's so
terrible to use default AZ values for either booting an instance or setting
an aggregate AZ metadata, we still have confusing API docs that provide the
wrong name for the AZ...

Fixing that and trying to explain the problem within the docs, too.

Change-Id: I811d0f219142ca435b2b206e9b11ccd5ac611997
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
2017-09-08 16:21:54 +01:00
Jenkins 28cf7b167f Merge "Typo error about help resource_classes.inc" 2017-09-08 14:28:09 +00:00
Jenkins 97dd3d7b35 Merge "Set regex flag on ostestr command for osprofiler tests" 2017-09-08 14:10:09 +00:00
Michael Still f5fc74d658 Remove two testing stubs which aren't really needed.
They're a bit odd and don't really add much except complexity
these days.

Change-Id: Id99e350226c3ece3c57649beca1e155d1dcb920d
2017-09-08 13:53:18 +10:00
kangyufei 2b63c14e52 Typo error about help resource_classes.inc
Change-Id: I6e61aadecc80f87cd75c1331ab2f725583e9966b
2017-09-08 11:03:00 +08:00
Jenkins fbe6f77bc1 Merge "Fix broken URLs" 2017-09-08 02:17:18 +00:00
Jenkins 4beb9ced8f Merge "Transform keypair.delete notification" 2017-09-07 22:19:03 +00:00
Jenkins 14151e445f Merge "Make eventlet hub use a monotonic clock" 2017-09-07 21:00:49 +00:00
Matthew Treinish ce8ffc5303 Set regex flag on ostestr command for osprofiler tests
In the unit test tox jobs we run the whole test suite first and after
that exits successfully we also run the osprofiler tests while setting
an osprofiler env variable to enable osprofiler. However the regex isn't
being set properly in ostestr, you set the selection regex with the
--regex flag. [1] This only works by chance because ostestr will pass
any unrecognized args to the subprocess used to run testr internally,
and testr leverages that as a regex. But in the latest os-testr release
it doesn't subprocess internally anymore and this doesn't work. This
commit fixes things to properly set the regex in ostestr so it works in
both old and new versions.

The order of the test runs is also switched because we capture the last
test run's subunit for openstack-health and other analysis, so we want
to full test run to be used for this.

[1] https://docs.openstack.org/os-testr/latest/user/ostestr.html#test-selection

Change-Id: I890505d65ca6043ddbdcc5895f2620391b505756
2017-09-07 15:30:36 -04:00
Jenkins 27780d3c5c Merge "Refactor out claim_resources_on_destination into a utility" 2017-09-07 19:06:42 +00:00
Béla Vancsics a489dfa7da Transform keypair.delete notification
The keypair.delete.start and keypair.delete.end notifications
has been transformed to the versioned notification framework.

Change-Id: I48f28a56f9232faf52f458588500a9d77eb6b679
Implements: bp versioned-notification-transformation-queens
2017-09-07 14:43:34 -04:00
Michael Still 8325d41d4e Move execs of touch to privsep.
Instead of starting a process to update the mtime of a file, just
use privsep.

Change-Id: I2f3cfdf157e0c8bfb699ef2b29c18e9359ddd63f
2017-09-08 03:08:41 +10:00
Michael Still 0908d338c4 Move libvirt usages of chown to privsep.
A nice simple example of how to move things to privsep (and the new set
of helpers). In a few of these cases I think a more complicated re-write
is actually required, but I've put TODOs there are will do those in a
followup patch.

Change-Id: Ibb6ef001e3f2add459b0e37dfbd9f51c9eff2eb7
2017-09-08 03:07:57 +10:00
Jenkins 1afc9c5a72 Merge "Ensure instance mapping is updated in case of quota recheck fails" 2017-09-07 17:07:11 +00:00
Jenkins a7929dea43 Merge "Track which cell each instance is created in and use it consistently" 2017-09-07 17:06:06 +00:00
Jenkins bff4b4b166 Merge "Make ConductorTaskTestCase run with 2 cells" 2017-09-07 17:05:03 +00:00
Jenkins fb8ac8c92d Merge "Allow setting up multiple cells in the base TestCase" 2017-09-07 17:04:17 +00:00
Matt Riedemann 1032c79238 Enable test_iscsi_volume in live migration job
The block_migrate_cinder_iscsi config option in Tempest says
the libvirt driver doesn't support live migration with an attached
volume because of bug 1398999 where volumes live on a network share
like RBD. However, I8fcc3ef3cb5d9fd3a95067929c496fdb5976fd41 in
nova says that this is possible with libvirt >= 1.2.17. Since we are
using libvirt 2.5.0 from the Ubuntu Cloud Archive on Xenial nodes
now, we should be able to enable this test.

Change-Id: I7d7a708b231070468616ae852d81d2f8b01ba568
Related-Bug: #1398999
2017-09-07 16:17:14 +00:00
Matt Riedemann 34f8a35150 Refactor out claim_resources_on_destination into a utility
We need this method for a similar fix in evacuate, so this
change pulls the method out of the LiveMigrationTask and moves
it into scheduler utils along with unit tests.

The only functional difference is that instead of raising
MigrationPreCheckError, it now raises NoValidHost, which for
live migration ends up being the same result when it's handled
in ComputeTaskManager.

Change-Id: Ie63a4798d420c39815e294843e02ab6473cfded2
Related-Bug: #1713786
2017-09-07 11:26:18 -04:00