Commit Graph

39163 Commits

Author SHA1 Message Date
Eli Qiao 7c2cab6208 API: Mapping ConsoleTypeInvalid exception to HTTPBadRequest
We need to catch up ConsoleTypeInvalid in API layer to avoid 500 error
in case we passed invalid console type (> v2.6).

Closes-Bug: #1551104
Change-Id: I8be6dd1efd9057fb582713e0fe9fe0d626832fda
2016-03-07 16:06:47 +08:00
Jenkins 3781ef8e0c Merge "Ironic: Clean up if configdrive build fails" 2016-03-07 00:13:04 +00:00
Jenkins 8197b71539 Merge "Enable rebuild tests in cellsv1 job" 2016-03-07 00:04:50 +00:00
Jenkins 5b972c62ba Merge "VMware: Use actual VM state instead of using the instance vm_state" 2016-03-05 17:29:01 +00:00
Jenkins 90c13f05ab Merge "deprecate `volume_api_class and network_api_class`" 2016-03-04 22:18:29 +00:00
Jenkins c3f325aab7 Merge "Don't lazy-load instance.services if the instance is deleted" 2016-03-04 22:16:52 +00:00
Jenkins f566aad175 Merge "Add specific method to lazy-load instance.pci_devices" 2016-03-04 22:15:36 +00:00
Jenkins 832bb880fd Merge "Check 'destination_type' instead of 'source_type' in _check_and_transform_bdm" 2016-03-04 22:14:06 +00:00
Jenkins 3d47389345 Merge "Add unit tests for live_migration_cleanup_flags" 2016-03-04 22:12:57 +00:00
Jenkins ec04d3bcaf Merge "Documentation fix regarding triggering crash dump" 2016-03-04 22:11:27 +00:00
Matt Riedemann 83c1fa6c03 Enable rebuild tests in cellsv1 job
Change 022802997c fixed evacuate/rebuild
in the cells API so enable the rebuild-related tests we were skipping
before.

Related-Bug: #1445629
Related-Bug: #1445631
Related-Bug: #1552046

Change-Id: I15f867d8c6ff280bc68a6abf8b0da6e970c2bb39
2016-03-04 19:58:57 +00:00
Jenkins c5a45a2984 Merge "deprecate `compute_stats_class` config option" 2016-03-04 16:23:37 +00:00
Jenkins 96eaa19aac Merge "Deprecate the `vendordata_driver` config option." 2016-03-04 14:50:55 +00:00
Jenkins c933ce00f9 Merge "Deprecate db_driver config option" 2016-03-04 14:49:14 +00:00
Jenkins 6b20476b63 Merge "deprecate manager class options" 2016-03-04 14:47:42 +00:00
Jenkins 7e3e92e826 Merge "Update time is not updated when metadata of aggregate is updated" 2016-03-04 14:10:57 +00:00
Jenkins d029117bb2 Merge "Remove unused libvirt _get_all_block_devices and _get_interfaces" 2016-03-04 14:00:13 +00:00
Jenkins 3de46789b7 Merge "libvirt: don't attempt to get baseline cpu features if host cpu model is None" 2016-03-04 13:47:52 +00:00
Sean Dague 6e8e322718 deprecate `volume_api_class and network_api_class`
Both of these options only had one real in tree sensible
option. Deprecate these so they can be removed and turned into
constants in Newton.

This adds a new ``use_neutron`` config option to replace the
network_api_class option.

Change-Id: Ia79269e2bca0468edde830fc82a15b234e1abcbf
2016-03-04 07:59:46 -05:00
Jenkins 6364a00a25 Merge "Add functional regression test for list deleted instances on v2.16" 2016-03-04 12:09:11 +00:00
Jenkins 4045934e75 Merge "Allow saving empty pci_device_pools in ComputeNode object" 2016-03-04 12:07:43 +00:00
Sean Dague 3be36fcb7b deprecate `compute_stats_class` config option
There was only one implementation in tree, and this isn't an extension
point or interface we want people plugging out of tree code into.

Change-Id: Ie2cb64a43198e1155f768ceabe50ce8a004a1d41
2016-03-04 06:57:50 -05:00
Sean Dague 21da1babce Deprecate the `vendordata_driver` config option.
This allowed creating a differ class loader for defining vendordata
metadata for the metadata server. The default driver loads from a json
file that can be arbitrarily specified, so is still quite flexible.

