summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | Cells: Don't allow active -> buildChris Behrens2013-05-155-0/+131
| | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | Merge "Refactor nova.volume.cinder.API to reduce roundtrips with Cinder"Jenkins2013-05-1513-180/+182
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Refactor nova.volume.cinder.API to reduce roundtrips with CinderOleg Bondarev2013-05-1413-180/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make cinder.API methods accept volume_id instead of the whole volume object. This will remove redundant roundtrip to get the volume before passing it to other methods as in fact they only need the id. Fixes bug 1172297 Change-Id: I5e7f944c1c29b2f211ece2ef86c0959c81e806df
* | | | | | | | | | Merge "Extract getting instance's AZ into a helper module."Jenkins2013-05-153-20/+44
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Extract getting instance's AZ into a helper module.gtt1162013-05-113-20/+44
| | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An instance's availability zone logic may used by many modules, so move it from extend API into helper module `nova.availability_zones`. Also add some tests for the new method. part of bp: different-availability-zone-filter Change-Id: I5916a0b09d5dddec338e8e36503953720dfd6bcd
* | | | | | | | | | Merge "Include list of attached volumes with instance info"Jenkins2013-05-1569-52/+329
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Include list of attached volumes with instance infoOleg Bondarev2013-05-0869-52/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1112998 Change-Id: I1c3eb578339aabbcfed107043f39e30daf633c4a
* | | | | | | | | | | Merge "xenapi: ensure vdi is not too big when resizing down"Jenkins2013-05-1510-75/+384
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | xenapi: ensure vdi is not too big when resizing downJohn Garbutt2013-05-1510-75/+384
| | |_|_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | Merge "Handle IPMI transient failures better."Jenkins2013-05-154-19/+98
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
| * | | | | | | | | | Handle IPMI transient failures better.Devananda van der Veen2013-05-144-19/+98
| | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, IPMI "power status" doesn't return either "on" or "off". When this happens, the IPMI driver shouldn't assume what the state is, and the baremetal driver shouldn't assume that NOSTATE means SHUTDOWN. This patch also improves the doc strings for the IPMI driver. Fix bug 1178378. Change-Id: I54a5e6309f68ab8e5601e65039366d7d87c03478
* | | | | | | | | | Merge "Pass the proper admin context to update_dhcp"Jenkins2013-05-151-1/+1
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Pass the proper admin context to update_dhcpRafi Khardalian2013-05-141-1/+1
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 1180111 Commit 14e2ed3ace769c4deaca3c48a2fa59863f637a5f introduced changes to contexts passed around during resize. One of the calls to update_dhcp was missed and was causing stack traces on resize-revert. Change-Id: Ib7bec51324c7bced009407af13a7fff7a724e020
* | | | | | | | | | Merge "Add missing unique constraint to KeyPair model."Jenkins2013-05-151-0/+1
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Add missing unique constraint to KeyPair model.Victor Sergeyev2013-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a missing unique constraint ("name", "user_id") to KeyPair model (this constraint was in db schema but not in model definition). blueprint db-enforce-unique-keys Change-Id: Id231bca256e0cb39fcd8068acc7039240326fde2
* | | | | | | | | | | Merge "Refactored tests for db.key_pair_*() functions."Jenkins2013-05-151-61/+108
|\| | | | | | | | | |
| * | | | | | | | | | Refactored tests for db.key_pair_*() functions.Victor Sergeyev2013-05-141-61/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All tests for db.key_pair_*() functions are in KeyPairTestCase class now. blueprint test-db-api Change-Id: I92358bcda157c95290b31e3b7997e3432a65b404
* | | | | | | | | | | Merge "Optimize db.instance_floating_address_get_all method"Jenkins2013-05-153-7/+44
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Optimize db.instance_floating_address_get_all methodBoris Pavlovic2013-05-083-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize db.instance_floating_address_get_all Was: Get FixedIps with corresponding instance_uuid For each FixedIp get associated FloatIp (N request) Now: Get only list of FixedIps ids Get all corresponding FloatingIp with one query (select in) Get only addresses from FloatingIps (because we are using only it) Add temporary test for db.instance_floating_address_get_all to ensure that it works as expected. Change-Id: Id3c515de0ca35707bbfe46b991c2d7cf591e431b
* | | | | | | | | | | | Merge "Use Oslo's `bool_from_string`"Jenkins2013-05-1515-66/+223
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Use Oslo's `bool_from_string`Rick Harris2013-05-1415-66/+223
| | |_|_|_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Oslo provides an equivalent implmentation of `bool_from_str` so we should switch the code to use that instead. Change-Id: I382f23af2468e276ae4342dff18cf06e1c24b755
* | | | | | | | | | | | Merge "Remove "#!/usr/bin/env python" from .py files under nova/cmd"Jenkins2013-05-1522-22/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / / / |/| | | | | | | | | | |
| * | | | | | | | | | | Remove "#!/usr/bin/env python" from .py files under nova/cmdJay Lau2013-05-1422-22/+1
| | |_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug 1178543 Now in Havana, all nova service script start up logic are moved to nova/cmd and those files are not simply python script but python files, so there is no need to still keep "#!/usr/bin/env python" for those files since they won't be run directly as scripts. Change-Id: Ic102215dc0200ec1f6b47951bef31d58b08022ef
* | | | | | | | | | | Merge "Cleanups for create-flavor"Jenkins2013-05-144-45/+35
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Cleanups for create-flavorRick Harris2013-05-144-45/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of setting defaults values to None in the signature and then setting the *real* default in the function body, it's more concise/readable to set the value in the signature itself (when dealing with immutable types). Along with this, the handling of `memory_mb` and `vcpus` was detangled so the attributes were handled in one place and not across both the non-negative and positive int checks. Change-Id: I1c06768c2fd076adc8c0a647a492dabb67b7bf79
* | | | | | | | | | | | Merge "Cleanup create flavor tests"Jenkins2013-05-141-156/+140
|\| | | | | | | | | | |
| * | | | | | | | | | | Cleanup create flavor testsRick Harris2013-05-141-156/+140
| | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for some refactoring and additional features to the create flavor method, this patch cleanups the existing tests by: * Moving flavor create tests out to their own class * Adding more coverage around boundary conditions * Making tests more orthogonal (not testing that `root_gb` was set correctly in multiple tests, for example) Change-Id: I82acadc19d2713406c3be01a104ccd64377098ed
* | | | | | | | | | | Merge "Fix response from snapshot create stub"Jenkins2013-05-146-48/+10
|\ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / |/| | | | | | / / / / | | |_|_|_|_|/ / / / | |/| | | | | | | |
| * | | | | | | | | Fix response from snapshot create stubMark McLoughlin2013-05-146-48/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A change from Oleg highlighted that the current snapshot create stub is broken because it passes a full volume for the volume_id paramter. Fix the stub and the api_samples output, but also add unit test checks which would have caught this. Change-Id: Id006e3995c7696aa8f061a2b96123ea27e4b6d3f Co-authored-by: Oleg Bondarev <obondarev@mirantis.com>
* | | | | | | | | | Merge "Hide lock_prefix argument using synchronized_with_prefix()"Jenkins2013-05-1416-66/+86
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / |/| | | | | | | | |
| * | | | | | | | | Hide lock_prefix argument using synchronized_with_prefix()Zhongyue Luo2013-05-1416-66/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lockfile module has a new convenience API which sets the lockfile prefix. Using this API, the prefix is not required everytime synchronized is used. Change-Id: Iac1cfcc83b59108164de924d20127c1cf4dd7dcd
* | | | | | | | | | Merge "Catch volume create exception"Jenkins2013-05-142-9/+31
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Catch volume create exceptionChris Yeoh2013-05-082-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Catch InvalidInput exception from cinder when the parameters are invalid such as an invalid size. Currently the exception is not caught which results in a 400 Bad Request correctly being returned, but also leaving a traceback in the logs. Correctly catching the exception and explicitly raising an HTTPBadRequest removes the production of the traceback Fixes bug #1098048 Change-Id: Ia66e67f302cf20e96417f4ff3c1430b755a4a861
* | | | | | | | | | | Merge "Pass None to image if booted from volume in live migration"Jenkins2013-05-142-1/+30
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Pass None to image if booted from volume in live migrationDongdong Zhou2013-05-082-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The destination check in live migration will fetch the image information from glance and it will throw ImageNotFound if the instance is booted from volume since there is no image id on the instance Fix bug 1170596 Change-Id: Ie683a3ca5d6430c52ead77b41f98fbcb4114ea1e
* | | | | | | | | | | | Merge "Raise InstanceInvalidState for double hard reboot"Jenkins2013-05-142-2/+32
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Raise InstanceInvalidState for double hard rebootAndrew Laski2013-05-082-2/+32
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A hard reboot is not allowed if the instance task_state is REBOOTING_HARD so check for that state and raise InstanceInvalidState. This returns the correct status of 409 to the caller. Previously the hard reboot would fail the the expected_task_state check on db.instance_update_and_get_original which would log a traceback and return a 500 to the caller. Bug 1157237 Change-Id: Ifb6111790352da5c404289b218c50d8104384301
* | | | | | | | | | | | Merge "Improve message and logging for corrupt VHD footers"Jenkins2013-05-141-15/+39
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Improve message and logging for corrupt VHD footersMatthew Sherborne2013-05-101-15/+39
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handles the output of vhd-util check a bit more intelligently. * Changes it to use LOG like in other modules * Adds a necessary import (errno) Change-Id: I75d6b9e081159bc29732a721deb7a557e5f2ee06
* | | | | | | | | | | | Merge "Adds useful debug logging to filter_scheduler"Jenkins2013-05-142-6/+21
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Adds useful debug logging to filter_schedulerPhil Day2013-05-102-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a large system (>500 hosts) the amount of logging information if everything is at DEBUG is vasts, due to the number of hosts checked for each filter However at the moment some useful information is only available within the filter's debug entrys (such as parts of the request_spec). Also instance uuids are not logged making it hard to search for instance entries. This set of changes allows it to be used in a very large install with debug turned off for everything except nova.filters Specifically: - Log.Info the instance_uuids at the start of schedule - Log.debug the request_spec at the start of schedule - Log.debug hosts in weighted order - Log.info which host has been allocated to a specific instance_uuid - Log.debug how many hosts are returned by each filter To get a count from each filter nova.filters had to be changed to generate a list after each filter rather than building a recursive generator object. Although this new approach is less elegant it does provide simple and useful insight into the behaviour of the filters, and s the impact on execution time on a system with several hundred hosts and 10 filters was negligible Change-Id: Ibbdd14f87b1dfd3cee8bf3cf6388e40b474e530a
* | | | | | | | | | | | | Merge "Make sure that hypervisor nodename is set correctly in FakeDriver"Jenkins2013-05-141-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | Make sure that hypervisor nodename is set correctly in FakeDriverHans Lindgren2013-05-081-1/+3
| | |_|/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This resolves an issue where the wrong host name is used when executing some sample_api tests individually. Resolves bug 1177802. Change-Id: I29af026e29ff8c70bb6b4c81f1bdf28cdea11140
* | | | | | | | | | | | | Merge "Fix run_tests.sh usage of tools/colorizer.py."Jenkins2013-05-141-1/+8
|\ \ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | Fix run_tests.sh usage of tools/colorizer.py.Clark Boylan2013-05-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * run_tests.sh: tools/colorizer.py expects subunit v1 and not v2. Convert the subunit stream to v1 if subunit-2to1 is present (this indicates v2 of subunit is being used) before passing the output on to tools/colorizer.py. Fixes bug #1168516 Change-Id: I6be917181fa8d18764db89e741190964546d0632
* | | | | | | | | | | | | | Merge "Fix format error in claims."Jenkins2013-05-141-10/+15
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | | Fix format error in claims.Michael Still2013-05-081-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have now seen two bug reports today about log message formatting in the claims code. I'm not 100% sure what's going on here, but I've removed the use of locals() in the hope it makes it clearer. I've also moved to treating limits as floats because I think it makes the messages clearer, but it is not a functional change. Resolves bug 1175923. Change-Id: I8b7b31f2637d1ab41d0fb2f274545181f9fddd9d
* | | | | | | | | | | | | | | Merge "Imported Translations from Transifex"OpenStack Jenkins2013-05-1424-6004/+18444
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / / / / / |/| | | | | | | | | | | | | |
| * | | | | | | | | | | | | | Imported Translations from TransifexOpenStack Jenkins2013-05-1324-6004/+18444
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifbfdeb27cd89a42c2c71146bc1197fb2b1d5032d
* | | | | | | | | | | | | | | Merge "Move get_table() from test_migrations to sqlalchemy.utils"Jenkins2013-05-132-83/+86
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \