Commit Graph

50973 Commits

Author SHA1 Message Date
Matt Riedemann 9f48aee9b0 Remove deprecated monkey_patch config options
These were deprecated in Queens:

  Id793ac2c5cdc5dc473f95eac53b77617a1e389da

And can now be removed.

Change-Id: I27518d1154ec09c57700905bc58ae6a3ce1d8049
2018-05-16 11:40:41 -04:00
Zuul 3693caa541 Merge "We don't need utils.trycmd any more." 2018-05-16 14:45:44 +00:00
Zuul 6cab2f9ef4 Merge "Move image conversion to privsep." 2018-05-16 14:45:34 +00:00
Zuul 9706d89d52 Merge "Fix HTTP500 error of changes-since on v2.0 API" 2018-05-16 00:31:45 +00:00
Zuul 52b853660a Merge "Add retrying to requirements.txt" 2018-05-16 00:08:34 +00:00
Zuul 9ed50d46a3 Merge "Remove mox in tests/unit/api/*/test_volumes.py" 2018-05-15 20:56:34 +00:00
Matt Riedemann 9a80272307 Add retrying to requirements.txt
The nova.virt.powervm.media module imports this so we
should include it in our runtime requirements list.

Change-Id: I818b8957d791cbfbae1fc33cc296ebfb8c6a6651
2018-05-15 16:49:41 -04:00
Zuul 2fd7ae67a2 Merge "Add INVENTORY_INUSE to DELETE /rp/{u}/inventories" 2018-05-15 17:16:52 +00:00
Zuul fa49ce930e Merge "Update auth_url in install docs" 2018-05-15 17:10:58 +00:00
Zuul 8d5a68944a Merge "placement: Fix HTTP error generation" 2018-05-15 15:46:20 +00:00
Zuul b2798b7c4d Merge "trivial: Explain how the marker works for instance-cell mapping" 2018-05-15 15:12:23 +00:00
Zuul bf3b7188cb Merge "__str__ methods for RequestGroup, ResourceRequest" 2018-05-15 14:49:22 +00:00
Michael Still 54ebc43058 We don't need utils.trycmd any more.
Its only used in one place, let's just call processutils
directly instead.

Change-Id: Iff03a1b6889133ca938190a49fbf0b6b18b31c96
blueprint: hurrah-for-privsep
2018-05-15 10:09:06 -04:00
Michael Still e38caa2de0 Move image conversion to privsep.
Following a similar pattern to previous changes, move calls to
qemu-img to convert between image formats to use privsep.

Change-Id: I2c3df909a783e1480d3ab4ca10b34b84ac9e4b5f
blueprint: hurrah-for-privsep
2018-05-15 10:09:01 -04:00
caoyuan 17105cce3a Update auth_url in install docs
1. Beginning with the Queens release, the keystone install guide
recommends running all interfaces on the same port. This patch
updates the install guide to reflect that change.
2. update the deprecated neutron auth options

Change-Id: I5c0a6389b759153bae06fa43846f03ac083c3db4
2018-05-15 13:06:07 +00:00
Eric Fried 6c7b947814 Add INVENTORY_INUSE to DELETE /rp/{u}/inventories
Change I9a833aa35d474caa35e640bbad6c436a3b16ac5e added a custom error
code framework to the placement API and, as an example of a specific
error code, created INVENTORY_INUSE ('placement.inventory.inuse') for
PUT /resource_providers/{uuid}/inventories.  We have essentially the
same error condition for DELETE /resource_providers/{uuid}/inventories,
so this change set adds the same error code there.

Change-Id: I52715205e607cef5deee1351099725885b282c08
2018-05-15 07:52:45 -05:00
Balazs Gibizer 90d2dbedef placement: Fix HTTP error generation
The traits and the inventories wsgi handler inserted the detailed error
message to the webob.exc.HTTPXXX exceptions via the 'explanation' kwarg.
This caused that the generated error messages does not contain the generic
explanation of the HTTP error code just the passed in explanation text.
The rest of the placement API uses first positional arg of the exception
classes to pass in the extra details. Having this inconsistency makes
really hard to print proper error messages from the osc-placement
plugin.

This patch removes the incosistency by changing the code to use the
positional arg.

The change does not affect nova.scheduler.client.report._RE_INV_IN_USE
regex usage as that regex applied via re.search() and this change only
adds a new sentece to the message.