Change-Id: I0f9866320cd655134281193c50ec170ea20c011a
2016-03-04 06:57:50 -05:00
Sean Dague c87ae92be5 Deprecate db_driver config option
Previously this let you replace our SQLAlchemy database layer with
your own. This approach is deprecated. Deployments that felt the need
to use the facility are encourage to work with upstream Nova to
address db driver concerns in the main SQLAlchemy code paths.

Change-Id: If195a6bc399c8b1e2bfb0ea5579f2be21d0bc126
2016-03-04 06:57:50 -05:00
Jenkins 7083166966 Merge "neutron: handle attach interface case with no networks" 2016-03-04 11:55:50 +00:00
Jenkins f411e39fce Merge "Use db connection from RequestContext during queries" 2016-03-04 11:49:52 +00:00
Sean Dague 0fcec69a23 deprecate manager class options
We should deprecate the manager classes used for all of our
services. This is not a thing we actually expect or want to support
people replacing. If we want modular plug points at any of these all
the options should be in tree and specified by constants to switch
between.

Change-Id: Id25bd4870c6e2fda08dc0177b7ed61a8a6091838
2016-03-04 06:35:44 -05:00
Kevin_Zheng 66157aaead Check 'destination_type' instead of 'source_type' in _check_and_transform_bdm
In compute.api._check_and_transform_bdm() we have a logic to
avoid boot instances with both image-ref and a volume named
as 'vda' is supplied. Currently, we check the bdm's 'source_type',
but infact we should check its' 'destination_type' as this
shows it is a cinder volume.

Change-Id: I1fe2cf7c6655e0e0c61371c6d7379ecfc7071cec
Closes-Bug: #1522329
2016-03-04 14:17:09 +08:00
Jenkins 4b47b5b6c6 Merge "Revert "Generate better validation error message when using name regexes"" 2016-03-04 04:50:10 +00:00
Hironori Shiina 230958c002 Documentation fix regarding triggering crash dump
How to trigger crash dump depends on hypervisors. NMI is not the only way to
implement the feature. This patch modifies description regarding this feature.

Change-Id: I77d10551650776c06ee4b413f1b027abf6620e83
2016-03-04 13:04:44 +09:00
Jenkins 2c732aa654 Merge "Make InstanceMappings.cell_id nullable" 2016-03-03 23:05:10 +00:00
Jenkins e33f8b39c0 Merge "Create BuildRequest object during boot process" 2016-03-03 22:59:40 +00:00
melanie witt 5572a50f6d Use db connection from RequestContext during queries
Now that db connections can be specified through the RequestContext,
any queries on tables that reside in cell dbs must use the methods
provided to create transaction context managers on-the-fly using the
db connection from the RequestContext instead of using the
"main_context_manager" for all accesses. The get_context_manager()
method returns the main_context_manager if no db connection is
found in the RequestContext, so things continue to work even when
no cell dbs exist.

The tables that reside in cell dbs are based on the Cells v2
database split doc [1].

Related to blueprint cells-db-connection-switching

[1] https://review.openstack.org/#/c/277543

Change-Id: I4452116ae0c88ba18672839f2856247092bf6b9a
2016-03-03 22:28:24 +00:00
Jim Rollenhagen ac5e95e397 Ironic: Clean up if configdrive build fails
The configdrive builder does a number of things; for instance, shelling
out to mkisofs or reaching up to the top cell for SSH keys. These have
ways of failing. If they do fail, we need to cleanup what we've done in
the deploy so far (instance fields on the node in ironic, firewalls,
vifs, etc).

Wrap the configdrive build call in a try/except to catch any errors,
clean up, and re-raise the error.

Change-Id: I81ec4c54437d92c4c091646c0b3f5d948b82b52b
Closes-Bug: #1552466
2016-03-03 13:48:02 -08:00
jichenjc 09d27bdf2d Revert "Generate better validation error message when using name regexes"
This reverts commit 8093549e58.

