Commit Graph

48508 Commits

Author SHA1 Message Date
naichuans 693ace79fb xenapi: cached images should be cleaned up by time
For xenapi driver, there needs to be some way to delete cached
images based on when they were created. add an optional arg to
control delete operation.

Change-Id: I24fc45e989aa951aab55a261fce77f7e3667d988
Closes-bug: 1481689
2017-10-23 16:29:16 +00:00
Zuul a067f8c646 Merge "Move xend existence probes to privsep." 2017-10-23 15:04:33 +00:00
Zuul c65bbf4ed6 Merge "Move shred to privsep." 2017-10-23 15:04:22 +00:00
Zuul 32f7ea9fd0 Merge "propagate OSError to MigrationPreCheckError" 2017-10-23 10:51:03 +00:00
Michael Still 4646c5cbc5 Move xend existence probes to privsep.
The cycle repeats.

Change-Id: Ia8ff5f243ee3c32bb7406e8efe31c7e81578e775
blueprint: hurrah-for-privsep
2017-10-23 09:36:35 +11:00
Michael Still 64036a68c2 Move shred to privsep.
The same pattern once again, this time for shred.

Change-Id: Ib6cf64d18f2ebde34030cc5b6a142af1dbf75c90
blueprint: hurrah-for-privsep
2017-10-23 09:36:28 +11:00
Zuul 02dce6fc43 Merge "conf: Remove deprecated 'null_kernel' opt" 2017-10-21 05:18:24 +00:00
Zuul d3a6ca9003 Merge "Trivial: fix spelling of allocation_request" 2017-10-21 03:23:38 +00:00
Zuul 2463c962ee Merge "Adds 'sata' as a valid disk bus for qemu and kvm hypervisors" 2017-10-21 00:55:44 +00:00
Stephen Finucane 694fa59338 conf: Remove deprecated 'null_kernel' opt
This flag was deprecated in a previous cycle. The flag and any uses of
it can now be removed.

Change-Id: Ie26f34b4f435eeb378b88f0c48f844b511696eb9
2017-10-21 00:23:51 +00:00
Zuul fb4e6900e1 Merge "Remove doc todo related to bug/1506667" 2017-10-20 22:39:42 +00:00
Sumedh Degaonkar c1c611bcd7 Adds 'sata' as a valid disk bus for qemu and kvm hypervisors
Reasoning:
- Setting custom properties on glance images allows us to select the
type of disk bus e.g. VIRTIO/IDE/SCSI.
Although SATA disk bus works perfectly for qemu/kvm, it is not allowed
due to a check in virt/libvirt/blockinfo.py : is_disk_bus_valid_for_virt
- some Linux (custom) images require use of SATA bus rather than any
other that seems to be allowed.

Change-Id: Ie32ff7acf31d80d4fc1adbeadaaf30a886d10e49
Closes-Bug: #1686136
2017-10-20 17:03:10 -04:00
jichenjc cb565d9bad propagate OSError to MigrationPreCheckError
OSError will lead instance to ERROR state, change to
MigrationPreCheckError will make the instance status not changed.

Also, modify some test cases to make unit test easier

Closes-Bug: 1694636

Change-Id: I3286c32ca205ffd2d5d1aaab88cc96699476e410
2017-10-20 16:46:15 -04:00
Zuul aa4da3ff61 Merge "console: introduce basic framework for security proxying" 2017-10-20 20:21:15 +00:00
Ed Leafe ac58181ced Trivial: fix spelling of allocation_request
Reviews of other patches in this series raised the criticism that the
term 'allocation request' was being used, when the proper name for it
should be 'allocation_request'. I've broken these simple corrections
into a separate patch so as not to clutter up the other patches.

Blueprint: return-alternate-hosts

