Commit Graph

16835 Commits

Author SHA1 Message Date
Jenkins 33c4e6bd0b Merge "Add xenapi host_maintenance_mode() test" 2012-11-05 22:07:58 +00:00
Jenkins 880b491838 Merge "xenapi: place boot lock when doing soft delete" 2012-11-05 22:02:16 +00:00
Jenkins c3cc2d7a2a Merge "Cleanup nova.db.sqlalchemy.api import" 2012-11-05 20:04:18 +00:00
Jenkins 8fecf6e57a Merge "Use uuidutils.is_uuid_like for uuid validation" 2012-11-05 20:00:38 +00:00
Jenkins 10979da33c Merge "Add uuidutils module" 2012-11-05 17:15:05 +00:00
Zhongyue Luo a260d5fc77 Cleanup nova.db.sqlalchemy.api import
Change-Id: I335fcd135a077d266653dfbacf9756bb8d47da14
2012-11-05 15:10:45 +08:00
Zhongyue Luo d2e7bb0431 Use uuidutils.is_uuid_like for uuid validation
Change-Id: I8fc760062ecaee45d263db663a52971be96f264a
2012-11-05 15:08:45 +08:00
Zhongyue Luo bb15f2b5b8 Add uuidutils module
Added uuidutils to openstack-common.conf file and
updated nova/openstack/common

Change-Id: I256a12ab4367a8ee408a38cda7ae35a762b56efe
2012-11-05 11:27:04 +08:00
OpenStack Jenkins bd186aa53f Imported Translations from Transifex
Change-Id: If46e19338fa5a98b5748b6c30aa365cab17ccc30
2012-11-05 00:02:20 +00:00
Jenkins 5495b50a41 Merge "Make session.py reusable" 2012-11-04 23:03:03 +00:00
OpenStack Jenkins dd086638b8 Merge "Imported Translations from Transifex" 2012-11-03 16:05:11 +00:00
Jenkins c008557b9f Merge "Eliminates simultaneous schedule race." 2012-11-03 16:04:23 +00:00
Jenkins 3a6a67f6a3 Merge "Fix unused variables and wrong indent in test_compute" 2012-11-03 00:04:28 +00:00
OpenStack Jenkins cfc6d00e42 Imported Translations from Transifex
Change-Id: I6f8aa2ceb34979db35ff77312d6f4398f5fc4c2d
2012-11-03 00:02:00 +00:00
Chris Behrens 73e6099a9e Fix unused variables and wrong indent in test_compute
Change-Id: I83a489b6a6797f60d53cc369315035d7d96afa81
2012-11-02 23:06:30 +00:00
Jenkins cde64119f2 Merge "Add some hooks for managers when service starts" 2012-11-02 23:01:26 +00:00
Jenkins 73b115d986 Merge "Remove unnecessary db call from xenapi/vmops" 2012-11-02 22:59:21 +00:00
Jenkins 3ee98a751f Merge "sync deprecated log method from openstack-common" 2012-11-02 22:58:29 +00:00
Jenkins 8a6e725501 Merge "Fix Quantum v2 API method signatures" 2012-11-02 22:57:39 +00:00
Jenkins 1d641de80d Merge "Use elevated context in disassociate_floating_ip" 2012-11-02 22:56:49 +00:00
Jenkins 0b81eb659e Merge "Fix no attribute 'STD_OUT_HANDLE' on windows" 2012-11-02 22:55:59 +00:00
Jenkins 0f1c5fe7a8 Merge "Fix signing_dir option for auth_token middleware." 2012-11-02 22:51:03 +00:00
Jenkins c68833a6d9 Merge "Remove db.instance_get* from nova/virt" 2012-11-02 22:47:46 +00:00
Dan Smith 8b283c2f83 Remove unnecessary db call from xenapi/vmops
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
2012-11-02 13:48:15 -07:00
Johannes Erdfelt 0f678085fe xenapi: place boot lock when doing soft delete
If an instance is soft deleted a boot lock should be placed to ensure
it doesn't get restarted by accident.

