Commit Graph

54482 Commits

Author SHA1 Message Date
Stephen Finucane 2398b78df5 Remove nova-consoleauth
Obliterate all references to the aforementioned service. This mostly
consists of removing the core service and any references to the now
removed '[workarounds] enable_consoleauth' configuration option.

Part of blueprint remove-consoleauth

Change-Id: I0498599fd636aa9e30df932f0d893db5efa23260
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: Icfc175c49a1fc650d1c9ad06b77209a70c6386db
2019-07-05 15:04:47 +00:00
Stephen Finucane bedaeab074 nova-status: Remove consoleauth workaround check
We're going to be removing the configuration option so the advice from
this check will no longer make sense.

Part of blueprint remove-consoleauth

Change-Id: I5c7e54259857d9959f5a2dfb99102602a0cf9bb7
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-25 11:33:03 +01:00
Stephen Finucane 97aa7bb85a xvp: Remove use of '_LI' marker
We don't translate logs anymore.

Change-Id: Ic1f2b3787315504fd072a34273c42dd803a3899d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-19 10:04:45 +01:00
Stephen Finucane e9a27f7c73 xvp: Start using consoleauth tokens
This service is EOL and likely unused in the wild. However, it was still
using the nova-consoleauth service for authentication. Correct this,
allowing us to remove nova-consoleauth.

Part of blueprint remove-consoleauth

Change-Id: If14244559b68276eb1e43c59c821978ec591ae14
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-19 10:04:45 +01:00
Zuul a5cf4ae938 Merge "Clean up NumInstancesFilter related docs" 2019-06-19 03:21:25 +00:00
Zuul ce6e0ef6f1 Merge "Log quota legacy method warning only if counting from placement" 2019-06-19 01:45:33 +00:00
Zuul 65ffb498b8 Merge "tests: Stop starting consoleauth in functional tests" 2019-06-18 23:21:51 +00:00
Zuul ed8412f702 Merge "docs: Remove references to nova-consoleauth" 2019-06-18 23:21:42 +00:00
Zuul 6c411d98f0 Merge "Validate requested host/node during servers create" 2019-06-18 23:21:31 +00:00
Zuul fa37cf2e26 Merge "Deprecate RetryFilter" 2019-06-18 20:19:08 +00:00
Zuul 9facbd262a Merge "Fix enabled_filters default value in admin config docs" 2019-06-18 19:24:58 +00:00
Zuul fcda648667 Merge "Add Migration.cross_cell_move and get_by_uuid" 2019-06-18 19:24:50 +00:00
zhu.boxiang cf670873ad Validate requested host/node during servers create
This change adds a method to validate a requested host and/or
hypervisor_hostname(node) during servers create. We are simply
checking for existence of the resource, so the host is validated
for the HostMapping and the node is validated by checking for
the related resource provider in the placement service.

Part of Blueprint: add-host-and-hypervisor-hostname-flag-to-create-server

Change-Id: I009761162817c6ed1035d2208605268dc82d430f
2019-06-18 17:21:28 +08:00
Zuul a628d2f09a Merge "docs: remove the RamFilter from example" 2019-06-17 23:45:50 +00:00
Zuul a682e2f8c0 Merge "Don't rely on SQLAlchemy collections magically initializing __dict__" 2019-06-17 23:45:43 +00:00
Matt Riedemann b4659c9fc3 Clean up NumInstancesFilter related docs
This is a follow up to b129511050
which changes the code block in the docs to python and also
cleans up some of the NumInstancesFilter documentation, specifically
removing wording around "running" instances because the filter
does not care about state, only the number of instances reported
against a host - they could be stopped/paused/etc.

Change-Id: I7cdf79f21415fbf799fa5ad586f1b8063afed272
2019-06-17 17:33:59 -04:00
melanie witt 818c31f96e Log quota legacy method warning only if counting from placement
The log warning message is being emitted unconditionally and should be
limited to only when CONF.quota.count_usage_from_placement = True.

This fixes the issue and adds missing unit test coverage that would
have caught it.

Closes-Bug: #1833130

