Commit Graph

49444 Commits

Author SHA1 Message Date
Lajos Katona ab937d8e7a Deduplicate service status notification samples
This patch refactors the sample files of service-create, service-delete
and service-update notifications to use a common ServiceStatusPayload
sample data.

This patch addresses the problem which lead the revert of the commit
I708ce5423806d2913e77abbe338aec970a5009dc.

Change-Id: I2f619089ae88d05207bb3432c63546a298f0bf15
2018-01-19 08:35:19 +00:00
Balazs Gibizer d4377c2d53 Make sure that functional test triggered on sample changes
To be able to define different irrelevant-files for the functional jobs
than the ones defined in openstack-zuul-jobs we need to copy the jobs to
the nova tree and modify the fields in tree.

Technically we could factor out the irrelevant-files regexp list from
functional and functional-py35 jobs as they are the same today. However
in the future when they diverge we cannot simply override the
irrelevant-files in one of the jobs. Therefore this patch does not
introduce a common base job for functinal and functional-py35 jobs
to discurage trying to override.

The openstack-tox-functional and fuctional-py35 are removed from the
nova part of the project-config in
I56d44f8dff41dbf3b2ff2382fa39b364f55f9a44

Closes-Bug: #1742962
Change-Id: Ia684786d1622da7af31aa4479fc883a7c65848ff
2018-01-16 15:53:23 +01:00
Zuul d9ba29fd6e Merge "update_cell allows more than once cell to have the same db/transport url" 2018-01-16 11:12:03 +00:00
Zuul bf5031430a Merge "Transform rescue/unrescue instance notifications" 2018-01-16 08:58:10 +00:00
Zuul 3875eaae73 Merge "Add aggregates check in allocation candidates" 2018-01-15 16:15:53 +00:00
Zuul 4258d743eb Merge "Do not attempt volume swap when guest is stopped/suspended" 2018-01-15 16:15:38 +00:00
Zuul b07080a04c Merge "console: Provide an RFB security proxy implementation" 2018-01-15 14:15:18 +00:00
Zuul 4fe3f9b3d2 Merge "console: introduce the VeNCrypt RFB authentication scheme" 2018-01-15 14:10:02 +00:00
Zuul 459353eec2 Merge "console: introduce framework for RFB authentication" 2018-01-14 07:35:39 +00:00
Zuul 4e5120de7c Merge "Fix comment in MigrationSortContext" 2018-01-14 07:03:53 +00:00
Zuul eaa31e8b82 Merge "Add index(updated_at) on migrations table." 2018-01-14 07:02:25 +00:00
Zuul b97bfcb270 Merge "Fix accumulated nits in refactor series" 2018-01-14 03:34:27 +00:00
Béla Vancsics df7442ee5a Transform rescue/unrescue instance notifications
The rescue (instance.rescue.start and instance.rescue.end) and unrescue
(instance.unrescue.start and instance.unrescue.end) notifications are
transformed to the versioned framework.

This patch also fixes the power state of the server
when unrescuing it with the fake compute driver.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Ib1d03c6d693e3b04886c638c956e35809fed8fc2
Implements: bp versioned-notification-transformation-queens
Closes-Bug: #1742133
2018-01-14 02:15:18 +00:00
Zuul e66fc365c8 Merge "Track provider traits in report client" 2018-01-13 09:49:16 +00:00
Zuul 0e458acc3d Merge "Test helper: validate provider summaries" 2018-01-13 07:19:24 +00:00
Zuul 7e849381a9 Merge "console: Send bytes to sockets" 2018-01-13 06:35:30 +00:00
Zuul a0e23fc273 Merge "Qualify the Placement 1.15 release note" 2018-01-13 00:54:33 +00:00
Zuul 30e71d608a Merge "Fix up formatting for deprecate-api-extensions-policies release note" 2018-01-13 00:54:23 +00:00
Zuul 2315d09965 Merge "Fix typo in release note" 2018-01-12 21:09:10 +00:00
Eric Fried 31de9273cc Track provider traits in report client
With this change, SchedulerReportClient keeps track of resource provider
traits in the same way as aggregates.  Specifically:

- We use ProviderTree methods to save trait information for each
  provider.
- We refresh trait information along with aggregate information whenever
  we "ensure" a provider exists.

Note that this change set consolidates the refreshing (including cache
expiry) of aggregate and trait associations into a single method.  The
theory being that both aggregate associations and trait associations
should change out of band with roughly the same frequency (i.e. very
rarely).

Change-Id: I33d01d8cab43ce6cdde151d2e9429921a140e88d
2018-01-12 15:08:59 -06:00
Tetsuro Nakamura 5e95c807d1 Add aggregates check in allocation candidates
Allocation candidates api returned some wrong
combinations of non-sharing resource provider and
shared resource provider, ignoring aggregates.

This patch adds aggregate check when constructing
shared allocation request being aware of non-sharing
resource in _shared_allocation_request_resources.