Change-Id: Id46b8758f71d122d2a9cf7ae172fc138974bc315
2012-11-02 19:31:00 +00:00
Johannes Erdfelt 29568d0be0 Detangle soft delete and power off
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
2012-11-02 19:30:56 +00:00
Russell Bryant a754825c6a Fix signing_dir option for auth_token middleware.
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
2012-11-02 14:42:57 -04:00
Davanum Srinivas f2cf3fc0cd Fix no attribute 'STD_OUT_HANDLE' on windows
rename STD_OUT_HANDLE to STD_OUTPUT_HANDLE

Fixes LP #1033528

Change-Id: I75830dc4d6017076647e040d4485f99ee68333ff
2012-11-02 14:42:25 -04:00
Brian Waldon eedd98477d Use elevated context in disassociate_floating_ip
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
2012-11-02 10:49:58 -07:00
Dan Smith 8a13475998 Remove db.instance_get* from nova/virt
This adds two methods to the VirtAPI for instance_get_*
operations, removing direct calls of those from the
drivers.

Change-Id: I0be42f73fb71a61bf6c46708d5879f7f8ade294d
2012-11-02 09:17:12 -07:00
Jenkins a77c0c5016 Merge "Introduce VirtAPI to nova/virt" 2012-11-02 16:00:30 +00:00
Sean Dague df0ca59607 sync deprecated log method from openstack-common
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
2012-11-02 09:15:58 -04:00
Mark McLoughlin 8eb367ab65 Tiny resource tracker cleanup
We're going to the bother of initializing an is_deleted_instance boolean
and then not using it everywhere we can.

Change-Id: I78c037491de336999df0f7a645a6fbab5b26d88c
2012-11-02 11:13:30 +00:00
Jenkins 82aec115be Merge "Improve EC2 describe_security_groups performance" 2012-11-02 08:11:03 +00:00
Jenkins 539107e1a6 Merge "Bump the base rpc version of the network api." 2012-11-02 07:23:35 +00:00
Mark McLoughlin 9264d8a04a Fix Quantum v2 API method signatures
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
2012-11-02 07:19:36 +00:00
Jenkins 41e87bbfc5 Merge "Remove nova-volume scheduling support" 2012-11-02 00:13:50 +00:00
Jenkins 066a3d4c41 Merge "Fix backwards compat of rpc to compute manager" 2012-11-01 21:08:15 +00:00
Dan Prince 4c27221d30 Bump the base rpc version of the network api.
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
2012-11-01 16:29:26 -04:00
Vishvananda Ishaya 94560ab57d Eliminates simultaneous schedule race.
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
2012-11-01 20:05:35 +00:00
Dan Smith 081b652ce4 Introduce VirtAPI to nova/virt
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
2012-11-01 12:26:07 -07:00
Chris Behrens b946f22a86 Add some hooks for managers when service starts
Adds pre_start_hook() and post_start_hook() and fixes a couple of hard
coded binary name checks in service.py

Change-Id: I062790a88ed7f15a6f28961d6ddc1f230e19e0cb
2012-11-01 19:15:09 +00:00
Vishvananda Ishaya 66f1a34cab Fix backwards compat of rpc to compute manager
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
2012-11-01 11:51:49 -07:00
Dan Smith e1ef0e69d2 Add xenapi host_maintenance_mode() test
This bit of code is currently untested (except for the most
basic stubbed-out case).

Change-Id: I7193152480ed678c89be7b7dda5edf034f5dad2e
2012-11-01 10:32:17 -07:00
Jenkins 6ee9883b8c Merge "Move to a more canonicalized output from qemu-img info." 2012-11-01 17:27:28 +00:00
Jenkins c49d96e081 Merge "Make bdms primitive in rpcapi.terminate_instance" 2012-11-01 15:42:46 +00:00
Nikola Dipanov 6390508fc9 Make bdms primitive in rpcapi.terminate_instance
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
2012-11-01 14:28:27 +01:00
Jenkins 3b2e0c6009 Merge "Fix copy-paste bug in block_device_info_generation" 2012-11-01 10:17:12 +00:00
MotoKen 358ccf5f19 Improve EC2 describe_security_groups performance
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
2012-11-01 15:46:24 +08:00
Joshua Harlow b04213f5dc Move to a more canonicalized output from qemu-img info.
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
2012-10-31 20:09:31 -07:00