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
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
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
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
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
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
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
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
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
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
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
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
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>
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
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
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
The Cells v1 feature is deprecated, meaning we can also deprecate the
respective commands in nova-manage. Do this.
Change-Id: I6db62a16272c74215944db164830515b774f5085
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
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
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>
'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
The extensions are already removed from Nova API. So remove the
old section about the extensions from the API concept doc.
Change-Id: I29d6e85c23dd45e9f2452e58efb0feba70fb3ef4
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