Change-Id: I196c2e3dabcbf0564c1ca0bd4870dc2df3efc836
Close-Bug: #1771325
2018-05-15 13:44:59 +02:00
Zuul ae131868f7 Merge "libvirt: Report the virtual size of RAW disks" 2018-05-15 09:08:28 +00:00
Zuul ee823d8df8 Merge "Added ability to configure default architecture for ImagePropertiesFilter" 2018-05-15 05:26:46 +00:00
Zuul dcdcb27360 Merge "add lower-constraints job" 2018-05-15 01:12:25 +00:00
Zuul c6e82f3da5 Merge "XenAPI: Pass expected return codes to resize2fs" 2018-05-15 00:03:17 +00:00
Zuul 863f6ec9a6 Merge "Remove '_apply_instance_name_template'" 2018-05-15 00:03:10 +00:00
Zuul 2c6494b11a Merge "Make scheduler client allow multiple member_of query parameters" 2018-05-15 00:02:30 +00:00
Takashi NATSUME 0aba56ce30 Remove mox in tests/unit/api/*/test_volumes.py
Replace mox with mock or stub_out in
nova/tests/unit/api/openstack/compute/test_volumes.py.

Change-Id: I9acc2e4d6c57ea0f45ba161116993d9f1a0e1e9f
Implements: blueprint mox-removal
2018-05-14 22:22:37 +00:00
Mohammed Naser aa5b1326c8 Added ability to configure default architecture for ImagePropertiesFilter
When using ImagePropertiesFilter with multiple architectures inside the
same deployment, it is possible that images can be uploaded without the
hw_architecture property defined.

This results in behaviour where the instance could be scheduled on any
type of hypervisor, resulting in an instance that will successfully
transition to ACTIVE but never properly run because of the difference
in architecture.

This makes the ImagePropertiesFilter problematic as most images are
generally uploaded without the architecture property set because
most documentation does not encourage doing that.

The addition of this flag allows to make using the filter possible
because it allows the deployer to assume a default architecture if
the user did not supply one (assuming it would be the most common
architecture in their deployment, such as x86_64) yet if the user
wants a more specific architecture, they can do it in their image
properties.

In order to avoid a circular import loop, the references to the
architecture field have been moved to a seperate module so that
they can be properly and cleaned imported inside configuration.

Change-Id: Ib52deb095028e93619b93ef9e5f70775df2a403a
Closes-Bug: #1769283
2018-05-14 16:55:13 -04:00
Eric Fried 554ae0789d __str__ methods for RequestGroup, ResourceRequest
To make prettier log messages and aid debugging, add __str__ methods to
nova.api.openstack.placement.lib.RequestGroup and
nova.scheduler.utils.ResourceRequest and use the latter (which uses the
former) in the log message in
nova.scheduler.client.report.SchedulerReportClient.get_allocation_candidates

Change-Id: I80b2427fabc4004a9a8ce1e45fc46031ce9aadda
2018-05-14 14:56:12 -05:00
Zuul 87efb65160 Merge "Suppress UUID warning in map_instance unit tests" 2018-05-14 18:07:10 +00:00
Doug Hellmann e95af3f91c add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Ic28558ee6481d49a9b4e5dc2c4182504e330448f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Co-Authored-by: Eric Fried <efried@us.ibm.com>
Co-Authored-by: Jim Rollenhagen <jim@jimrollenhagen.com>
2018-05-14 16:47:07 +00:00
Bob Ball eec0fe59ff XenAPI: Pass expected return codes to resize2fs
None is not tolerated by ProcessUtils, therefore make sure that [0] is passed as the
expected return code

Change-Id: I7d6335633479dfd7715444ef4aefc85ed41b8fa3
Closes-Bug: #1771137
2018-05-14 16:27:56 +01:00
Dan Smith ac114ecc63 Make scheduler client allow multiple member_of query parameters
This implements support for placement version 1.24, which allows multiple
member_of query parameters to allocation_candidates.

Related to blueprint alloc-candidates-member-of

Change-Id: Id7eecbfe53f3a973d828122cf0149b2e10b8833f
2018-05-14 07:57:27 -07:00
Balazs Gibizer 0c20743cb3 Suppress UUID warning in map_instance unit tests
nova-manage cells_v2 map_instances call uses a non canonical UUID
serialization to store the instance marker in the DB. The
oslo.versionedobjects UUIDField emits a warning. A later patch would
like to turn this warning to an error during the unit and functional
test to avoid adding new violations.

As the underlying DB schema is not violated this patch proposes to
suppress the warning in the affected unit tests.

Change-Id: I5b11b9df26e4e38516b5674e0e6c1fc79527129b
2018-05-14 13:18:29 +02:00
Zuul 36345f34c4 Merge "Add test_set_device_mtu_default back in" 2018-05-12 17:16:06 +00:00
Zuul 4ddd81032d Merge "Move set_vf_interface_vlan to the new utility module." 2018-05-12 17:16:00 +00:00
Zuul 0d916debcc Merge "Add random sleep between retry calls to placement" 2018-05-12 12:12:25 +00:00
Zuul 751fc14069 Merge "Remove mox in test_compute_api.py (2)" 2018-05-12 02:27:47 +00:00
Zuul d60fee1c48 Merge "Remove mox in unit/virt/xenapi/test_vmops.py" 2018-05-12 02:27:40 +00:00
Zuul 98c189c9da Merge "Remove mox in test_xenapi.py (2)" 2018-05-12 02:27:32 +00:00
Zuul 472495de96 Merge "Don't reschedule on RequestedVRamTooHigh errors" 2018-05-12 02:27:27 +00:00
Zuul 45d48d6cd2 Merge "Remove remaning log translation in scheduler" 2018-05-12 02:19:03 +00:00
Zuul 0c7a111271 Merge "Flexibly test keystonmiddleware in placement stack" 2018-05-12 01:18:55 +00:00
Zuul ed646ac55d Merge "update scheduler to use image-traits" 2018-05-11 22:34:20 +00:00
Zuul 3b21bc11fa Merge "Address feedback from instance_list smart-cell behavior" 2018-05-11 22:00:41 +00:00
Zuul a2de9c7d59 Merge "Fix irrelevant-files in nova-dsvm-multinode-base" 2018-05-11 20:53:02 +00:00
Matt Riedemann cd53a181be Don't reschedule on RequestedVRamTooHigh errors
The libvirt driver validates the hw_video_ram image property,
if specified, and the flavor extra spec "hw_video:ram_max_mb"
is set. If validation fails, the libvirt driver raises
RequestedVRamTooHigh which is not handled explicitly in
ComputeManager._build_and_run_instance so it will result in
a RescheduledException to another compute to retry the spawn
but that will always fail because this isn't something that
is per-compute host.

This change adds the error handling in _build_and_run_instance
so that we'll fail and abort the build and not reschedule.

Long-term, this validation should be moved into the API code
since it's not specific to a compute host and would be user
error that should result in a 400 response.

Change-Id: I93b409ca2b7b36400759ee9d2cd5b71c6df186ab
Partial-Bug: #1770726
2018-05-11 14:44:47 -04:00
Zuul 268b4c5796 Merge "Add connection_parameters to list of items copied from database" 2018-05-11 18:39:13 +00:00
Zuul bfcbfdf916 Merge "libvirt: always pass emulator threads policy" 2018-05-11 18:36:12 +00:00
Chris Dent 46d919c11b Flexibly test keystonmiddleware in placement stack
In change I524c93d30607ea6ab70de92ceea207ee77f34c25 keystonemiddleware
adjusted how the value of the Keystone uri is quoted when sending a
www-authenticate header. It went from using a single quote to double.
Double is more correct.

The existing version of the test changed in this commit relied on the
single quote to verify that a URL set in config would be used by the
middleware appropriately. Now, instead of one exact match test, two
in-string tests are used.

Change-Id: Ie9d1df419f2bdfa1d658f5f64ea9b7285de7b9b7
Closes-Bug: #1770718
2018-05-11 19:12:40 +01:00
Ken'ichi Ohmichi 359ca26547 Fix HTTP500 error of changes-since on v2.0 API
The experimental job legacy-tempest-dsvm-nova-v20-api failed at the gate
always, because test_list_servers_by_changes_since_invalid_date touched
less validation part on the API.
This patch fixes it.

Change-Id: I0284a83a92d39d211af6108ed6cae2d8fe19da8f
Close-Bug: #1770705
2018-05-11 10:52:06 -07:00
Lee Yarwood 016986f470 libvirt: Report the virtual size of RAW disks
If642e51a4e186833349a8e30b04224a3687f5594 started to correctly report
the actual size of preallocated file based disks but missed that this
value was later used as the virtual disk size for RAW disks.

This is an issue as nova.virt.libvirt.utils.create_image creates these
disks as sparse files with a reported actual size much smaller than the
virtual size. During block based LM this then results in disks
on the destination being created with a much smaller virtual size than
the disk should have leading to errors during the transfer.

Closes-Bug: #1770640
Change-Id: I464bc2b88123a012cd12213beac4b572c3c20a56
2018-05-11 18:11:13 +01:00
Zuul 1da469010f Merge "XenAPI: deprecate the config for image handler class path" 2018-05-11 16:36:24 +00:00