Commit Graph

20580 Commits

Author SHA1 Message Date
Joe Gordon e384bc335e Update mailmap
Update mailmap to reflect new email address that I will be committing
under

Change-Id: I9f8610ad982ed678c0b367b3a1768578739b2543
2013-05-17 15:10:58 -07:00
Jenkins 55ccdbc3bc Merge "Remove usage of locals() for formatting from nova.api.*" 2013-05-17 21:16:08 +00:00
Jenkins 580c6c399a Merge "Switch to flake8+hacking." 2013-05-17 21:06:13 +00:00
Jenkins ac7e8dbbe0 Merge "Fix flake8 errors in anticipation of flake8." 2013-05-17 21:06:07 +00:00
Boris Pavlovic 2dce8c92f6 Remove usage of locals() for formatting from nova.api.*
Using of locals() for formatting string is a nasty thing because:
1) It is not so clear as using explicit dicts
2) It could produce hidden errors during refactoring
3) Changing name of variable causes change in message
4) Creating a lot of unused variables

fixes bug 1171936
Change-Id: I293d7ebb875f65cce322d4938d1ae323f3aded8d
2013-05-18 00:04:17 +04:00
Monty Taylor a333be8fe4 Switch to flake8+hacking.
Remove a bunch of local custom scripts. Replace with configurable
external tools.
Use local hacking checks for nova specifics.

Change-Id: I75a01375ba0ec36d2ff05abc47abe0a3f225eda5
2013-05-17 12:54:12 -07:00
Monty Taylor 186c49409c Fix flake8 errors in anticipation of flake8.
Change-Id: I7c713f95eb974d5998d2be50722df7d6f64a234e
2013-05-17 12:53:32 -07:00
Jenkins 505af894f3 Merge "Remove locals() from messages in virt/disk/api.py" 2013-05-17 19:38:19 +00:00
Michael Still b196d96263 Remove locals() from messages in virt/disk/api.py
No functional changes, just removing something which annoyed me
when I read the code.

Change-Id: Ia2d232d6ee2e61d3785b57798391474b8e99dee1
2013-05-17 11:14:58 +10:00
Rick Harris 7f1670e9fb Cast size to int before comparison
`_get_and_check_image_metadata` pulls `size` from the image, which
comes in as string, but fails to convert it to an integer before
comparing with the flavor's `root_gb` size. This patch adds the cast
along with some test coverage for this method.

Fixes bug 1180159

Change-Id: I92bc9d6a808e49173d806e434cb145c751c8314a
2013-05-16 23:18:16 +00:00
Jenkins 1d5d58c969 Merge "Add ca cert file support to cinder client requests" 2013-05-16 22:18:38 +00:00
Jenkins d6433ca852 Merge "Don't inject settings for dynamic network" 2013-05-16 22:17:09 +00:00
Jenkins be432da444 Merge "Fix header issue for baremetal_deploy_helper.py" 2013-05-16 22:11:34 +00:00
Jenkins ca4150e05f Merge "Mox should cleanup before stubs" 2013-05-16 21:00:21 +00:00
Jenkins a87b4e36e9 Merge "libvirt: Catch VIR_ERR_NO_DOMAIN in list_instances" 2013-05-16 18:26:59 +00:00
Jenkins 67445d7084 Merge "Reverse compare arguments in filters tests" 2013-05-16 18:21:21 +00:00
Rick Harris 4e560d49d4 Mox should cleanup before stubs
Tests that define both Mox and Stubs may not receive a proper cleanup by the
`TestCase` base class. The reason is that the order in which the Mox and Stubs
are unset may not necessarily match-up with the order in which the tests
called them. For example:

Suppose we have a test that Stubs a method in its `setUp` and then Mox's that
same method in the test body:

    Stub: Original-Func -> Stubbed-Func
    Mox: Stubbed-Func -> Mocked-Func

Now when `TestCase` ultimately does its `cleanUp`, it will UnStub before
UnMocking:

    UnStub: Stubbed-Func -> Original-Func
    UnMox: Mocked-Func -> Stubbed-Func

Notice that generic cleanup has mistakingly left `Stubbed-Func` in place.