Change-Id: I00ee0bd99c4f31a2b73fc69373fefb56740f5425
2019-06-17 21:31:53 +00:00
Matt Riedemann 257ef9573f Deprecate RetryFilter
Since blueprint return-alternate-hosts in Queens, the scheduler
returns a primary selected host and some alternate hosts based
on the max_attempts config option. The only reschedules we have
are during server create and resize/cold migrate. The list of
alternative hosts are passed down from conductor through compute
and back to conductor on reschedule and if conductor gets a list
of alternate hosts on reschedule it will not call the scheduler
again. This means the RetryFilter is effectively useless now since
it shouldn't ever filter out hosts on the first schedule attempt
and because we're using alternates for reschedules, we shouldn't
go back to the scheduler on a reschedule. As a result this change
deprecates the RetryFilter and removes it from the default list
of enabled filters.

Change-Id: Ic0a03e89903bf925638fa26cca3dac7db710dca3
2019-06-17 15:27:11 -04:00
Matt Riedemann 7c9641266f Fix enabled_filters default value in admin config docs
This fixes a couple of places in the admin scheduler config
docs that were listing out the enabled_filters default value
incorrectly because the ComputeFilter was missing. Rather than
try to keep the docs mirrored with the actual default value,
this change references the config option in one spot and avoids
listing the defaults in another.

Change-Id: I837aefcd37556a7b66b523529c5ca1f3dee8ac7f
Closes-Bug: #1833120
2019-06-17 15:24:24 -04:00
Zuul ea7293c7be Merge "Ensure controllers all call super" 2019-06-17 16:26:19 +00:00
Stephen Finucane 8f6de35636 tests: Stop starting consoleauth in functional tests
This hasn't been needed since we moved console authentication to the
database in Rocky.

Part of blueprint remove-consoleauth

Change-Id: Ie5e7d70f9d6af77edd22756128937f06d0b961a9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-17 15:18:31 +01:00
Stephen Finucane 009fd0f35b docs: Remove references to nova-consoleauth
We're going to remove all the code, but first, remove the docs.

Part of blueprint remove-consoleauth

Change-Id: Ie96e18ea7762b93b4116b35d7ebcfcbe53c55527
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-17 15:18:31 +01:00
Zuul c27809d50d Merge "Add 'path' query parameter to console access url" 2019-06-17 12:14:35 +00:00
Zuul e0d3893f55 Merge "Fix :param: in docstring" 2019-06-17 05:25:45 +00:00
yan97ao b129511050 docs: remove the RamFilter from example
The RamFilter has deprecated since the stein release. We can show
another simple filter class here.

Change-Id: I15a935e80f6656c96c1e208746af1c89bf37b670
2019-06-17 00:16:57 +08:00
Zuul 232db9b885 Merge "Always Set dhcp_server in network_info" 2019-06-16 08:03:57 +00:00
Zuul 2e6650fcec Merge "Summarize output of sample configuration generator" 2019-06-16 07:30:03 +00:00
Stephen Finucane db1789e82b Ensure controllers all call super
Currently some do and some don't. Do it by default as intended. We also
remove the 'view_builder' argument from the base 'Controller.__init__'
function since nothing was actually setting this.

