summaryrefslogtreecommitdiff
path: root/nova
Commit message (Collapse)AuthorAgeFilesLines
* Move to proper target_cell calling conventionDan Smith2017-05-2320-132/+155
| | | | | | | | | | | | | | | | | | | | | | | | When target_cell was originally written, the intent was to yield the context that should be used. It currently mutates the input context, which means you don't have to actually use the yielded one, because we have a lot of stuff that would break otherwise. This fixes all the current uses of it to be proper, and adjusts tests accordingly. This is separate from changing target_cell's behavior to not mutate the input context specifically to isolate the mechanical changes from ones that actually need different behavior. In addition to code that was already using target_cell() but not depending on the yielded context, the _create_block_device_mapping() method in conductor/manager.py was still depending on the shared context switching to target the BDM objects on create. Since these were prepared with the context prior to having determined where the instanace was going to end up, we need to explicitly target the object context on create (like the rest of the boot workflow does for other objects in schedule_and_build_instances()). Related to blueprint cells-aware-api Change-Id: I35206e665f2c81531a2269dd66f8c5c0df834245
* Merge "api-ref: Example verification for servers-actions.inc"Jenkins2017-05-223-0/+112
|\
| * api-ref: Example verification for servers-actions.incTakashi NATSUME2017-05-223-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Example for the rebuild action The functional test is modified and the example is replaced with v2.26 examples. * Example for the rescue action The example in API reference is replaced with the example with 'rescue_imgae_ref'. Parameters for the rebuild action and the rescue action are also fixed. The patch completes the parameter verification and the example verification of servers-actions.inc. Change-Id: Iaf8808b13d1fdfead50da4cd447b3893578f76dd Implements: blueprint api-ref-in-rst-pike
* | Merge "Use plain routes list for os-certificates endpoint instead of stevedore"Jenkins2017-05-222-20/+11
|\ \
| * | Use plain routes list for os-certificates endpoint instead of stevedorejichenjc2017-05-222-20/+11
| |/ | | | | | | | | | | | | | | | | | | | | This patch adds os-certificates related routes by a plain list, instead of using stevedore. After all the Nova API endpoints moves to the plain routes list, the usage of stevedore for API loading will be removed from Nova. Partial-implement-blueprint api-no-more-extensions-pike Change-Id: I5ea28983bddbc615cb5e8613d25367341cdef0de
* | Merge "Support tag instances when boot(1)"Jenkins2017-05-223-0/+30
|\ \ | |/ |/|
| * Support tag instances when boot(1)Kevin_Zheng2017-04-283-0/+30
| | | | | | | | | | | | | | | | | | | | This is the first patch of the series, this patch adds tags to build_request table and corresponding db update script. Change-Id: I01e1973449a572ecd647ede0a70d274eac1583bd Part of blueprint support-tag-instance-when-boot
* | Merge "nova-manage: Deprecate 'log' commands"Jenkins2017-05-191-0/+5
|\ \
| * | nova-manage: Deprecate 'log' commandsStephen Finucane2017-05-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | These aren't maintained and their usefulness is questionable, given the availability of logs in '/var/log/' and the plethora of powerful tools (Logstash) that can be used to parse these logs in large deployments. Change-Id: I685512a17b8aea700fadf167571f37ecf1874861
* | | Merge "nova-manage: Deprecate 'host' commands"Jenkins2017-05-191-0/+5
|\ \ \ | |/ /
| * | nova-manage: Deprecate 'host' commandsStephen Finucane2017-05-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These operations can be accomplished using the REST API [1]. There's no reason to keep them in nova-manage. [1] https://developer.openstack.org/api-ref/compute/#compute-services-os-services Change-Id: If1e095b1b533f6e9a56486b8aa7e3976e14c1ed2 Partially-Implements: blueprint deprecate-os-hosts
* | | Merge "nova-manage: Deprecate 'project', 'account' commands"Jenkins2017-05-191-3/+46
|\ \ \ | |/ /
| * | nova-manage: Deprecate 'project', 'account' commandsStephen Finucane2017-05-191-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these operations can be accomplished using the REST API [1], with the 'quota_usage_refresh' command being the sole exception. This particular command is duplicated in a new category - quota - thus allowing us to fully deprecate the entire 'project' and 'account' categories. Note that the '(project|account) quota_usage_refresh' command has been named 'quota refresh' and not 'quota usage_refresh'. This is because cliff, which will be used by 'nova-manage' in the future, does not support underscores in command names. [1] https://developer.openstack.org/api-ref/compute/#quota-sets-os-quota-sets Change-Id: Ic02a96802d2a38ed9c4e00991a6bd2088dfcffc6
* | | Merge "Deprecate scheduler trusted filter"Jenkins2017-05-192-6/+26
|\ \ \
| * | | Deprecate scheduler trusted filterMike Perez2017-05-192-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to being marked experimental since it has existed on May 28, 2012 with no real activity of development since, this filter is being deprecated. mailing list discussion: http://lists.openstack.org/pipermail/openstack-operators/2017-May/013371.html Change-Id: If6e53feeb97e6050c1eb7962110ed89504c952fc
* | | | Merge "Cache database and message queue connection objects"Jenkins2017-05-193-6/+53
|\ \ \ \ | |_|/ / |/| | |
| * | | Cache database and message queue connection objectsmelanie witt2017-05-183-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently in the gate we have seen a trace on some work-in-progress patches: OperationalError: (pymysql.err.OperationalError) (1040, u'Too many connections') and at least one operator has reported that the number of database connections increased significantly going from Mitaka to Newton. It was suspected that the increase was caused by creating new oslo.db transaction context managers on-the-fly when switching database connections for cells. Comparing the dstat --tcp output of runs of the gate-tempest-dsvm-neutron-full-ubuntu-xenial job with and without caching of the database connections showed a difference of 445 active TCP connections and 1495 active TCP connections, respectively [1]. This adds caching of the oslo.db transaction context managers and the oslo.messaging transports to avoid creating a large number of objects that are not being garbage-collected as expected. Closes-Bug: #1691545 [1] https://docs.google.com/spreadsheets/d/1DIfFfX3kaA_SRoCM-aO7BN4IBEShChXLztOBFeKryt4/edit?usp=sharing Change-Id: I17e0eb836dd87aac5859f506e7d771d42753d31a
* | | | Merge "Fix decoding of encryption key passed to dmcrypt"Jenkins2017-05-192-4/+6
|\ \ \ \
| * | | | Fix decoding of encryption key passed to dmcryptJackie Truong2017-05-152-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the decoding of the encryption key passed to dmcrypt. During the key management move from Nova to Castellan, in the Newton release, conversion of the encryption key (from a string to list of unsigned ints) was removed from the key retrieval method. This patch updates dmcrypt to decode an encryption key string, rather than a list of unsigned ints. See the linked bug for more information. The method used to decode the encryption key has been updated to use binascii, as done in os-brick [1], to maintain consistency. The key generation and decoding portions of test_dmcrypt have been updated to reflect this change and ensure compatibility with both, Python 2 and Python 3. [1] https://github.com/openstack/os-brick/blob/6cf9b1cd689f70a2c50c0fa83a9a9f7c502712a1/os_brick/encryptors/cryptsetup.py#L100-L102 Depends-On: I5fe3e5d5e5a9694d0dbe5b59248e5eaf89858c62 Closes-Bug: #1688342 Change-Id: I050585ecb55742a972038cf72b0650321ded2856
* | | | | Merge "Skip ceph in grenade live migration job due to restart failures"Jenkins2017-05-191-6/+19
|\ \ \ \ \
| * | | | | Skip ceph in grenade live migration job due to restart failuresMatt Riedemann2017-05-181-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chnage I914430d68f64d29932c9409d055b15e4cb384ec4 made the live migration scripts assume everything is running under systemd, which is fine for the non-grenade job since devstack on master (pike) defaults to run everything under systemd. We missed, however, that the grenade live migration job is starting from Ocata where screen is used by default, so when we get to the ceph part of this job in the grenade setup, trying to restart glance-api via systemctl fails since it's running under screen, not systemd. For now we'll just skip the ceph live migration setup in the grenade run until either the bug is fixed or until Queens is our master branch, at which point the old side for grenade is Pike and running under systemd. Change-Id: Ia0ec32dc7cfe744b21b926949c4ab046f9417bc7 Related-Bug: #1691769
* | | | | | Merge "Address comments when moving volume detach to block_device.py"Jenkins2017-05-192-11/+18
|\ \ \ \ \ \
| * | | | | | Address comments when moving volume detach to block_device.pyMatt Riedemann2017-05-102-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses some of the nit comments from change: I7a53e08f3fad6abb27a1d8ad425b4f916341cab3 The TODOs in the test_compute_mgr are clarified to explain that rather than completely move those tests, which we don't want to do since we still want test coverage on the compute manager code, what we really want is test coverage for the detach and driver_detach methods that live in DriverVolumeBlockDevice now. Change-Id: I07a05a52a832f9e2687369666c6140c076412856
* | | | | | | Merge "Fix uuid replacement in aggregate notification test"Jenkins2017-05-191-6/+4
|\ \ \ \ \ \ \
| * | | | | | | Fix uuid replacement in aggregate notification testTakashi NATSUME2017-05-181-6/+4
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a UUID in the response body of create aggegate API instead of self.ANY. TrivialFix Change-Id: Id962519e36aff97419579fc03d69ee5b2e7c763e
* | | | | | | Merge "Use plain routes list for server-password endpoint instead of stevedore"Jenkins2017-05-192-22/+9
|\ \ \ \ \ \ \
| * | | | | | | Use plain routes list for server-password endpoint instead of stevedoreKevin_Zheng2017-05-172-22/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds server-password related routes by a plain list, instead of using stevedore. After all the Nova API endpoints moves to the plain routes list, the usage of stevedore for API loading will be removed from Nova. Partial-implement-blueprint api-no-more-extensions-pike Change-Id: Ic05b858fa5db711e0e755e6d7c2beaffbc9bc2b8
* | | | | | | | Merge "Change log level from ERROR to DEBUG for NotImplemented"Jenkins2017-05-192-1/+4
|\ \ \ \ \ \ \ \
| * | | | | | | | Change log level from ERROR to DEBUG for NotImplementedTao Li2017-05-192-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exception message should not be logged in file when some methods are not implemented. Closes-Bug: #1674257 Change-Id: If5759272cd295448ad4c33de2c611706edc8f62f
* | | | | | | | | Merge "Correct the error message for query parameter validation"Jenkins2017-05-192-7/+23
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Correct the error message for query parameter validationHe Jie Xu2017-05-192-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the error message returned by failed query parameter validation didn't include correct parameter name. This patch correct that. Change-Id: Ifd0b37084709c2728749b5b7b317f304b0488269 Closes-Bug: #1655710
* | | | | | | | | | Merge "Skip policy rules on attach_network for none network allocation"Jenkins2017-05-192-1/+27
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Skip policy rules on attach_network for none network allocationjianghua wang2017-05-192-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With microversion >= 2.37 and change the value for policy "os_compute_api:servers:create:attach_network" from default - "admin_or_owner" e.g. admin_api, it will always fail the server create for non-admins, even when the network is "none". Change-Id: Ic21598f4f31f73ee319e1b58a55dadeeba2644b2 Closes-bug: 1686113
* | | | | | | | | | | Merge "Catch exception.OverQuota when create image for volume backed instance"Jenkins2017-05-192-1/+14
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Catch exception.OverQuota when create image for volume backed instanceKevin_Zheng2017-05-182-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When create image for a volume backed instance, nova will create snapshots for all volumes attached to the instance in Cinder, and if quota exceed in Cinder, HTTP 500 will raise, we should capture this error and raise 403. Change-Id: Ic62478e22a7477cfaefac3e63c383082d66bd635 Closes-Bug: #1689284
* | | | | | | | | | | | Merge "Parse algorithm from cipher for ephemeral disk encryption"Jenkins2017-05-183-1/+41
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Parse algorithm from cipher for ephemeral disk encryptionKaitlin Farr2017-04-263-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nova's keymgr implementation used to have default values for the algorithm and bit length. Castellan does not have default values, and when Castellan replaced keymgr in Ib563b0ea4b8b4bc1833bf52bf49a68546c384996, the parameters to the create_key method were not updated. This change parses the algorithm from the cipher value and passes it to Castellan's key manager interface. Closes-Bug: #1651887 Change-Id: Ib90bc7571aef59325be0efe123fcf12e86252b85
* | | | | | | | | | | | | correctly log port id in neutron apiChris Friesen2017-05-181-1/+1
| |_|_|_|_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the log to correctly report the port id in the log. As it stands, it's reporting the last port id from the previous loop over the ports. Change-Id: I1f3dec9fd05ffa9f11f82576d0755d334aca01a0 Closes-Bug: #1691780
* | | | | | | | | | | | Merge "Use physical utilisation for cached images"Jenkins2017-05-182-3/+109
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | Use physical utilisation for cached imagesJohn Hua2017-04-062-3/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since glance images are downloaded and snapshotted before they are used. Only a small proportion of its VDI will be in use and it will never grow. So the real disk usage for VDIs varies with their capability to expand. Disks connected to VMs continue to use the virtual utilisation as they are able to expand. Change-Id: Ie7aae58a47e6651af5b609fb9abc13ab5d61e4df Closes-bug: 1612057
* | | | | | | | | | | | Libvirt support for tagged volume attachmentArtom Lifshitz2017-05-174-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for tagged volume attachment to the libvirt driver. Change-Id: I8b475992b881db08cf1354299cc86042413074cc Implements: blueprint bp/virt-device-tagged-attach-detach
* | | | | | | | | | | | Libvirt support for tagged nic attachmentArtom Lifshitz2017-05-173-0/+93
| |_|_|/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for tagged network interface attachment to the libvirt driver. Change-Id: Ib86b2b8a5e784e998da930d3f48b6bc64aead6c3 Implements: blueprint virt-device-tagged-attach-detach
* | | | | | | | | | | Merge "Totally freeze the extension_info API"Jenkins2017-05-1724-908/+845
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / / / | |/| | | | | | | | |
| * | | | | | | | | | Totally freeze the extension_info APIHe Jie Xu2017-05-0824-908/+845
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extension will be removed from the Nova API totally. The extension_info API is just for backward compatibility. And there is no way to disable/enable the extension, also the discovery policy rules are removed, so it is time to just hard-code most of the logic at here. Partial-implement-blueprint api-no-more-extensions-pike Change-Id: I56d859beb675199b209587bfe0a23cd9b75233ad
* | | | | | | | | | | Merge "objects: remove cpu_topology from __init__ of InstanceNUMATopology"Jenkins2017-05-173-7/+8
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / |/| | | | | | | | | |
| * | | | | | | | | | objects: remove cpu_topology from __init__ of InstanceNUMATopologySahid Orentino Ferdjaoui2017-01-183-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the initialization of cpu_topology to None when creating object InstanceNUMATopology Change-Id: Ibd5f0436d8ce2d819f71e6897216f67b4c978407
* | | | | | | | | | | Merge "Make NovaException format errors fatal for tests"Jenkins2017-05-174-6/+58
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Make NovaException format errors fatal for testsmelanie witt2017-05-054-6/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently, as part of the centralize-config-options work, functionality that detects errors in NovaException formats was removed [1] because the config option controlling it was solely being used for testing. We have had to do a bug fixes like [2] where a testing exception format error in a mock decorator caused gorpy output to the console during unit test runs. To help prevent future bugs, this restores the error detecting functionality by patching the exception handling to reraise format error exceptions, only for tests. The _log_exception() function has to be patched at import time in order to catch exception KeyErrors that are in mock decorators because those evaluate at test listing time, before tests actually run. [1] https://review.openstack.org/#/c/397823 [2] https://review.openstack.org/#/c/411502 Change-Id: I680fd46d029ff58bd3b72ef7c7903c2271b26549
* | | | | | | | | | | | Merge "do not log error for missing _save_tags"Jenkins2017-05-162-0/+23
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | do not log error for missing _save_tagsBalazs Gibizer2017-05-112-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The instance.save always logs the below error message if instance.tags are lazy loaded before the save. AttributeError: 'Instance' object has no attribute '_save_tags' The tags should never be saved through the instance object so adding an empty _save_tags function is better than logging an error every time. Change-Id: Id41b06e7a294d803bd580d38ef04cc0ffb32a3bf