There are two db.instance_type_get() calls in xenapi
that don't need to be there. By fetching the info out of
the instance['instance_type'] field, we can avoid the lookup
(and adding interfaces to support this in VirtAPI).
Note that the tests require a little extra fakeage to
replicate what is happening in the real db driver.
Change-Id: I727c98fe18ca28f1db62ece2abfd50b4e13852ba
If an instance is soft deleted a boot lock should be placed to ensure
it doesn't get restarted by accident.
Change-Id: Id46b8758f71d122d2a9cf7ae172fc138974bc315
Soft deletes are implemented by using the power_off compute method.
Unfortunately, this limits what a hypervisor driver can do to the
minimum expected from powering off an instance.
Change-Id: I577a58473885dcc8a586a0829752e8397424bc02
The keystone auth_token middleware expects an option named
'signing_dir'. The sample api-paste.ini file for nova defined
'signing_dirname' instead.
Fix bug 1073858.
Change-Id: Ie9a3df73a8d9d52b48d6e0bcce0aae762af929a9
The call to service_get_by_host_and_topic would raise AdminRequired
in the case that a non-admin tried to disassociate a floating ip
from their instance and multi_host was on. Using an elevated
context for the db lookup enables the host lookup to happend and
allows a user to disassociate their floating ips.
Fixes bug 1074437
Change-Id: I3d47b5a48eae21ea913120bd00728a0b8132da81
This adds two methods to the VirtAPI for instance_get_*
operations, removing direct calls of those from the
drivers.
Change-Id: I0be42f73fb71a61bf6c46708d5879f7f8ade294d
the nova common deprecated util is now part of openstack-common
log class as a deprecate method. Sync openstack-common and remove
nova common util. All the deprecated pieces from folsom appear
to have already been removed, so no additional code changes needed
for this.
Change-Id: I9cbd6a67c30567cd7002e8e7fec93cfc209787fc
We're going to the bother of initializing an is_deleted_instance boolean
and then not using it everywhere we can.
Change-Id: I78c037491de336999df0f7a645a6fbab5b26d88c
Commit d96102b6 made a change to network.api.API but rather than making
the corresponding change to network.quantumv2.api.API it appears that
it was changed to match the network manager signature instead.
Fix the quantum signatures to match the stock network API signatures.
Change-Id: I97e16f29473f3f2e3f9c53b1e2ef10e499cef29a
In d96102b we bumped the RPC version of the migrate_instance_*
calls in the network rpcapi. We did not however bump the associated
RPC version in the network manager and as such resizes are now
broken.
This commit simply bumps the RPC version of the network
manager based on the previous change.
Fixes LP Bug #1074072.
Change-Id: I4b6d6bdbcb7bb68872deee4f54b1c0636012c2cf
Keeps host state in memory so multiple schedule attempts use the
up-to-date values that may have been modified by another greenthread.
Fixes bug 1073956
Change-Id: I69fdd9b46bde6b7408c501c42a6ef3b6dd92bbc2
This patch introduces a VirtAPI class which will house
callbacks provided by the manager to the virt drivers, allowing
things such as direct database accesses to be pulled out of
the virt drivers and delegated to another service.
As a first step, this introduces an instance_update() method
and makes all the virt drivers use it instead of direct calls
to db.instance_update.*().
Change-Id: I2e40831f5cfb20a03b304097d84d592aab035ef1
Adds pre_start_hook() and post_start_hook() and fixes a couple of hard
coded binary name checks in service.py
Change-Id: I062790a88ed7f15a6f28961d6ddc1f230e19e0cb
Commit dcabd6159a changed compute
manager in a way that it will fail to respond to the older 2.X rpc
message for reserve_block_device_name. This fixes it by making
the volume_id parameter optional.
Change-Id: Ia2d353d5b195e5687917ef5f928c0c835ffe3d3a
This patch converts bdms (a list of block device mappings) passed to
nova.compute.rpcapi.terminate_instance to primitive types that are
safe to be sent to the rpc backend.
Also fixes the fake BDM classes used in:
* nova.tests.api.ec2.test_cloud
* nova.tests.api.openstack.compute.test_server_actions
to pass through josnutils.to_primitive properly and not confuse it due
to wrongly delegated dotted lookups
fixes bug #1073240
Change-Id: I329a48c1a53dde5895a329b39f32854c286de071
The current implementation of EC2 describe_security_groups makes one
query per grantee group rule in _format_security_group. This will
dramatically slow down response time if users make strong use of
grantee group rules.
This patch uses just one DB query to get security groups with joined
grantee_group rules to improve the performance.
Fixes bug 1073024.
Change-Id: I34f3253bfef0eabfea39819de03a274dd6f6aaa8
Move to a form that is all lower cased, dashes->underscores, underscores
instead of spaces which allows for better integration with python. Also
make the parser more robust to failures when encountering new fields such
as snapshot lists. Provide a new qemu img info object that can be used
to do the parsing and access the underlying attributes.
Change-Id: Ie098dbd9f06dd4ef966768e2caa128f1d09b019c