Change-Id: Ic0b16608078e4545f546509df94caba3166ed6e2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-06-15 16:40:00 +01:00
Zuul 3ea5c5ee9f Merge "Add a test for the _joinedload_all helper" 2019-06-15 09:37:13 +00:00
Zuul 2074b5413e Merge "Replace joinedload_all with joinedload" 2019-06-15 09:37:05 +00:00
Zuul 6ea8094aa6 Merge "Remove 'InstanceUnknownCell' exception" 2019-06-15 09:29:35 +00:00
Zuul 51ed40a6a5 Merge "Add reno for removed cells v1 policies" 2019-06-15 09:21:22 +00:00
Zuul 86e8d6e731 Merge "Remove nova.compute.*API() shims" 2019-06-15 09:21:12 +00:00
Zuul a7af2c97ef Merge "filters: Stop handling cells v1" 2019-06-15 09:21:03 +00:00
Zuul 89e32e2b85 Merge "Stop passing 'delete_type' to 'terminate_instance'" 2019-06-15 09:20:42 +00:00
Zuul 5b83434c51 Merge "Stop passing 'kwargs' to 'rebuild_instance'" 2019-06-15 09:06:13 +00:00
Zuul c2b5ac9b8e Merge "Document restrictions for moving servers between availability zones" 2019-06-15 00:15:10 +00:00
Zuul f2da511352 Merge "Update quota known issues docs" 2019-06-14 22:08:06 +00:00
Zuul e4ebf2b6b8 Merge "Hacking N363: in (not_a_tuple)" 2019-06-14 22:07:58 +00:00
Zuul d59835d4eb Merge "Handle PortLimitExceeded in POST /servers/{server_id}/os-interface" 2019-06-14 22:07:49 +00:00
Zuul af4cd78e85 Merge "Modifying install-guide to include public endpoint for identity service" 2019-06-14 21:53:31 +00:00
Zuul 5dc0c2362a Merge "Mock time.sleep() in unit tests" 2019-06-14 21:53:17 +00:00
Zuul 149c61b782 Merge "Add functional recreate test for bug 1829479 and bug 1817833" 2019-06-14 21:53:06 +00:00
Zuul fbf5028899 Merge "Fix invalid privsep.readpty test" 2019-06-14 21:52:56 +00:00
Zuul 3e4701a237 Merge "Make RequestContext(instance_lock_checked) fail" 2019-06-14 21:52:46 +00:00
Mohammed Naser 9606c80402 Add 'path' query parameter to console access url
Starting in noVNC v1.1.0, the token query parameter is no longer
forwarded via cookie [1]. We must instead use the 'path' query
parameter to pass the token through to the websocketproxy [2].
This means that if someone deploys noVNC v1.1.0, VNC consoles will
break in nova because the code is relying on the cookie functionality
that v1.1.0 removed.

This modifies the ConsoleAuthToken.access_url property to include the
'path' query parameter as part of the returned access_url that the
client will use to call the console proxy service.

This change is backward compatible with noVNC < v1.1.0. The 'path' query
parameter is a long supported feature in noVNC.

Co-Authored-By: melanie witt <melwittt@gmail.com>

Closes-Bug: #1822676

[1] https://github.com/novnc/noVNC/commit/51f9f0098d306bbc67cc8e02ae547921b6f6585c
[2] https://github.com/novnc/noVNC/pull/1220

Change-Id: I2ddf0f4d768b698e980594dd67206464a9cea37b
2019-06-14 18:01:24 +00:00
Arnaud Morin c7f572d65b Always Set dhcp_server in network_info
If enable_dhcp is set on subnet, but, for
some reason neutron did not have any DHCP port yet, we still
want the network_info to be populated with a valid dhcp_server
value. This is mostly useful for the metadata API (which is
relying on this value to give network_data to the instance).

This will also help some providers which are using external
DHCP servers not handled by neutron.
In this case, neutron will never create any DHCP port in the
subnet.

Also note that we cannot set the value to None because then the
value would be discarded by the metadata API.
So the subnet gateway will be used as fallback.

Change-Id: Ie2cd54c159ea693e48e00d0ca3b0ca5a468d79cb
Signed-off-by: Arnaud Morin <arnaud.morin@corp.ovh.com>
2019-06-14 16:44:39 +00:00
Dan Smith 4ff8ca8f64 Add a test for the _joinedload_all helper
This just uses mock to make sure _joinedload_all() is doing
what we expect.

Change-Id: Ifc352eb3accdda309ea941ca9f8389817090056a
2019-06-14 08:54:17 -07:00
Takashi NATSUME 658e35cad4 Replace joinedload_all with joinedload
Replace sqlalchemy.orm.joinedload_all with
sqlalchemy.orm.joinedload called within a
new method _joinedload_all that makes multiple
calls to orm.joinedload.

'joinedload_all' has been deprecated since
sqlalchemy version 0.9.0, and now makes a
lot of warning noises.

Change-Id: I7a30efa8ceb21e02e71d8c15bf979bb66470ef91
Closes-Bug: #1832164
2019-06-14 16:28:38 +01:00
Zuul 155da8f71f Merge "Fix a warning about flags in an expression string" 2019-06-14 07:45:31 +00:00