Change-Id: Idd2b9e3b0000fa8eeb2e0e9c3337b1d99b13ada7
2017-10-20 19:38:17 +00:00
Zuul 9058ed951f Merge "Move lvm handling to privsep." 2017-10-20 16:44:25 +00:00
Zuul 11c1d84eb1 Merge "Cleanup mount / umount and associated rmdir calls" 2017-10-20 16:41:55 +00:00
Zuul 8d21d71100 Merge "[Trivial] Fix up a docstring" 2017-10-19 21:50:39 +00:00
Zuul af4703cb38 Merge "Update live migration to use v3 cinder api" 2017-10-19 20:08:21 +00:00
Zuul 850b126c5e Merge "Add attachment_get to refresh_connection_info" 2017-10-19 20:08:13 +00:00
Zuul 7a431c69bb Merge "Pick ironic nodes without VCPU set" 2017-10-19 20:08:06 +00:00
Zuul 2e73ae23ed Merge "Add 'delete_host' command in 'nova-manage cell_v2'" 2017-10-19 19:54:14 +00:00
Eric Fried eced1e95a9 [Trivial] Fix up a docstring
The nova.cmd.status.UpgradeCommands._check_placement docstring claimed
that the method checks that compute nodes are registered in placement.
It doesn't.  Removed that sentence.

Change-Id: Id8c99f3c8410aed43a77faeebb1f1eee53b24487
2017-10-19 11:49:15 -05:00
Zuul 25afc31b20 Merge "Keep updating allocations for Ironic" 2017-10-19 04:58:28 +00:00
Zuul d70325d8ce Merge "libvirt: add method to configure migration speed" 2017-10-19 03:36:53 +00:00
Ildiko Vancsa 0e9d330f49 Add attachment_get to refresh_connection_info
The new Cinder attach/detach flow stores the connection_info for each
attachment. This patch adds the use of attachment_get to
refresh_connection_info as opposed to using initialize_connection in
case the new flow has been used to create the attachment.

Co-authored-by: Matt Riedemann <mriedem.os@gmail.com>

Change-Id: I9a62b915fc0b9406613c14434793eb52e602df1e
2017-10-18 23:10:38 -04:00
Takashi NATSUME f4f17b364e Add 'delete_host' command in 'nova-manage cell_v2'
Add 'delete_host' command in 'nova-manage cell_v2'.
Add an optional 'force' option in 'nova-manage cell_v2 delete_cell'.
If specifying the 'force' option, a cell can be deleted
even if the cell has hosts.

Change-Id: I8cd7826c2c03687c6b85731519778f09d542b236
Closes-Bug: #1721179
2017-10-19 01:31:02 +00:00
Zuul 8b238774dd Merge "Move restart_compute_service to a common place" 2017-10-18 22:07:52 +00:00
Zuul 5a52d86185 Merge "docs: Explain the flow of the "serial console" feature" 2017-10-18 21:41:18 +00:00
Zuul 7389c4145d Merge "Send Allocations to spawn" 2017-10-18 21:41:12 +00:00
John Garbutt 5c2b8675e3 Keep updating allocations for Ironic
When ironic updates the instance.flavor to require the new custom
resource class, we really need the allocations to get updated. Easiest
way to do that is to make the resource tracker keep updating allocations
for the ironic virt driver. This can be dropped once the transition to
custom resource classes is complete.

If we were not to claim the extra resources, placement will pick nodes
that already have instances running on them when you boot an instance
with a flavor that only requests the custom resource class. This should
be what all ironic flavors do, before the upgrade to queens is
performed.

Closes-Bug: #1724589

Change-Id: Ibbf65a8d817d359786abcdffa6358089ed1107f6
2017-10-18 13:14:35 -07:00
Zuul 682fa1d10f Merge "placement: set/check if inventory change in tree" 2017-10-18 18:54:19 +00:00
Markus Zoeller 19f0acd960 docs: Explain the flow of the "serial console" feature
The serial console feature is a little unknown and it's a little
confusing at first. This change adds a doc to explain this better.

Change-Id: Ia5a336694aec95db29545e31b2c6b364dd825a15
2017-10-18 13:39:57 +00:00
Eric Fried 76d30c8a81 Send Allocations to spawn
This change adds a new 'allocations' kwarg to the
nova.virt.driver.ComputeDriver.spawn method and its overrides.  The
value is the 'allocations' member of the dict returned from GET
/allocations/{instance_uuid}, representing the resources allocated to
the instance from the scheduler via placement.

This provides the virt driver with a way to know exactly which inventory
has been allocated to an instance by placement, from which resource
providers.  Previously, virt drivers would process the flavor to glean
this information.  This works fine as long as there's one monolithic
resource provider - the compute host - providing all the inventory in
a known fashion.  However, as we expand to using nested and shared
resource providers, it becomes necessary for the virt driver to know
that e.g. CPU inventory has been allocated from a specific NUMA node; or
e.g. an SR-IOV VF has been allocated from a specific PF.  Placement
allows such allocations to be represented generically; this change
is how virt is made aware of the same.

