Keep the compute host's ComputeNode model in sync with the
level of resource usage. This enables the ComputeNode
model to be used as a basis for scheduling decisions
rather than forcing scheduler to calculate free
resources from an instance_get_all on each request.
Resources like memory and disk are claimed as instances are built
or deleted. There is also support for configurable compute node
stats (a generic key/value store) for extensible advertising of other
usage stats that may be useful for a particular scheduler
implementation. Additionally, there is a periodic task on the
compute host that audits actual resource consumption at the virt
layer to ensure that the database stays in sync.
This change partially implements blueprint: scheduler-resource-race
This patch complements:
https://review.openstack.org/#/c/9540/ (build re-scheduling support)
Change-Id: Ibbe3839a054f8b80664b413d47f766ca8d68e3f2
The RPC API passes admin_pass and injected_files as arguments, but when
calling the driver API, those values get stuffed into the instance dict
which is otherwise all data that is stored in the database. This has
led to some bugs (such as 1034948) which could have been avoided if
the code was consistent.
Change-Id: I09a7de8eca3791a5ab27e93b22e5ccccee31cf09
Fixes bug 1029495
The trigger_members_refresh method in compute.api.py specifies
a group id in the call to refresh_security_group_members. This
is just the last group id seen and ignores the fact that a
refresh may impact members of multiple groups.
This is masked by the fact that on the host the group id is
ignored and all instances have their security rules refreshed
regardless of if they are part of the changed group or not.
This change modifies the logic surrounding refreshes so we send
a refresh request for each instance which is affected by a
security group change, this ensures we aren't spending time
refreshing unaffected instances and also removes the possibility
of refreshing an instance multiple times if it is a member of
more than one group.
Also changed to be instance-centric is the refresh carried out
when a rule is added/removed to a security group.
Change-Id: Iec98e9aed818fdc4ecc88c8dcdd4ee5fa9386e00
When reading image_ref from an instance, use dict style syntax. This is
to be compatible with no-db-messaging changes.
Part of blueprint no-db-messaging.
Change-Id: I19753da6301c5d78b8fb13b30fbc6996ba828096
We no longer use InstanceInfo.
Also removes some unused _map_to_instance_info functions in
various virt drivers.
Change-Id: I02ead10e43426b9ad051970e9e78e970de5b1ac1
Removes the list_instances_detail function from various compute drivers
which implement it. We no longer make use of this compute driver
call when syncing power states.
Change-Id: I4980bd8d4ec14c61e16d5be105659f0d5b6748ba
This import was recently reintroduced, due to
confusing pylint output. Therefore remove it again
and adjust things so pylint won't warn in future.
Change-Id: I25f293f171c651c25d27e8d55c9240fd808590ba
This refactoring of the libvirt live migration code is
required to enable live migration in the xenapi driver.
This change ensures libvirt specific checks are performed
only when the libvirt driver is enabled.
The complication is that some of these checks require
information to be passed between the source and destination
hosts. For example, when comparing CPU flags.
Change-Id: I7389f0b7f03313d7f04b907f481787dadf0716fd
Part of bp:virt-driver-cleanup
Make the baremetal driver consistent in naming as a driver
instead of a proxy / connection.
Change-Id: I75d7d90bd8139842b588f1fafb1267511f29a1fb
* Adds wait() to all the LoopingCall timers
* Fixes loopingCalls in baremetal/proxy.py as well
* Includes failing test to verify result from destroy
* Fixes tests depending on improper behavior
* Fixes bug 1015355
Change-Id: I9e1914c446170e49f0aab76c7745b55d12132425
Fixes bug #1013770
1. Reorder imports by full module path
2. Insert two blank lines after the last import
Change-Id: I294ac3ab528f17a72811392d1732158e9487f3bf
Progress on bp:virt-driver-cleanup
This series of patches converts the virt drivers to loading via
importutils making it possible to add a virt driver without changing
core code. It deprecates the use of connection_type in favor of a
full driver name in compute_driver.
Based on email thread with Vish and Jay Pipes on approaches to do
this.
Change-Id: I48366ec7efc7b095859988e5e6ac5a853b98b8a7
Removed duplicate and invalid state in power_state:
FAILED, SHUTOFF, BLOCKED
This is the first step in cleaning up nova state machine
and do better task management (bp/task-management)
http://wiki.openstack.org/VMState
Change-Id: I586b9058fada5efd468870fb187590fc0e37aa8f
address minor problems and errors found in the driver, such as old
docstrings, unused imports, and variables, references of non-existent
classes, and methods; plus remove the requirement that every sub-driver
needs to be implemented as singleton, as the tilera one.
Change-Id: I5943bcdd785c1b4b83e95f88bd7d69c1edc5f62f
Added a instance update notification (compute.instance.update) that
will report on changes to vm_state and task_state. The goal here is
to provide useful insight into instance state transitions. (e.g.
BUILDING->ACTIVE)
The new notification has minimial dependencies and is intended for
wide use across the different layers/packages within nova. Calls
in compute api/manager, scheduler, and the virt layer that modify
the instance state have been instrumented with this notification.
Change-Id: I223eb7eccc8aa079b782f6bb17727cd0b71d18ed
The latest release of pep8 adds stricter rules for extraneous
whitespace within lines. This patch also addresses these new
violations acoss the codebase.
Change-Id: Ib7e50281870473df1704ed50868c5c2e26bdb02e
This patch imports jsonutils from openstack-common. It removes the
equivalent code from nova.utils and then converts the code base to use
jsonutils. The primary motivator for this change was to remove the rest
of the dependencies from nova.rpc on nova.utils.
Change-Id: If43658b9b098ed56cba018c81be268b8c3e2916a
Fixes bug 962665
This random delay is intended to reduce the stampeding behavior
associated with periodic tasks when compute workers are restarted in
unison across a cluster.
Change-Id: Ie3771d94af29049061c129b8ea562ee447a61771
Looks like this fixes all HACKING problems that were around.
Thanks to Dina Belova and Alexander Kovalev for this work.
Change-Id: I63ae1ab2f1bb37daa236cde4096c3c893fd80dd2
Add a pybasedir option so that it can be used for interpolation in the
default values of other options. This helps eliminate hard-coded paths
from the sample config file.
Also add a bindir option for similar reasons, but it also helps with
packaging.
Change-Id: Iadc746dcf2a24adbdf9bac945b5b330f01faeeb5
Fix a number of places where formatted strings were used with _() (causing
gettext to not match the string) or variables with _() (causing xgettext
to not extract a string)
Also, there's no value in internationalizing an empty string
Change-Id: Iac7dbe46eeaa8ddf03c2a357ecd52f69aa8678aa
test.TestCase already sets up self.mox and self.stubs as well as calling
self.mox.UnsetStubs(), self.stubs.UnsetAll(), self.stubs.SmartUnsetAll()
and self.mox.VerifyAll() during tearDown.
Change-Id: I74f0824ca1e8daa7b0ee7d7a62b226ba51206e6f
This is a first step towards using uuids in this interface instead
of instance names (which are synonyms for instance ids).
Change-Id: I54b32a5020b0dbc21ba7156ed38ed188c483086b
* Convert ApiError to EC2APIError
* Add new exceptions to replace ApiError where it didn't belong
* Fixes bug 926250
Change-Id: Ia711440ee0313faf8ea8c87e2c0a2f5b39cc55a2
* nova/virt/baremetal/proxy.py (_fetch_image): This function
reference 'images' which is undefined. So just remove it
as it's unused.
Change-Id: I7016f6e8a68fefab4342adadd032e93f963a074e
Make FLAGS a ConfigOpts instance and fix up all the places where we
expected FlagValues behaviour.
Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89