Given that Stubs and Mox can be performed in any order, the upshot here is
that the generic cleanup can't always be relied on.

The proposed solution has two parts: a best-practice change and a small
code-change.

The code-change is to reverse the current order to UnMox before UnStubbing.
While in theory the order is arbitrary, in practice, we have lots of Stubs in
`setUp` methods already, so UnMox'ing first makes sense (and it fixes a
current bug to boot!)

The best-practice change is to recommend against stubbing and mocking the same
function as well as to always place stubs before mocks when relying on the
generic cleanup. If a developers needs to deviate from this, cleanup of stubs
created after mocks are their responsibility.

Fixes bug 1180671

Change-Id: I42ab8b55026c0a133625a7cc81ed8b960e9d47d7
2013-05-16 18:15:31 +00:00
Chris Behrens 40ac88f9c2 Reverse compare arguments in filters tests
When using assertEqual, the expected result should actually be the first
argument so any failures have 'expected' and 'actual' values printed
properly.

Change-Id: I34d16f298eb0bf62e2abaaf31e80911fa124dc24
2013-05-16 16:43:31 +00:00
Ben Nemec 2807ea5464 Don't inject settings for dynamic network
When using Quantum for networking and setting flat_injected to
inject network settings into the guest VM, Nova injects a static
network configuration for networks using DHCP. This change
checks for the existence of a dhcp server and, if found, does not
inject static settings for that network.

Due to limitations of the legacy network info, the fix only
applies when new-style network info is passed to the injection
template function.  The only code still passing in legacy
network info is in libvirt, and there is work ongoing to
remove that dependency.

Fixes bug 1163985
Fixes bug 1112659

Change-Id: I8d3f16bde22e1c6dc0d2432aa263e2b15ae5c93a
2013-05-16 15:03:40 +00:00
Jenkins bbf2f7e697 Merge "Copy the RHEL6 eventlet workaround from Oslo" 2013-05-16 14:42:17 +00:00
Jenkins d81ed84a63 Merge "Architecture property updated in snapshot libvirt" 2013-05-16 13:52:05 +00:00
Jenkins c37b633cb5 Merge "Fix for missing multipath device name" 2013-05-16 13:31:58 +00:00
Jenkins 5b51f61579 Merge "Detach volume fails when using multipath iscsi" 2013-05-16 13:13:04 +00:00
Cian O'Driscoll 5bc5fd8855 Add ca cert file support to cinder client requests
Allow for ca certificates file to be specified when doing cinder
client requests. Needed when using custom ca authorities.

Change-Id: Ib9aa15df2fc7d96cb8587c13769399e353c032c6
Fixes: bug #1179476
2013-05-16 08:50:42 +00:00
Jian Wen 81e50b746b libvirt: Catch VIR_ERR_NO_DOMAIN in list_instances
Commit 25f50d9a didn't catch the exact exception for
looking up deleted domain.

Partly fixes LP Bug #1032741.

Change-Id: I6c6f7d8a736c833488b6cb8e00530dc4138f1424
2013-05-16 09:51:57 +08:00
Russell Bryant 56f5172f33 Revert "Include list of attached volumes with instance info"
This reverts commit dd66f235ec.

This changed the core servers API without doing it as an API extension,
so it's not an acceptable change as written.

Change-Id: I3787060583de1371e366647d38d69f37746317d5
2013-05-15 20:10:00 -04:00
Jenkins 1e9937e327 Merge "Sync rpc from oslo." 2013-05-16 00:04:49 +00:00
Jenkins 3eee243123 Merge "Remove openstack.common.version." 2013-05-15 23:59:07 +00:00
Russell Bryant fac5eb871a Sync rpc from oslo.
Sync some trivial Python 3 compatibility and pep8 improvements from oslo.
I just want to have this in sync so that pulling in a feature I'm working
on comes in without unrelated changes

Change-Id: I13fcb0bd538a153b90acf0b18497e335a64dc9d1
2013-05-15 19:12:04 -04:00
Monty Taylor b9b9a99b99 Remove openstack.common.version.
Change-Id: Ieb9ac3c2ce85777a33a2e15640670d03b2e7d2b7
2013-05-15 15:58:54 -07:00
Walter A. Boring IV 565dfc65fb Fix for missing multipath device name
Due to formatting changes in the multipath -l output
we were sometimes missing the device name for each of the
multipath devices which gave us a device of '/dev/'.  This
causes problems on detach.

