summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | Fix a bug on db.instance_get_by_uuid in compute/manager.pyShane Wang2012-08-091-1/+1
| |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter for db.instance_get_by_uuid() is instance_uuid instead of instance. Correct it in the code. Change-Id: Ibc4d8352c101dc3be11a765646d4ef701e330b50 Signed-off-by: Shane Wang <shane.wang@intel.com>
* / / / / / / / / / Fix invalid exception format stringsJohannes Erdfelt2012-08-071-3/+3
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some exception formation strings were missing the conversion type Change-Id: I99fda0a49acce8c5c1f1b9a09bcaff24140aaf44
* | | | | | | | | Merge "Cleanup consoles test cases"Jenkins2012-08-071-3/+1
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Cleanup consoles test casesJohannes Erdfelt2012-08-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compute.API.get() is already stubbed to fake_get() in the setUp method, it's unnecessary to do it again. Change-Id: I2042a9fd7f28908a45d93b00bc5bd4b580c24977
* | | | | | | | | | Merge "Update devref for general host aggregates"Jenkins2012-08-071-5/+11
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Update devref for general host aggregatesJoe Gordon2012-08-071-5/+11
| | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update devref to explain the new definition of host aggregates. part of blueprint general-host-aggregates Change-Id: I5d46c4c4253a4d9e74a52192d1e6244843d11711
* | | | | | | | | | Merge "Return 409 error if get_vnc_console is called before VM is created"Jenkins2012-08-074-1/+39
|\ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | |
| * | | | | | | | | Return 409 error if get_vnc_console is called before VM is createdJohannes Erdfelt2012-08-074-1/+39
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1034117 In the xenapi driver, the URL returned for a VNC console will include information to locate the particular VM on the dom0, however the VM isn't create until part way through the build process. This leaves a window where a 404 error could be returned by the os-getVNCConsole action. Change this to return a 409 meaning it's not ready yet. Change-Id: Icc3b288d1aae12eb264b2be7fc8f9465d568af74
* | | | | | | | | Merge "Check against unexpected method call"Jenkins2012-08-071-1/+1
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Check against unexpected method callYun Mao2012-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unexpected method call was counted but never asserted. Change-Id: Ice2b7d3bd490ab9bf14450d765151dd234c0e064
* | | | | | | | | | Merge "Remove temporary hack from checks_instance_lock."Jenkins2012-08-072-44/+21
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | |
| * | | | | | | | | Remove temporary hack from checks_instance_lock.Russell Bryant2012-08-072-44/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The checks_instance_lock decorator was temporarily made a mess of while the compute manager was being converted over to taking an instance instead of instance_uuid as a parameter. Now that all methods that use this decorator have been converted, the code can be simplified. The _get_lock() method was updated to only look up an instance from the db if necessary. One of the unit tests had to be updated to account for this. These changes illustrate a good point about all of these no-db-messaging patches. Aside from silly typos, the types of bugs most likely to occur due to these changes are due to code looking at stale instance state since the state is being pulled out of the database less often. Hopefully I've caught everything, but it was worth pointing out as something others should be aware of. Part of blueprint no-db-messaging. Change-Id: I02e6a5f2354f2e9ae8ea403b43359eb1bc8bae27
* | | | | | | | | | Prohibit file injection writing to host filesystemPádraig Brady2012-08-073-17/+36
| |_|_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refinement of the previous fix in commit 2427d4a9, which does the file name canonicalization as the root user. This is required so that guest images could not for example, protect malicious symlinks in a directory only readable by root. Fixes bug: 1031311, CVE-2012-3447 Change-Id: I7f7cdeeffadebae7451e1e13f73f1313a7df9c5c
* | | | | | | | | Merge "Remove temporary hack from wrap_instance_fault."Jenkins2012-08-072-37/+11
|\| | | | | | | |
| * | | | | | | | Remove temporary hack from wrap_instance_fault.Russell Bryant2012-08-072-37/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wrap_instance_fault decorator had a temporary hack in place while methods in the compute manager were being converted to be able to take an instance instead of an instance_uuid. Now that it's done, the decorator can be simplified. Part of blueprint no-db-messaging. Change-Id: I496d58137ef720ff31acc70a2b7acc670a088ce6
* | | | | | | | | Merge "Remove deprecated use Exception.message"Jenkins2012-08-071-3/+3
|\ \ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | |
| * | | | | | | | Remove deprecated use Exception.messageYun Mao2012-08-071-3/+3
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This usage is deprecated since Python 2.6. Use the recommended style instead. str is also replaced with unicode. Change-Id: I2adfd7fdfdf47b70ef170a2daa28926764cf0337
* | | | | | | | Merge "Fixes parameter passing to tgt-admin for iscsi"Jenkins2012-08-071-2/+2
|\ \ \ \ \ \ \ \
| * | | | | | | | Fixes parameter passing to tgt-admin for iscsiRenuka Apte2012-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1033670 The change to add persistent volumes for tgtd 1ba3dfec, passes parameters as '--conf %s' % volume_path, '--update %s' % vol_id etc. which cause the tgt-admin command to fail silently because the options are misquoted. Instead pass as '--conf', volume_path Change-Id: Ic986ee5fe21a0927c1aa2f8c94420fe30127d088
* | | | | | | | | Merge "Update RPC code from common"Jenkins2012-08-076-31/+40
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Update RPC code from commonEric Windisch2012-08-066-31/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix impl_zmq following common migration. A number of problems have been discovered with impl_zmq following the move to common. These problems have been resolved in openstack-common. This patch squashes those changes and brings them into Nova. * rpc/common - Removes conf argument where it was no longer necessary. * AMQP - Fix import order * Qpid - Fix heartbeat * __init__ - Fix line length, pep8 * proxy - Enable fanout_cast and fanout_cast_to_server to provide topic Change-Id: If9c4616a50d7ec6c7a7e4adad58dc2fdcfc3ffdf
* | | | | | | | | | Merge "Fix up some instance_uuid usage."Jenkins2012-08-071-15/+19
|\ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / |/| | | / / / / / / | | |_|/ / / / / / | |/| | | | | | |
| * | | | | | | | Fix up some instance_uuid usage.Russell Bryant2012-08-071-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes up some issues introduced by no-db-messaging changes. There were a few places where I missed converted instance_uuid to instance['uuid']. There were also a couple of places where instance_uuid needed to be set for the synchronized decorator. Change-Id: I754c52f91a44c18d0756caa7154a807973ad4e91
* | | | | | | | | Update vmops to access metadata as dict.Dan Prince2012-08-072-14/+11
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the inject_instance_metadata in xenapi/vmops.py so that it accesses metadata as a dict instead of an object. This resolves issues causing exceptions when booting instances on XenServer. Fixes LP Bug #1033963 Change-Id: I58810764abd32d9d292f8282b54c126bf1f4de18
* | | | | | | | Merge "Improve external locking on Windows"Jenkins2012-08-071-8/+38
|\ \ \ \ \ \ \ \
| * | | | | | | | Improve external locking on WindowsPádraig Brady2012-08-071-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2c15248 improved external locking for POSIX. See that commit for advantages of the technique used. This implements the same technique for Windows systems. Fixes bug: 1033596 Change-Id: I298309bb1c84499f2060c172213d355aa7ce54e5
* | | | | | | | | Merge "Allow loaded extensions to be checked from servers"Jenkins2012-08-0711-16/+29
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Allow loaded extensions to be checked from serversVishvananda Ishaya2012-08-0411-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related to blueprint disable-server-extensions Adds an is_loaded method to the extension manager and passes the extension manager to the servers controller so that it can be used to enable optional post parameters. The extension manager is also saved in ExtensionDescriptors because they may need access to it if they are subclassing the servers Controller. Tests are included to verify that extension loading can be properly determined. Change-Id: Ie4effbb885370dc80d86ee13d27c9263f7f63cad
* | | | | | | | | | Merge "Solve possible race in semaphor creation"Jenkins2012-08-071-8/+8
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Solve possible race in semaphor creationStanislaw Pitucha2012-08-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solve the race condition described in the bug 872558 report which can result in: - thread crashing trying to remove semaphore from dict - two threads getting different semaphores for the same name First case is solved automatically by weakref dictionary. No explicit deletion takes place. The second case is solved by getting existing or new semaphore in one step. Once a local reference to the semaphore is obtained, it can be safely assigned to the dictionary if it's missing. If it's present, it will not be removed anymore because there's at least one strong reference present (local variable 'sem'). This solution is only valid for greenthreads. Change-Id: I6bddc3e7abb39fd75e1f03abb2ea0f911b761957
* | | | | | | | | | | Merge "Make extension aliases consistent"Jenkins2012-08-072-3/+2
|\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / | |/| | | | | | | | |
| * | | | | | | | | | Make extension aliases consistentVishvananda Ishaya2012-08-042-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related to blueprint disable-server-extensions The alias for extensions should start with os- where possible. Unfortunately the alias is used for xml namespacing in some cases so it cannot be made consistent for some legacy extensions There will continue to be a small number of output extensions that have no special namespace because they were added before we started namespacing extensions and they need to remain the same for legacy compatibility. In the future all extensions should include a namespace prefix when adding extra data to the api. Change-Id: I3a31fa21e16dc7c289d7f5b2e4736ab48bf42557
* | | | | | | | | | | Merge "Move root_helper deprecation warning into execute."Jenkins2012-08-071-7/+8
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Move root_helper deprecation warning into execute.Dan Prince2012-08-061-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By moving this warning into the execute function and out of the top level utils module we eliminate warnings that could occur when Nova code includes utils.py but doesn't setup a config file properly. Fixes LP Bug #1032657. Change-Id: Iae41ead251a64717de3bf7cba3fa206cda278a20
* | | | | | | | | | | | Merge "Rename private methods of compute manager."Jenkins2012-08-072-20/+20
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | Rename private methods of compute manager.Russell Bryant2012-08-062-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an underscore in front of add_instance_fault_from_exc and error_out_instance_on_exception in the compute manager. They are private methods that are not part of the rpc API. Change-Id: Ic5c0c0fb1a599d38c100810a144592b082e1ebad
* | | | | | | | | | | | Merge "Send full instance to compute live_migration."Jenkins2012-08-076-29/+42
|\| | | | | | | | | | |
| * | | | | | | | | | | Send full instance to compute live_migration.Russell Bryant2012-08-066-29/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the instance_id parameter and send a full instance to live_migration in the compute manager. This cuts down on database access required by the compute manager. Part of blueprint no-db-messaging. Change-Id: Ic21f061702704ddeaa6925aac4ecad69b0e8de18
* | | | | | | | | | | | Merge "Add underscore in front of post_live_migration."Jenkins2012-08-072-4/+4
|\| | | | | | | | | | |
| * | | | | | | | | | | Add underscore in front of post_live_migration.Russell Bryant2012-08-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename this method of the compute manager by just adding an underscore in front of the name. This is a private method and is not part of the rpc api. Make that more apparent by using the private method naming convention. Change-Id: I66633ffd59c6d670ccc748855fb1dcbac7df222d
* | | | | | | | | | | | Merge "Send full instance to scheduler live_migration."Jenkins2012-08-077-35/+32
|\| | | | | | | | | | | | |_|_|_|_|_|/ / / / / |/| | | | | | | | | |
| * | | | | | | | | | Send full instance to scheduler live_migration.Russell Bryant2012-08-067-35/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the instance_id parameter and send a full instance dict to the live_migration method of the scheduler manager. This cuts down on some unnecessary database access in the scheduler. Part of blueprint no-db-messaging. Change-Id: Ic45105300c967c760559df2225e59e515cea8b7b
* | | | | | | | | | | Merge "Send full instance to run_instance."Jenkins2012-08-078-210/+238
|\| | | | | | | | | |
| * | | | | | | | | | Send full instance to run_instance.Russell Bryant2012-08-068-210/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates run_instance in the compute manager to take a full instance instead of just an instance UUID. This reduces db access required by the compute nodes. The scheduler code needed some work here as well since it wasn't using the compute rpcapi for calling run_instance. Part of blueprint no-db-messaging. Change-Id: If5545748122b4ff9e2da6788cbd4b0fa26c4db99
* | | | | | | | | | | Merge "Use dict style access for image_ref."Jenkins2012-08-072-2/+2
|\| | | | | | | | | | | |_|_|_|/ / / / / / |/| | | | | | | | |
| * | | | | | | | | Use dict style access for image_ref.Russell Bryant2012-08-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | Merge "Use explicit arguments in compute manager run_instance."Jenkins2012-08-062-18/+24
|\| | | | | | | | | | |_|_|_|/ / / / / |/| | | | | | | |
| * | | | | | | | Use explicit arguments in compute manager run_instance.Russell Bryant2012-08-062-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use explicit arguments in functions in the run_instance code path of the compute manager. I think methods of the rpc API are better this way as we have to be careful when changing these functions so we handle versioning and backwards compatibility properly. Spelling out all of the arguments like this makes it easier to catch when things change and to make sure they are changed properly. This is in preparation of changing the instance_uuid to an instance dict, instead. Part of blueprint no-db-messaging. Change-Id: I1e141b471040b0fd4833d4e08d44166a9d12bcad
* | | | | | | | | Merge "Remove topic from scheduler run_instance."Jenkins2012-08-0611-25/+26
|\| | | | | | | |
| * | | | | | | | Remove topic from scheduler run_instance.Russell Bryant2012-08-0611-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This argument to run_instance was unused, so just remove it. Change-Id: I42366514285a2355f647c776af140effc1618b7d