Commit Graph

47962 Commits

Author SHA1 Message Date
Jenkins f9505e9734 Merge "Remove the section about extensions from the API concept doc" 2017-08-26 00:12:56 +00:00
Matt Riedemann 27cd4dd70b Change default for [notifications]/default_publisher_id to $host
The default used in code for CONF.notifications.default_publisher_id
is CONF.host, which is a free-form StrOpt.

In an upcoming change, the "my_ip" option is going to be changed from
a StrOpt to an IPOpt, so we made the default value change for
the default_publisher_id option before that.

Change-Id: Ia85130f66bd5a60097e8967064559fd0962d06fd
Closes-Bug: #1713150
2017-08-25 18:54:35 -04:00
Matt Riedemann a3bc1b067b Deprecate CONF.monkey_patch
This option, along with monkey_patch_modules, is
arguably worse than hooks since it doesn't even
rely on having in-tree code. It's super legacy,
not tested, not supported and is a barrier to
interoperability, so we should deprecate it for
removal.

This also allows us to deprecate the default_publisher_id
option which is used for the legacy notify_decorator
which is only used if specified with the monkey_patch_modules
option, which is also deprecated here.

Also removed the nova.api.ec2.cloud mention from the
config option help text for monkey_patch_modules
since that isn't valid in nova anymore.

Change-Id: Id793ac2c5cdc5dc473f95eac53b77617a1e389da
2017-08-25 18:47:47 -04:00
jichenjc 817ca18aa4 Add device tag support info in support matrix
The virtual device tagging support was added for several
hypervisors and it's useful to document in the support
matrix to provide more info to user.

Change-Id: Idab929904aaba924f9f1f4814ff959de01f72f83
Partial-Bug: #1701421
2017-08-25 16:34:22 -04:00
Chris Dent c324551015 Prevent blank line at start of migration placeholders
Because those blank lines sure are annoying.

Change-Id: I7b73536a89d18e0752651c198018eff6cc8b0e57
2017-08-25 18:43:19 +01:00
Matt Riedemann f8c4640cc8 Remove useless error handling in prep_resize
The MigrationPreCheckError handling in prep_resize was
added in commit e24f333cd5
which at the same time added code to the libvirt driver's
migrate_disk_and_power_off method to raise MigrationPreCheckError.

However, migrate_disk_and_power_off is only called from the
ComputeManager.resize_instance method, which is called from
the ComputeManager._prep_resize method but via an RPC cast.

Because of the RPC cast from the destination node _prep_resize
to the source node resize_instance, the MigrationPreCheckError
from the migrate_disk_and_power_off method on the source node
is not going to come back and be raised out of _prep_resize,
thus making the error handling in prep_resize dead (and confusing)
code.

This simply removes it.

Change-Id: I60894e9c6f03b20dc59be8d9b01808da3980f4b1
2017-08-25 12:29:40 -04:00
Chris Dent 5a0aa09737 De-duplicate two delete_allocation_for_* methods
delete_allocation_for_migrated_instance and
delete_allocation_for_evacuated_instance are only different
in their log messages, so extract their guts to a shared
private method.

This same method could also be used at the end of drop_move_claim, but
the extent of change to the logging there made me pause. Perhaps another
time.

Change-Id: Ifad17e08aa3ddbd95f25b6133564ea1a1a1bb87c
2017-08-25 12:06:12 -04:00
Dan Smith 361287debf Move hash ring initialization to init_host() for ironic
The hash ring initialization code requires calling to conductor over
RPC. Nova's service startup initializes the manager and the virt
driver, then goes into a polling loop waiting for a conductor to
respond to make sure it is ready. Finally, it calls init_host()
once things are expected to be working. That is where we should
do our initialization that requires conductor to be up.

This patch moves the initial refresh into the Ironic driver's
init_host() routine.

Change-Id: If92f4b1df061f91ffffa7900532a978649efb933
Closes-Bug: #1713095
2017-08-25 09:03:23 -07:00
Jenkins 1080506f16 Merge "Fix bug on vmware driver attach volume failed" 2017-08-25 13:22:51 +00:00
Jenkins 42e83eed3e Merge "[placement] Disambiguate resource provider conflict message" 2017-08-25 11:33:47 +00:00
DamonLi 8aa3133e45 Fix bug on vmware driver attach volume failed
The function "get_vm_state" in vmwareapi returns the index of the vm state in
nova InstancePowerState. The "int" value do not have .lower() function. This
will cause error when attach volume.

Closes-Bug: #1712281

Change-Id: I7b6d581904219d1ba4615054f9676390170ab1bc
2017-08-25 15:53:50 +08:00
liu-lixiu ca62a3c844 fix a typo in format_cpu_spec doc
It allow_ranges is true -> If allow_ranges is true

Change-Id: Ia285c1dfb851a652f36e8ce1adb7c0e88853ac3a
Closes-Bug:#1712763
2017-08-25 14:56:12 +08:00
Jenkins a99e936ff1 Merge "Cleanup allocations in failed prep_resize" 2017-08-25 00:27:39 +00:00
Jenkins a7b49f6690 Merge "Add functional test for rescheduling during a migration" 2017-08-24 21:31:19 +00:00
Jenkins 5f3bc67ea3 Merge "Remove allocation when booting instance rescheduled or aborted" 2017-08-24 21:30:38 +00:00
Jenkins 1a8df76ce8 Merge "Updated from global requirements" 2017-08-24 21:05:42 +00:00
Jenkins c6a2d1c436 Merge "Fix sample configuration generation for compute-related options" 2017-08-24 20:44:15 +00:00
Matt Riedemann b53133ba50 Cleanup allocations in failed prep_resize
During a resize/migration, the scheduler 'doubles' the
allocations on both the source and destination hosts, which
could be the same host if resizing to the same host.

If prep_resize fails, the destination node allocations were
not getting cleaned up before rescheduling to another host.
If it's a resize to the same host, the doubled allocation
from the scheduler wasn't being subtracted for the single host.

This change cleans up the allocations from the current node
when prep_resize fails. If it's not a resize to the same host,
we're on the destination node already. If it is a resize to
the same host, remove_provider_from_instance_allocation in the
SchedulerReportClient accounts for subtracting the new flavor
from the doubled allocation.

Change-Id: I8e81704518cef8847dc65b70a75cbd5e67f1cd39
Closes-Bug: #1712850
2017-08-24 16:10:55 -04:00
Matt Riedemann 78850296a5 Add functional test for rescheduling during a migration
This adds a functional test which recreates the bug where
the allocations on a destination node are not removed from
Placement before rescheduling during a cold migrate operation,
which is the same code flow as a resize even though resize
isn't explicitly tested here.

Change-Id: I1e3def1e98d0008240837eb1ad0eaa81a9b2d189
Related-Bug: #1712850
2017-08-24 14:22:20 -04:00
Jenkins 6c75ff5917 Merge "Remove RamFilter and DiskFilter in default filter" 2017-08-24 18:04:46 +00:00
Jenkins a7450ea1a8 Merge "Move common definition into common layer" 2017-08-24 18:04:10 +00:00
Jenkins 9cc9518875 Merge "Remove VMware driver _get_vm_ref_from_uuid method" 2017-08-24 17:49:16 +00:00
Jenkins 1cec915114 Merge "api-ref: fix key_name note formatting" 2017-08-24 17:48:43 +00:00
He Jie Xu c19ebcbd58 Remove allocation when booting instance rescheduled or aborted
In Pike release, there is no auto-heal in the resource tracker.
So when instance booting failed, the allocation records aren't
cleaned up.

This patch clean up the allocation records when the instance
rescheduled and aborted.

Change-Id: I95d2f4c9392883052188fb7901451530068502db
Closes-Bug: #1712718
2017-08-24 12:38:41 -04:00
Dmitry Tantsur 64cb56c81a Fix sample configuration generation for compute-related options
Currently the compute_opts are duplicated in both [DEFAULT] and [compute]
sections, while compute_group_opts are missing at all.

This patch does not affect where the options actually are, only where
they are displayed in the sample configuration.

Closes-Bug: #1712855

Change-Id: I68f246998fd68e669b0d9ef34b00ed384f4f0c90
2017-08-24 15:31:04 +00:00
Eric Fried dfd4e1506b Add formatting to scheduling activity diagram
Add explicit box sizes to ensure all text is visible in the cells of the
activity diagram SVG in the Scheduling doc.

