summaryrefslogtreecommitdiffstats
path: root/nova/cells
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Update instance properties values in child cells to create instance."Jenkins2013-07-011-0/+5
|\
| * Update instance properties values in child cells to create instance.Yaguang Tang2013-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When using nova cells, in child cell, instance properties dict received from API cell is returned by database that contains instance['name']. We need to pop this from dict before creating a instance entry in child cell. The system metadata also need to be recreated in child cell because instance properties dict is converted to primitive which makes instance['system_metadata'] a list of dicts. Fix bug #1193552 Change-Id: I43a8b4c1673a831b0c87881004eb0a7e5b149d9e
* | Merge "Cells: Pass object for start/stop"Jenkins2013-06-261-0/+8
|\ \
| * | Cells: Pass object for start/stopChris Behrens2013-06-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The compute_api start/stop methods expect an Instance object, but cells is still passing the dict or sqlalchemy form. Fixes bug 1191040 Change-Id: I21e0f0b5d7e3160e23c7a84f59ae3899538c7327
* | | Merge "Cells: Add support for global cinder"Jenkins2013-06-263-2/+121
|\ \ \ | |_|/ |/| |
| * | Cells: Add support for global cinderChris Behrens2013-06-113-2/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements cinder support for compute cells when cinder is a global installation. Adds syncing of the block device mapping table between child cells and API cells. Implements blueprint cells-cinder-support Change-Id: Ife5be9922db0742c8ee4f970517396be86597cce
* | | Merge "Fix sys_meta access in prep for instance object"Jenkins2013-06-221-6/+4
|\ \ \
| * | | Fix sys_meta access in prep for instance objectChris Behrens2013-06-211-6/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various places that access instance['system_metadata'] as if it's a list of sqlalchemy models. A helper util method was created in a previous patch set in nova/utils... so this patch converts things to use it. Left one use in _init_instance() in compute/manager.py because it's being addressed with a different patch set. Related to blueprint unified-object-model Change-Id: I876a6c57f64d61d64069c884bf0414c3596e1aa0
* | | Fix KeyError exception when scheduling to child cell.Yaguang Tang2013-06-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix typo 'security_group' and update related unit tests. Fix bug #1193233 Change-Id: I6d92759b0d7e2ce81c2065a4eada35c559ccbcd7
* | | Make sure instance_type has extra_specsChris Behrens2013-06-201-1/+2
|/ / | | | | | | | | | | | | | | | | | | Make sure that when scheduling, the instance_type used in filters contains the 'extra_specs'. This is a bit ugly, but will get cleaned up with objects. Fixes bug 1192331 Change-Id: I3614f3a858840c9561b4e618fc30f3d3ae5ac689
* | Merge "Don't advertise mute cells capabilities upwards"Jenkins2013-06-193-7/+12
|\ \
| * | Don't advertise mute cells capabilities upwardsSam Morrison2013-06-133-7/+12
| | | | | | | | | | | | | | | | | | Fixes bug 1190473 Change-Id: Ic61b549869b1434df81407e499ec8b00ba8f328f
* | | Add rpc client side version control.Russell Bryant2013-06-142-2/+36
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first pass at client side version control for rpc. It allows you to configure a max version of messages that clients are allowed to send. You can find one example of how clients need to adapt in the conductor rpcapi. All other changes in rpc apis since the grizzly release are not applicable to this. Some future improvements to this could be reporting the versions supported by running services and having that be discoverable via the API. We could also consider allow setting these client side version caps via the API. For now, recommended values for these config options while attempting a rolling upgrade will just have to be documented. The config options allow specifying specific rpc api version numbers if desired, but an alias of 'grizzly' is also supported. So typically at the start of a rolling upgrade you'd have: [upgrade_levels] compute=grizzly conductor=grizzly scheduler=grizzly ... etc ... And as you update all instances of a service, you would remove that bit from your configuration across the deployment using your config management system of choice. DocImpact Implements blueprint rpc-version-control. Change-Id: I2c0fd6dd7484c87823846d7c31d6525d93cd1b43
* | Merge "Fix and enable H403 tests"Jenkins2013-06-131-1/+2
|\ \
| * | Fix and enable H403 testsDirk Mueller2013-06-121-1/+2
| |/ | | | | | | | | | | Multi-line doc-strings should end on a new, separate line. Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20
* / Fix msg version type sent to cells RPC APIBrian Elliott2013-05-291-1/+1
|/ | | | | | | | | | | Regression fix from 6b16c8731c44e4a6c80b803f3e8afdd88386d577, cannot build instances through cells. The RPC dispatcher dislikes floats for version numbers. bug 1190371 Change-Id: I18994ce8a524f88910cfe37c9b302296ce30102f
* Merge "Deprecate compute_api_class option in the config"Jenkins2013-06-061-0/+3
|\
| * Deprecate compute_api_class option in the configSenhua Huang2013-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add a function "get_compute_api_class_name" within nova.compute that returns nova.compute.cells_api.ComputeCellsAPI if cell is enabled and this cell is an API cell, and returns compute.api.API otherwise. Add an option "cell_type" to the config in group "cells". Use the default value of "cell_type" (None) for legacy configuration. Change-Id: I32f5ccf789c657b563c165bfa8244e819b1a79a6 Fixes: bug #1049249
* | API to get the Cell CapacityKaushik Chandrashekar2013-06-053-1/+19
| | | | | | | | | | | | | | | | The total RAM and the available RAM are stored in memory of CellStateManager. This API gets the available slots per flavor for a given cell. Implements: blueprint get-cell-free-ram Change-Id: I2a6dbb8835cad04f3ee058c3012490782d7c8e67
* | Call scheduler for run_instance from conductorAndrew Laski2013-06-044-44/+146
|/ | | | | | | | | | | | | | | | | | This prepares for having the conductor query the scheduler for a list of hosts to build an instance on. In order to accomplish this the API sends a build_instances message to conductor, or spawns a greenthread in local mode, rather than sending a message to the scheduler. This is being done so that conductor can handle the orchestration of long running tasks like spawning instances. By making this move, the API is free to return to the caller while conductor queries the scheduler for a host to provision to. In the case of cells the build_instances message first goes to the cells scheduler in order to pick a cell to send it to, and then it is sent to the conductor in that cell. Part of bp query-scheduler Change-Id: I4539888e78ebdbb8cef6647273b959a012280110
* Only update cell capabilites onceSam Morrison2013-05-311-1/+1
| | | | | | Simple indent level fix Change-Id: Ic137259f9461e767ecd256d9ac1297256bd9dbfe
* Cell weighing class to handle mute child cellsBrian Elliott2013-05-281-0/+72
| | | | | | | Give negative weight to child cells that have not recently sent capability or capacity updates to their parent cell. Change-Id: I7cada3e1b6f04c48b71c82d8e0a8527e44674abd
* Cells: Add filtering and weight supportChris Behrens2013-05-276-24/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds filtering and weighing support to the cells scheduler. Adds the following config options to the 'cells' group: scheduler_filter_classes -- list of filter classes scheduler_weight_classes -- list of weight classes Adds a couple of weighing modules as defaults (which removes the random cell selection): ram_by_instance_type: Select cells with the most capacity for the instance type being requested. weight_offset: Allows modifying the DB to weight a particular cell (useful for disabling a cell) Adds a filter class (TargetCellFilter) that allows specifying a scheduler hint to direct a build to a particular cell if you're an admin. DocImpact Implements blueprint cells-filter-scheduler Change-Id: I027c5734e3d6134127fcd4dd28b8ff39047416dc
* Don't update API cell on get_nwinfoChris Behrens2013-05-221-2/+2
| | | | | | | | | | | | Every call to get_instance_nw_info() updates an instance's info_cache. The purpose of this is to make sure we're constantly healing the info_cache table. However, this causes a lot of unneeded updates traveling up to the API cell. Cells has its own periodic task that heals all instance data. Fixes bug 1180304 Change-Id: I07774712a6358999fd1fdd0f5a90c6f05e3d8d6e
* Merge "Remove locals() from nova/cells/*"Jenkins2013-05-193-26/+38
|\
| * Remove locals() from nova/cells/*Chris Behrens2013-05-173-26/+38
| | | | | | | | | | | | Remove use of locals() from nova/cells/* to satisfy pyflakes, etc. Change-Id: If430226b84ce1fa974771ea1ed5b8d50480a70c0
* | Merge "Fix whitespace issue in indent"Jenkins2013-05-181-2/+1
|\ \ | |/ |/|
| * Fix whitespace issue in indentChris Behrens2013-05-151-2/+1
| | | | | | | | | | | | Extra whitespace cleanup in nova/cells/messaging.py Change-Id: I000b2585ab9018af42f25bc83e7e0b0c2bd92e5a
* | Cells: Don't allow active -> buildChris Behrens2013-05-151-0/+16
|/ | | | | | | | | | | | | | | | 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
* Hide lock_prefix argument using synchronized_with_prefix()Zhongyue Luo2013-05-141-2/+2
| | | | | | | 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
* Update to using oslo periodic tasks implementation.Michael Still2013-05-011-2/+3
| | | | | | | Convert nova to using the oslo periodic tasks implementation. There are no functional changes in this review. Change-Id: I767e0ad17781d5f9d5e987e0a4ad65796243ae5c
* Merge "Add an rpc API common to all services."Jenkins2013-04-251-1/+2
|\
| * Add an rpc API common to all services.Russell Bryant2013-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an rpc API that is exposed by all services. The methods in this API exist in their own namespace and are versioned independently of the main API for the service. The first method for this API is a simple ping() method. This method exists in the conductor rpc API already, and could be more generally useful. Other methods will be added in later patches. The base rpc API will be exposed from all services automatically unless they override the create_rpc_dispatcher method in the base manager class. All services need to pass a service_name into the base manager constructor. Some services already did this, but now it's needed for all of them. Implements blueprint base-rpc-api. Change-Id: I02ab1970578bc53ba26461b533d06d1055c2d88e
* | Make os.services.update work with cellsMatthew Sherborne2013-04-233-1/+70
|/ | | | | | | | | | | | | | | | | | | | | | | In the nova.api.openstack.compute.contrib.services: * Make update (enable/disable) service work In nova.compute.api.api.HostAPI: Add - service_update - Used by openstack api's services.py In nova.compute.api.cells_api.HostAPI: Add - service_update - Used by openstack api's services.py In cells: * Increase API version from 1.6 to 1.7 * Add service_update Fixes bug #1150499 Change-Id: I5651bd5bc328692df82f4d9da27d390a8c95e03f
* Remove unnecessary LOG initialisationStanislaw Pitucha2013-04-102-5/+0
| | | | | | | Remove a lot of getLogger lines and imports of logging in modules which never use that functionality. Change-Id: Icdaee2c540980412b000d02ebf1ec568dcf5b38a
* Fix console support with cellsChris Behrens2013-03-193-1/+81
| | | | | | | | | | | | | | | | | | | | | | The (relatively recent) security fixes for consoleauth do not work with cells because consoleauth and the compute manager for the instance talk to different rabbit servers. consoleauth is in the API cell and the compute manager is in a child cell. This patch adds code to proxy the following via cells: 1) compute -> consoleauth's delete_tokens_for_instance() 2) consoleauth -> compute's validate_console_port() Also: On instance deletion when the compute manager tells consoleauth to delete tokens for the instance, it's not necessary to do an rpc.call and block. The only purpose it could serve would be log a traceback on failure on the compute manager side, but that seems unnecessary. There's no return value. This patch changes it to an rpc.cast instead. Fixes bug 1154755 Change-Id: Ic763f2a5c0dcff7b7ccfac5927680e7881605f61
* Merge "Fix behaviour of split_cell_and_item"Jenkins2013-03-132-7/+12
|\
| * Fix behaviour of split_cell_and_itemMatthew Sherborne2013-03-122-7/+12
| | | | | | | | | | | | | | | | | | If you try to split a cell and item, with no path!to!cell@ in it, it'll now return None for the cell, instead causing a ValueError when trying to split the result. Change-Id: I228b9f3b0f63f8c7a6004b3206f5312ed2a878bc Fixes: bug #1153841
* | Merge "Remove instance['instance_type'] relationship from db api"Jenkins2013-03-121-2/+2
|\ \ | |/ |/|
| * Remove instance['instance_type'] relationship from db apiDan Smith2013-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This removes the entire relationship between an instance and the flavor it was created from. As such, it removes two tests entirely which examined the old behavior. This is one change in a series aimed at removing the use of instance-linked instance_type objects, in favor of the decoupled type data in system_metadata. See bug 1140119 for more details. Change-Id: I8b525a900bf2dc6b193e54aae35fc32248e4cff4
* | Merge "Add ability to control max utilization of a cell"Jenkins2013-03-112-7/+17
|\ \ | |/ |/|
| * Add ability to control max utilization of a cellBrian Elliott2013-03-102-7/+17
| | | | | | | | | | | | | | | | | | | | | | Add a 'reserve_percent' config flag to cells to control the maximum free capacity that a child cell will be advertised to its parent(s). This gives the ability to leave some reserve capacity in child cells for operational maintenance. Change-Id: I1dae1eae4f61ca8079c6f24e60176c31fd8a759d
* | Merge "Rework instance actions to work with cells"Jenkins2013-03-084-1/+92
|\ \
| * | Rework instance actions to work with cellsAndrew Laski2013-02-254-1/+92
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a cells setup an instance action is recorded at the global cell level while events try to get recorded in a child cell compute node or scheduler. The event recording fails because it can't find an action to link to. This patch adds the recording of actions at the child cell level, and changes the API extension to query the db in a child cell for the record of actions and events. This does not address the fact that an action is recorded at the global cell level. Bug 1132935 Change-Id: I5831f146397e7afa2d93d26c5d6f9abb9bc6670d
* / instance_info_cache_update creates wronglyChris Behrens2013-03-011-2/+7
|/ | | | | | | | | | | | | | | If instance_info_cache_update() finds that the entry doesn't exist, it attempts to create an entry, but it didn't use all of the data. This patch fixes that. Also if the info_cache entry was found to be deleted, the old code would attempt to create a new entry. This would have failed with DBDuplicateEntry.. Instead, raise InstanceInfoCacheNotFound, which is more appropriate. (It doesn't seem we actually ever hit this case.) Fixes bug 1131594 Change-Id: Id008faf5c4a48ab6a04e75796b7e61dea102acc9
* Use oslo-config-2013.1b4Mark McLoughlin2013-02-197-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Assign unique names with os-multiple-create.Russell Bryant2013-02-151-2/+5
| | | | | | | | | | | | | | This patch introduces a new configuration option, multi_instance_display_name_template, which makes it so that all instances are given a unique display_name and hostname when requesting that multiple instances get created at the same time. Implements bp multi-boot-instance-naming DocImpact Change-Id: Id8e7dac1adadbb101dd1027807867ab13d3b7e80
* Cells: Add cells support to hypervisors extensionChris Behrens2013-02-073-1/+102
| | | | | | | | This removes the DB calls from the extension and moves them into HostAPI(). The cells version of HostAPI() proxies them to the appropriate cell or cells. Change-Id: I17ff10e62d2f10b85a557edcc1509ca3b0d15a29
* Cells: Add cells support to instance_usage_audit_log api extensionChris Behrens2013-02-074-1/+98
| | | | | | | | | Adds task_log_get_all() call to HostAPI() so that we can use the local DB when cells is disabled or proxy via cells if cells is enabled. Adds task_log_get_all() call to cells. Change-Id: I9e78c17fcf70f98903d0a26c1de3e2581b8977ad
* Cells: Add support for compute HostAPI()Chris Behrens2013-01-214-2/+165
| | | | | | | | | | | | | | This will allow the hosts API extension to work. Calls to get service information from the DB are proxied via cells. When using the host extension, the 'id' and 'host' fields for service/compute will be modified to have the cell prepended to it. One can do a 'show' on a 'path!to!cell@id' to see details for a particular host in the 'path!to!cell' cell, for instance. Implements bp/nova-compute-cells Change-Id: I8137fa64d2578acfc3d2457c231de2b0d69b96d8