Change-Id: Ib45fde56706a861df0fc048bbec8a568fd26d85d
Closes-Bug:#1732707
2018-01-12 15:00:26 -06:00
Eric Fried b19d771b52 Fix accumulated nits in refactor series
Addresses the following minor review comments:

https://review.openstack.org/#/c/516778/10/nova/tests/functional/db/test_allocation_candidates.py@261
https://review.openstack.org/#/c/516779/9/nova/objects/resource_provider.py@2732
https://review.openstack.org/#/c/516780/10/nova/objects/resource_provider.py@2583
https://review.openstack.org/#/c/519617/6/nova/tests/functional/db/test_allocation_candidates.py@1527
https://review.openstack.org/#/c/517119/12/nova/objects/resource_provider.py@2450
https://review.openstack.org/#/c/516781/10/nova/objects/resource_provider.py@2606

Change-Id: I95cd1396b02f2cf18e0aa15905fa91ee4b387bce
2018-01-12 15:00:26 -06:00
Eric Fried 9edf764097 Test helper: validate provider summaries
Introduce two helper methods in AllocationCandidatesTestCase.  In a
similar vein to _validate_allocation_requests, they allows the consumer
to specify the expected values in a terse and readable format.

- _validate_provider_summary_resources validates the resources portion
  of the provider_summaries in allocation candidates, e.g.:

        expected = {
            'cn1': set([
                (fields.ResourceClass.VCPU, 24, 5),
                (fields.ResourceClass.MEMORY_MB, 32768, 2048),
                (fields.ResourceClass.DISK_GB, 2000, 0),
            ]),
            'shared storage': set([
                (fields.ResourceClass.DISK_GB, 2000, 50),
            ]),
        }
        self._validate_provider_summary_resources(expected, alloc_cands)