Change-Id: Ife4d72cbd2b877e948ac4aa4fe2fa3efc1e69e9d
2017-08-24 10:28:35 -05:00
Stephen Finucane ed296fc007 Monkey patch the blockdiag extension
The blockdiag extension currently provides poor support for word
wrapping.  While a PR has been filed, the project appears to be dormant
and it's likely going to be a while (if ever) before it gets merged. As
such, it's easier to carry our own, monkey patched version of the
plugin.

Change-Id: Iac2f8cadc688334e07ad46c5af1870b568c56e73
Co-Authored-By: Eric Fried <efried@us.ibm.com>
2017-08-24 15:27:55 +00:00
Stephen Finucane 002ca8c7f4 docs: Document the scheduler workflow
There have been some major changes to how scheduling works in Nova
during the Pike and Queens cycles. This documents these design changes
so that this new, more complex workflow is clearly spelled out.

Co-Authored-By: Ed Leafe <ed@leafe.com>

Change-Id: I15121d8fe9b715c0aec39dee4bfdf25ced42b481
2017-08-24 15:18:11 +00:00
Jenkins 4e266fb886 Merge "How about not logging errors every time we shelve offload?" 2017-08-24 14:20:07 +00:00
OpenStack Proposal Bot adc1b54fa1 Updated from global requirements
Change-Id: I2c0269fc8fdc1468a9996a7fa8477d5a813bd256
2017-08-24 05:55:48 +00:00
Matt Riedemann d6de0e57c2 Delete instance allocations when the instance is deleted
In a deployment that still has Ocata computes, the resource
tracker will delete the allocations for an instance when it
is deleted, but in an all-Pike+ computes deployment, the
allocations will only be removed for a deleted instance
during the update_available_resource periodic task.

The capacity on the node should be freed as soon as the
instance is deleted, like when we shelve offload an
instance, so this does that.

The ServerMovingTests functional tests were glossing over
this by forcing the run of the update_available_resource
periodic task code after the instance was deleted but
before checking the allocations were gone from Placement.
So this change removes that part of the tests to show
this fixes the problem.

Change-Id: I0f57b4ba8e4c3931b70bd737de5b7c8ae47f033d
Closes-Bug: #1712684
2017-08-23 17:39:51 -04:00
Matt Riedemann e208cbb1f1 How about not logging errors every time we shelve offload?
The delete_allocation_for_instance method does not return
anything and "if not None" is always True, so we're always
logging an error when we shelve offload an instance, which
is not the most fun thing in the world.

This was probably caused by some confusion with how
remove_provider_from_instance_allocation works which does
return a boolean result.

Change-Id: I30b716b0649f6d367ea747149da5c5f921ae19c5
Closes-Bug: #1712689
2017-08-23 17:27:05 -04:00
Jenkins c35ad953e4 Merge "nova-manage: Deprecate 'cell' commands" 2017-08-23 20:44:30 +00:00
Jenkins f1f55d48cc Merge "Assume neutron port_binding extensions enabled" 2017-08-23 16:58:08 +00:00
Stephen Finucane dcef0aa666 nova-manage: Deprecate 'cell' commands
The Cells v1 feature is deprecated, meaning we can also deprecate the
respective commands in nova-manage. Do this.

Change-Id: I6db62a16272c74215944db164830515b774f5085
2017-08-23 17:16:15 +01:00
Matt Riedemann 129b120540 Add missing unit tests for FilterScheduler._get_all_host_states
This addresses a review comment from change
I8666e0af3f057314f6b06939a108411b8a88d64b for some
missing tests. This code is tightly coupled between
how the SchedulerManager calls FilterScheduler.select_destinations
and how the provider_summaries variable is interpreted differently
when it's None or {}, and is also tightly coupled to how
HostManager._get_computes_for_cells considers compute_uuids being
None or not when grabbing all compute nodes from a cell. Because
of this coupling and complexity, the NOTE in the method is also
updated for clarity.