Fixes Bug: #1180497

Change-Id: I6017dda149776624fac452140d3d0f5df3f5fd5a
2013-05-15 15:33:00 -07:00
Jenkins 3cbc0f32ad Merge "Add missing tests for db.fixed_ip_*(). functions." 2013-05-15 22:21:33 +00:00
Jenkins 6514a50530 Merge "Reverse path SNAT for DNAT floating-ip." 2013-05-15 21:34:08 +00:00
Jenkins 7d6fc20945 Merge "Fix quantum security group driver to accept none for from/to_port" 2013-05-15 21:34:00 +00:00
Jenkins e2636ff5b8 Merge "Cells: Don't allow active -> build" 2013-05-15 20:44:16 +00:00
Jenkins ae624fe2e7 Merge "Refactor nova.volume.cinder.API to reduce roundtrips with Cinder" 2013-05-15 19:50:20 +00:00
Jenkins 1a71dfcd27 Merge "Extract getting instance's AZ into a helper module." 2013-05-15 19:48:42 +00:00
Jenkins 3492d83140 Merge "Include list of attached volumes with instance info" 2013-05-15 18:41:27 +00:00
Jenkins 8dc14fad85 Merge "xenapi: ensure vdi is not too big when resizing down" 2013-05-15 18:35:49 +00:00
Jenkins 773db79616 Merge "Handle IPMI transient failures better." 2013-05-15 16:09:00 +00:00
Victor Sergeyev cefba4ce80 Add missing tests for db.fixed_ip_*(). functions.
Added new tests for fixed_ip*() functions.
Function fixed_ip_create() should return FixedIp instance rather than
FixedIp.address, because it is used in a tests later.
Fix calls of fixed_ip_create() respectively.

blueprint test-db-api

Change-Id: Id5e9d4486605bde9d9fd1e631d868603a7a7c604
2013-05-15 18:18:42 +03:00
John Garbutt 72e75dbcea xenapi: ensure vdi is not too big when resizing down
Fix for bug 1155066

This change adds some rollback into the resize disk down
code within xenapi, and reports a better error message
when the disk is too big to resize down.

On a successful rollback, the user is notified of the error
by the instance actions, rather than leaving
the server in the error state.

The user is then able to free up some disk space such that
the resize can work correctly.

Change-Id: Ibad568ab3cfb9caaf4fe002572c8cda973d501a7
2013-05-15 14:13:06 +00:00
Jenkins af7823f5e7 Merge "Pass the proper admin context to update_dhcp" 2013-05-15 12:35:35 +00:00
Jenkins 1a845dafd9 Merge "Add missing unique constraint to KeyPair model." 2013-05-15 11:12:14 +00:00
Jenkins 2a5bbae0b8 Merge "Refactored tests for db.key_pair_*() functions." 2013-05-15 10:43:11 +00:00
Jenkins 031319f905 Merge "Optimize db.instance_floating_address_get_all method" 2013-05-15 10:43:02 +00:00
Jenkins 4dee8665b4 Merge "Use Oslo's bool_from_string" 2013-05-15 10:40:05 +00:00
Jenkins 0cb809d0ff Merge "Remove "#!/usr/bin/env python" from .py files under nova/cmd" 2013-05-15 10:27:55 +00:00
Chris Behrens 9dd6db4bae Cells: Don't allow active -> build
Adds support for passing 'expected_vm_state' in an instance_update dict
much like the current support for 'expected_task_state'.

For cells, when the API cell receives an instance update containing a
vm_state of BUILDING, raise an exception if the instance is in some
other state.  This addresses out-of-order messaging issues that can
cause an instance to appear to have a huge delay going ACTIVE.  (A
periodic task run can later heal the state, but it can take a long
while)

Fixes bug 1180283

Change-Id: I64252b30e2596812f3b84da64b1fc8681661d7f8
2013-05-15 09:09:10 +00:00
Jenkins f124d50024 Merge "Cleanups for create-flavor" 2013-05-14 23:04:53 +00:00