- _validate_provider_summary_traits validates the traits portion of the
  provider_summaries in allocation candidates, e.g.:

        expected = {
            'cn1': set(['HW_CPU_X86_AVX2']),
            'cn2': set(['HW_CPU_X86_AVX2']),
            'shared storage': set(['MISC_SHARES_VIA_AGGREGATE',
                                   'STORAGE_DISK_SSD]),
        }
        self._validate_provider_summary_traits(expected, alloc_cands)

The _provider_uuids_from_iterable, _find_summary_for_provider, and
_find_summary_for_resource helpers are rendered obsolete by the above,
and are therefore removed.

Change-Id: Ia719a5697b7d033bcf100c9125b58cd226da7400
2018-01-12 15:00:26 -06:00
Zuul 62095ea403 Merge "Document lack of side-effects in AllocationList.create_all()" 2018-01-12 20:40:38 +00:00
Zuul 2f52bbc0ab Merge "Update FAQs about listing hosts in cellv2" 2018-01-12 20:40:22 +00:00
Zuul 135a9d709d Merge "Add a warning in 'nova-manage cell_v2 delete_cell'" 2018-01-12 20:40:05 +00:00
Balazs Gibizer 3881f9e1ef Revert "Deduplicate service status notification samples"
This reverts commit 39f9ef719e.

The reverted change made the service.update notification sample tests
failing consistently on master. The CI did not catch this problem as
the functional test does not run for changes that only touches
nova/docs. This is a quick fix to unblock the gate and fix the
functional job defintion in a separate patch.

Change-Id: Idabbf70ae46f36be8343c0a00d812cbebf7f7670
Closes-Bug: #1742935
2018-01-12 15:14:49 +01:00
Zuul 2f128404d0 Merge "Deduplicate service status notification samples" 2018-01-12 12:48:31 +00:00
Zuul f639922cec Merge "Handle glance exception during rotating instance backup" 2018-01-12 12:48:22 +00:00
Daniel P. Berrange 30ceaaff5d console: Provide an RFB security proxy implementation
Instead of doing straight passthrough of the RFB protocol from the
tenant sock to the compute socket, insert an RFB security proxy. This
will MITM the initial RFB protocol handshake in order to negotiate an
authentication scheme with the compute node that is distinct from that
used by the tenant.

Based on earlier work by Solly Ross <sross@redhat.com>

Change-Id: I9cc9a380500715e60bd05aa5c29ee46bc6f8d6c2
Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
Implements: bp websocket-proxy-to-host-security
2018-01-12 10:00:42 +00:00
Stephen Finucane c5a1a9e711 console: introduce the VeNCrypt RFB authentication scheme
Provide an implementation for the VeNCrypt RFB authentication
scheme, which uses TLS and x509 certificates to provide both
encryption and mutual authentication / authorization.

Based on earlier work by Solly Ross <sross@redhat.com>

Change-Id: I6a63d2535e86faf369ed1c0eeba6cb5a52252b80
Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
Implements: bp websocket-proxy-to-host-security
2018-01-12 10:00:42 +00:00
Stephen Finucane 3c7770f1af console: introduce framework for RFB authentication
Introduce a framework for providing RFB authentication scheme
implementations. This will be later used by the websocket RFB security
proxy code.

Change-Id: I98403ca922b83a460a4e7baa12bd5f596a79c940
Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
Implements: bp websocket-proxy-to-host-security
2018-01-12 10:00:42 +00:00
Stephen Finucane 4d520e3cae console: Send bytes to sockets
Sockets expect byte strings. The default string type in Python 3 is
unicode, meaning calls to socket functions with unencoded strings will
fail. Fix two paths where we were potentially sending unicode, thus
resolving this issue. One of these paths is tested here. The other in
currently unexercised code and will be tested in a future change.

Change-Id: If8fb291ae672a01af4bde96d55b487c450fb2564
Implements: bp websocket-proxy-to-host-security
2018-01-12 10:00:10 +00:00
Zuul 640e656ad5 Merge "zuul: Move legacy jobs to project" 2018-01-12 09:53:16 +00:00
Zuul 96fb3a51df Merge "Remove confusing comment in compute_node_get API method" 2018-01-12 09:53:02 +00:00
Zuul 7b41a8ee45 Merge "Handle no allocations during migrate" 2018-01-12 09:52:50 +00:00
Zuul 90bacfa4a8 Merge "Add regression test for resizing failing when using CachingScheduler" 2018-01-12 09:52:42 +00:00
Zuul 614403370a Merge "Add pagination and Changes-since filter support for os-migrations." 2018-01-12 08:24:05 +00:00
Zuul e919720e08 Merge "Add cross cell sort support for get_migrations" 2018-01-12 08:23:53 +00:00
Zuul 0cd3849560 Merge "Add migration db and object pagination support." 2018-01-12 08:23:44 +00:00
Takashi NATSUME 52e7e6e3e4 Add a warning in 'nova-manage cell_v2 delete_cell'
When deleting a cell, if there are instance mappings to the cell,
the command fails with the following message.

* There are existing instances mapped to cell with uuid UUID.

But even if all instances have been deleted in the cell,
the same message is shown.

So in that case, add a warning that the instance mappings have to
be deleted by 'nova-manage db archive_deleted_rows'
before deleting the cell.

Change-Id: I2a163fb50a7e71ce9f463bc9ddeffe2ea47d1588
Closes-Bug: #1725331
2018-01-12 07:22:32 +00:00
Zuul 802378ae55 Merge "Test allocation candidates: multiple aggregates" 2018-01-12 05:56:31 +00:00
Matt Riedemann 1f92f2f910 Fix comment in MigrationSortContext
This cleans up a mistake from I2a6d21752b385ebd1e95ec9fe3d18b78a4017bb3.

Change-Id: I72e7e22e1bbed12fc90f3adbc6c49dca78c97cf1
2018-01-10 14:04:23 -05:00
Yikun Jiang c012c86fee Add index(updated_at) on migrations table.
A database index will be added on migrations.updated_at to
improve the performance of filtering migrations by
‘changes-since’ parameter.

Change-Id: I6bf9e498597669c8641f78267d7da589d01ad786
Implement: blueprint add-pagination-and-change-since-for-migration-list
2018-01-10 14:04:23 -05:00
Kevin_Zheng 92a0fc0b9f Add pagination and Changes-since filter support for os-migrations.
This patch adds pagination support and changes-since filter
for os-migrations API.

Users can now use 'limit' and 'marker' to perform paginate
query of running migrations list. Users can also filter the
results according to the migrations' updated time.

The ``GET /os-migrations`` and server migrations APIs will now
return a uuid value in addition to the migrations id in the response,
and the query parameter schema of the ``GET /os-migrations`` API no
longer allows additional properties.

Co-Authored-By: Yikun Jiang <yikunkero@gmail.com>

Implement: blueprint add-pagination-and-change-since-for-migration-list
Change-Id: I7e01f95d7173d9217f76e838b3ea71555151ef56
2018-01-10 14:02:53 -05:00
Lajos Katona 39f9ef719e Deduplicate service status notification samples
This patch refactors the sample files of service-create, service-delete
and service-update notifications to use a common ServiceStatusPayload
sample data.

Change-Id: I708ce5423806d2913e77abbe338aec970a5009dc
2018-01-10 15:29:28 +00:00
Stephen Finucane 5622a9082a Fix typo in release note
The option is '[pci]alias' and there can be many of them.

bp share-pci-between-numa-nodes

Change-Id: I4875b54da5429971b73aef5ca4002c04c5a47a54
2018-01-10 10:07:17 +00:00
Zuul 90a92d33ed Merge "Use volume shared_targets to lock during attach/detach" 2018-01-09 21:33:41 +00:00
Zuul f94c728bdd Merge "libvirt: use 'host-passthrough' as default on AArch64" 2018-01-09 21:23:38 +00:00
Yikun Jiang 55f59172ee Add cross cell sort support for get_migrations
These will be used by migrations cross cell list.

We can get migrations objects with limit/marker/sort params from
multiple cell using get_migrations_sorted.

Change-Id: I2a6d21752b385ebd1e95ec9fe3d18b78a4017bb3
2018-01-09 15:34:03 -05:00