Change-Id: I3e994d4ad23bf1dd2e46f5d69ff7fdd1a6afdb0e
2017-08-23 11:51:13 -04:00
Jenkins 6990df20ee Merge "Pull out code that builds VIF in _build_network_info_model" 2017-08-23 15:37:27 +00:00
Jenkins 36fc828c61 Merge "Clarifying node_uuid usage in ironic driver." 2017-08-23 15:20:06 +00:00
Jenkins b76291269e Merge "Restrict live migration to same cell" 2017-08-23 15:19:33 +00:00
Jenkins 320c0f377b Merge "Remove source node allocation after live migration completes" 2017-08-23 15:05:58 +00:00
Jenkins fc4fddb901 Merge "Allocate resources on forced dest host during live migration" 2017-08-23 14:57:05 +00:00
Matt Riedemann fa4870f87f api-ref: fix key_name note formatting
Also fixes up some of the grammar in the note itself.

Change-Id: I7920428217b8b07fd72768a475ff407a1aabca2c
2017-08-23 10:04:34 -04:00
John Garbutt 7f38e25e7d Assume neutron port_binding extensions enabled
No recent neutron deployment should ever have the port_binding extension
missing in its list.

It appears like this has been the case since this commit in Liberty:
61121c5f2af27e31092db7ac6947f796198410a8

It causing lots of confusion around when an admin_client should be used,
among other things, so lets remove this needless complexity.

Co-Authored-By: Augustina Ragwitz <auggy@cpan.org>
Change-Id: I5fa73fa0610b23ef231952b2035a284819186a7c
Related-Bug: 1608601
2017-08-23 13:44:32 +00:00
Jenkins 2c47063a4f Merge "Fix quobyte test_validate_volume_no_mtab_entry" 2017-08-23 13:36:34 +00:00
Wonil Choi ac4705516a libvirt: Fix getting a wrong guest object
If trying to create a new VM with the same instance name on the same
compute host, old existing VM become destroyed. guest object is get by
instance name so returned object is existing active instance and it is
destroyed. However this destroying is not intended situation. This
commit makes get the correct guest object by using UUID.

Co-Authored-By: Maciej Kucia <m.kucia@partner.samsung.com>
Change-Id: Ic6f81dc1f8b3610e181914f6d977652cb6d3f6d0
Closes-Bug: #1712460
Signed-off-by: Wonil Choi <wonil22.choi@samsung.com>
Signed-off-by: Maciej Kucia <m.kucia@partner.samsung.com>
2017-08-23 19:55:12 +09:00
Jenkins 5b35802244 Merge "Add language for compute node configuration" 2017-08-23 08:54:31 +00:00
Ilya Popov c337dd42c0 Tests: Add cleanup of 'instances' directory
'instances' directory was never cleaned up, which might have resulted in
test_rescue() test trying to chown this directory while not having
permissions to do such thing. Fix removes directories after tests finished.
Tests use fake instance, created with _create_instance. Method
_create_instance uses fixed uuid for instance object. Tests are executed
through several workers, so they could start simultaneously. If one test created
folder with the same uuid, the second one could delete it before the first
test finished. It could lead the first test to fail. The solution is to
use generated nstance uuid and delete particular uuid folder after test
is completed. Instance folder won't be deleted, as it could be used by
other tests.

Change-Id: I985a414ac6dfc608e1a3ed68c580d0b08da45a91
Closes-Bug: 1664669
2017-08-23 10:41:10 +03:00
He Jie Xu e83b884cf6 Remove the section about extensions from the API concept doc
The extensions are already removed from Nova API. So remove the
old section about the extensions from the API concept doc.

Change-Id: I29d6e85c23dd45e9f2452e58efb0feba70fb3ef4
2017-08-23 14:21:08 +08:00
Jenkins bd89a0deb2 Merge "update comment for dropping support" 2017-08-23 06:08:48 +00:00
Matt Riedemann 8fc789deb7 Restrict live migration to same cell
We do not yet support live migrating an instance
across cells. This change handles two cases for
live migration:

1. The destination host is forced so the scheduler
   is bypassed. In this case we directly compare the
   source cell against the destination cell and fail
   if they are not the same with a MigrationPreCheckError.

2. If no destination host is specified, or it's not forced,
   we update the RequestSpec sent to the scheduler so it
   will restrict the compute nodes it pulls from the same
   cell that the instance lives in. If a host is requested
   in this case but it's in a different cell, it would result
   in a NoValidHost error from the scheduler.

Change-Id: I66fc72d402ac118270a835cf929fe1ea387d78cd
Closes-Bug: #1712008
2017-08-22 19:36:53 -04:00