some command like nova aggregate-create foo will fail
guess the reason is we honor the format of the parameter
but it's possible to set the type like following 
availability_zone['type'] = ['string', 'null']
which makes the input 
{"aggregate": {"name": "foo", "availability_zone": null}}
is also valid

so in the following code, re.search encounter a NONE value
and raise a TypeError

@jsonschema.FormatChecker.cls_checks('name', exception.InvalidName)
def _validate_name(instance):
    regex = parameter_types.valid_name_regex
    if re.search(regex.regex, instance):


guess we can copy additional code from jsonschema but that need additional effort.

Change-Id: I69619c1b5a5dd3b239100fc52cb65488fbc72609
2016-03-03 21:02:41 +00:00
Jenkins c55ae85bec Merge "Sample nova.conf file has missing/duplicated config options" 2016-03-03 20:54:14 +00:00
Jenkins b863d248f1 Merge "Replaced unittest and unittest2 to testtools" 2016-03-03 19:41:50 +00:00
Jenkins 94b5bac65c Merge "Fix missing of unit in HostState.__repr__()" 2016-03-03 19:40:34 +00:00
Jenkins 410377ab4b Merge "XenAPI: introduce unit test for XenAPI plugins" 2016-03-03 18:03:32 +00:00
Jenkins e5f3d9a5eb Merge "Generate better validation error message when using name regexes" 2016-03-03 15:16:22 +00:00
Jenkins fe03930eea Merge "Ensure there are no unreferenced closures in tests" 2016-03-03 15:02:51 +00:00
Pawel Koniszewski 0796afe005 Add unit tests for live_migration_cleanup_flags
Change-Id: I04dff9e7935e63988cdc70df05c1eaad0d679808
2016-03-03 14:42:43 +01:00
Gábor Antal 008f9b288d Replaced unittest and unittest2 to testtools
In some places, we use unittest, other places unittest2.
However, it is better to use testtools, as mentioned before

Change-Id: Ide224f27c8bd3669a148e7d11f519cf0a2a73380
2016-03-03 13:19:22 +01:00
Markus Zoeller ccbe363f30 Sample nova.conf file has missing/duplicated config options
The generated sample.nova.conf missed config options from these modules:
   nova.virt.hyperv.eventhandler
   nova.virt.libvirt.volume.aoe
   nova.virt.libvirt.volume.glusterfs
   nova.virt.libvirt.volume.iscsi
   nova.virt.libvirt.volume.iser
   nova.virt.libvirt.volume.net
   nova.virt.libvirt.volume.nfs
   nova.virt.libvirt.volume.quobyte
   nova.virt.libvirt.volume.remotefs
   nova.virt.libvirt.volume.scality
   nova.virt.libvirt.volume.smbfs

The generated sample.nova.conf has the config options twice from module:
   nova.cmd.spicehtml5proxy.opts

Change-Id: I81524527c204c56547d27a9450fffafa0f81c11e
Co-Authored-By: Dirk Mueller <dirk@dmllr.de>
Co-Authored-By: zwei <leidong@unitedstack.com>
Co-Authored-By: Michal Jura <mjura@suse.com>
Closes-Bug: #1532228
Closes-Bug: #1533132
2016-03-03 13:08:02 +01:00
Jenkins a3cf38a3ec Merge "Abstract a driver API for triggering crash dump" 2016-03-03 11:42:02 +00:00
Jenkins d4a72f8168 Merge "Add BuildRequest object" 2016-03-03 11:06:37 +00:00
Jenkins d4af722d9e Merge "Fix evacuate support with Nova cells v1" 2016-03-03 11:05:39 +00:00
Jenkins c62159d0bf Merge "Api_version_request.matches does not accept a string or None" 2016-03-03 10:57:24 +00:00
Wen Zhi Yu d99594a336 Fix missing of unit in HostState.__repr__()
Unit of RAM and Disk size is missing in HostState.__repr__(), see[1]

[1]https://github.com/openstack/nova/blob/13.0.0.0b2/nova/scheduler/host_manager.py#L311

Change-Id: Ibb9a06a0eaa112c3a575080b0775cc2fd97d53cc
2016-03-03 17:51:34 +08:00
Jenkins 23fdf28daf Merge "Deprecate nova.hooks" 2016-03-03 04:06:54 +00:00