Change-Id: I00eab47edf1150788777300680e853a872c1db40
2017-10-18 06:43:57 -05:00
Zuul fce56ce8c0 Merge "Modernize set_vm_state_and_notify" 2017-10-18 10:55:21 +00:00
Zuul ae27911025 Merge "Make etree.tostring() emit unicode everywhere" 2017-10-18 10:55:15 +00:00
Zuul 7fedb5b11e Merge "Fix binary name" 2017-10-18 10:55:09 +00:00
Zuul 90213e4f84 Merge "Update "SHUTOFF" description in API guide" 2017-10-18 10:55:03 +00:00
Zuul 5b6a76ddad Merge "api-ref: fix server status values in GET /servers docs" 2017-10-18 10:54:57 +00:00
Zuul cccb086dce Merge "Remove unnecessary BDM destroy during instance delete" 2017-10-18 10:54:46 +00:00
Michael Still 8dff381426 Move lvm handling to privsep.
Following the same pattern as the others.

Change-Id: I69e95d07ba9a67cdd40649b0d1a2d789171d9984
blueprint: hurrah-for-privsep
2017-10-18 17:53:38 +11:00
Michael Still 7ad72b0922 Cleanup mount / umount and associated rmdir calls
Add a new filesytem mounting helper in privsep, and then start
moving things across to it. This currently implements mount and
unmount. We get to cleanup some rmdir calls while we're at it
which is nice as well.

I've added an upgrade note mentioning that we no longer ignore
the value of stderr from mount calls, as requesed in code review.

Change-Id: Ib5e585fa4bfb99617cd3ca983674114d323a3cce
blueprint: hurrah-for-privsep
2017-10-18 17:52:58 +11:00
Steve Noyes 99c8168b93 Update live migration to use v3 cinder api
With cinder v3, the new live migration flow is to
create new volume attachments on the destination host
during pre_live_migration, and then after a successful
live migration, delete the attachments on the source host.
If the live migration fails, the attachments on the
destination host will be deleted.

A new dictionary, old_vol_attachment_ids, is added (without
persistence) to migrate_data. This will store the original
attachment_ids of the source host's attachments. If the migrate fails,
the attachment_id in the bdm will be replaced with the old
attachment_id.

An existing unit test, test_pre_live_migration_handles_dict, is
updated to avoid an exception thrown by the new code. A fake
instance is now used instead of a simple dict.

6 new unit tests are added.

Partially Implements: blueprint cinder-new-attach-apis

Depends-On: I9a62b915fc0b9406613c14434793eb52e602df1e

Change-Id: I0bfb11296430dfffe9b091ae7c3a793617bd9d0d
2017-10-17 15:26:57 -04:00
Zuul e11a8687ae Merge "fix cleaning up evacuated instances" 2017-10-17 18:08:14 +00:00
Jay Pipes ddaff6dc5d placement: set/check if inventory change in tree
We add a has_inventory_changed() and an update_inventory() method to
the nova.compute.provider_tree.ProviderTree object. These methods will
be used by both the resource tracker and the virt driver when they need
to set inventory information for a particular resource provider.

Change-Id: Ieea566e273fd26c8321e1183ffd0e55aa6b00c55
blueprint: nested-resource-providers
2017-10-17 12:57:03 +00:00
Zuul 5e4c98a58f Merge "Fix nova-manage commands that do not exist" 2017-10-17 03:33:41 +00:00
Zuul 06b8ebd56c Merge "doc: Fix command output in scheduler document" 2017-10-17 01:56:17 +00:00
Zuul 3755b39468 Merge "Regenerate context during targeting" 2017-10-17 00:42:32 +00:00
Zuul 4668026a56 Merge "doc: Rework man pages" 2017-10-16 19:05:59 +00:00
Balazs Gibizer 63eb7fee1b Move restart_compute_service to a common place
Restarting a compute service properly in the functional test environment
is tricky. During a recent bugfix a util function was introduced to do
the restart. This patch moves the util to the base class and spreads
the usage of it to more functional tests to make them more realistic.

Change-Id: I17f67a02b27a90658df48856963ea3fb327e81dc
2017-10-16 19:13:50 +02:00