]> xenbits.xensource.com Git - osstest/openstack-nova.git/log
osstest/openstack-nova.git
8 years agoMerge "Add more description for rx and tx param" xen-tested-master
Jenkins [Mon, 12 Dec 2016 06:52:03 +0000 (06:52 +0000)]
Merge "Add more description for rx and tx param"

8 years agoMerge "Fix race in test_volume_swap_server_with_error"
Jenkins [Mon, 12 Dec 2016 06:51:43 +0000 (06:51 +0000)]
Merge "Fix race in test_volume_swap_server_with_error"

8 years agoMerge "Remove invalid tests for config option osapi_compute_workers"
Jenkins [Mon, 12 Dec 2016 06:51:17 +0000 (06:51 +0000)]
Merge "Remove invalid tests for config option osapi_compute_workers"

8 years agoMerge "Cleanup after any failed libvirt spawn"
Jenkins [Mon, 12 Dec 2016 06:50:56 +0000 (06:50 +0000)]
Merge "Cleanup after any failed libvirt spawn"

8 years agoMerge "Guestfs handle no passwd or group in image"
Jenkins [Mon, 12 Dec 2016 06:27:16 +0000 (06:27 +0000)]
Merge "Guestfs handle no passwd or group in image"

8 years agoMerge "Handle ImageNotFound exception during instance backup"
Jenkins [Mon, 12 Dec 2016 06:23:46 +0000 (06:23 +0000)]
Merge "Handle ImageNotFound exception during instance backup"

8 years agoAdd more description for rx and tx param
jichenjc [Thu, 3 Nov 2016 22:48:51 +0000 (06:48 +0800)]
Add more description for rx and tx param

Add more description for rx and tx in diagnostics command.

Change-Id: Ia4bc5a43a0a90392444dfbe710d6622986bf34b0
Closes-Bug: 1628368

8 years agoMerge "Add SecurityGroup.identifier to prefer uuid over name"
Jenkins [Sun, 11 Dec 2016 16:46:31 +0000 (16:46 +0000)]
Merge "Add SecurityGroup.identifier to prefer uuid over name"

8 years agoMerge "Enable test_bdm.BlockDeviceMappingEc2CloudTestCase on Python 3"
Jenkins [Sun, 11 Dec 2016 13:51:29 +0000 (13:51 +0000)]
Merge "Enable test_bdm.BlockDeviceMappingEc2CloudTestCase on Python 3"

8 years agoMerge "Setup CellsV2 environment in base test"
Jenkins [Sat, 10 Dec 2016 18:02:28 +0000 (18:02 +0000)]
Merge "Setup CellsV2 environment in base test"

8 years agoMerge "Move get_instance() calls from try-except block"
Jenkins [Sat, 10 Dec 2016 05:15:55 +0000 (05:15 +0000)]
Merge "Move get_instance() calls from try-except block"

8 years agoAdd SecurityGroup.identifier to prefer uuid over name
Dan Smith [Fri, 2 Dec 2016 16:24:36 +0000 (08:24 -0800)]
Add SecurityGroup.identifier to prefer uuid over name

This gives us a quick identifier property on SecurityGroup that
will prefer uuid if set, otherwise use the name field.

Change-Id: If7153f6470dc94d600731335f59260e31d1a0392

8 years agoSetup CellsV2 environment in base test
Dan Smith [Fri, 2 Dec 2016 20:14:30 +0000 (12:14 -0800)]
Setup CellsV2 environment in base test

This makes us automatically set up a usable CellsV2 environment in
the base test case, if we're setting up database stuff. If the test
uses the DB normally, we get a cell0, a real cell, and create
hostmappings for any compute services that we start. If we're not
a DB-using test, we mock out the cell mapping stuff so that
everything appears to just be in the same cell.

This includes a fix for the nova-manage tests, which need to control
their own cells destiny now.

This includes a fix to the pci tests for libvirt, which were starting
the same compute service twice in a row. That no longer works because
we fail to create the duplicate hostmapping record, but we should not
have been doing that anyway. This makes us only create it once.

This includes a fix to the connection switching test to set up the
database fixtures itself since it requires a specific environment
that we now confuse by always going through the CellDatabases fixture.

Change-Id: I435bf18ab66ad1469c03f0cf3027033a5751af6f

8 years agoMerge "libvirt: Fix initialising of LVM ephemeral disks"
Jenkins [Fri, 9 Dec 2016 17:31:24 +0000 (17:31 +0000)]
Merge "libvirt: Fix initialising of LVM ephemeral disks"

8 years agoCleanup after any failed libvirt spawn
Dan Smith [Thu, 8 Dec 2016 20:25:37 +0000 (12:25 -0800)]
Cleanup after any failed libvirt spawn

When we go to spawn a libvirt domain, we catch a few types of exceptions
and perform cleanup before failing the operation. For some reason, we
don't do this universally, which means that we leave things like network
devices laying around (from plug_vifs()). If a delete comes later, it
should clean those things up. However, if a subsequent failure prevents
that, and especially if we do a local delete at the API, we'll leak those
interfaces.

As seen in at least one real-world situation, this can cause us to leak
interfaces until we have tens of thousands of them on the system, which
then causes secondary failures.

Since we run the cleanup() routine for certain failures, it certainly
seems appropriate to run it always and not leave residue until a
successful delete is performed.

Closes-Bug: #1648840
Change-Id: Iab5afdf1b5b8d107ea0e5895c24d50712e7dc7b1

8 years agoMerge "Port compute.test_extended_ip* to Python 3"
Jenkins [Fri, 9 Dec 2016 16:15:18 +0000 (16:15 +0000)]
Merge "Port compute.test_extended_ip* to Python 3"

8 years agoMerge "Bump prlimit cpu time for qemu from 2 to 8"
Jenkins [Fri, 9 Dec 2016 16:14:17 +0000 (16:14 +0000)]
Merge "Bump prlimit cpu time for qemu from 2 to 8"

8 years agoMerge "hacking: Use uuidutils or uuidsentinel to generate UUID"
Jenkins [Fri, 9 Dec 2016 13:48:02 +0000 (13:48 +0000)]
Merge "hacking: Use uuidutils or uuidsentinel to generate UUID"

8 years agoMerge "Replace uuid4() with uuidsentinel"
Jenkins [Fri, 9 Dec 2016 13:46:51 +0000 (13:46 +0000)]
Merge "Replace uuid4() with uuidsentinel"

8 years agoMerge "Replace uuid4() with uuidsentinel"
Jenkins [Fri, 9 Dec 2016 13:45:39 +0000 (13:45 +0000)]
Merge "Replace uuid4() with uuidsentinel"

8 years agoMerge "Replace uuid4() with uuidsentinel"
Jenkins [Fri, 9 Dec 2016 13:44:18 +0000 (13:44 +0000)]
Merge "Replace uuid4() with uuidsentinel"

8 years agoMerge "objects: Removes base code that already exists in o.vo"
Jenkins [Fri, 9 Dec 2016 13:40:18 +0000 (13:40 +0000)]
Merge "objects: Removes base code that already exists in o.vo"

8 years agoGuestfs handle no passwd or group in image
Andrea Frittoli [Mon, 5 Dec 2016 15:34:11 +0000 (15:34 +0000)]
Guestfs handle no passwd or group in image

When setting ownership of a file or directory, the guestfs driver
looks for the /etc/passwd and/or /etc/group files. In case they
are not found, the current driver lets the auges RuntimeError
through, which does not produce a very helpful error message.
Fixing that by handling the original exception and rasing a
Nova exception with more details in it.

Related-bug: #1646002

Change-Id: I2d15865c8be13b938e10e67c1b1b160f2a80f0c0

8 years agoEnable test_bdm.BlockDeviceMappingEc2CloudTestCase on Python 3
ChangBo Guo(gcb) [Thu, 8 Dec 2016 05:34:33 +0000 (13:34 +0800)]
Enable test_bdm.BlockDeviceMappingEc2CloudTestCase on Python 3

This test cases was removed during ec2 removal, just remove it
from tests-py3.txt.

Partially-Implements: blueprint goal-python35

Change-Id: I2de52025b517dcd75c60c3f77c4eafbbfd21c52c

8 years agoMerge "Remove extra ^M for json file"
Jenkins [Fri, 9 Dec 2016 08:52:31 +0000 (08:52 +0000)]
Merge "Remove extra ^M for json file"

8 years agoMerge "Don't use 'updated_at' to check service's status"
Jenkins [Fri, 9 Dec 2016 04:45:24 +0000 (04:45 +0000)]
Merge "Don't use 'updated_at' to check service's status"

8 years agoMerge "Unity the comparison of hw_qemu_guest_agent"
Jenkins [Fri, 9 Dec 2016 00:29:21 +0000 (00:29 +0000)]
Merge "Unity the comparison of hw_qemu_guest_agent"

8 years agoDon't trace on ImageNotFound in delete_image_on_error
Matt Riedemann [Thu, 8 Dec 2016 18:44:54 +0000 (13:44 -0500)]
Don't trace on ImageNotFound in delete_image_on_error

The point of the delete_image_on_error decorator is to
cleanup an image used during snapshot operations, so it
makes little sense to log an exception trace if the image
delete fails because the image no longer exists, which it
might not since _snapshot_instance method will proactively
delete non-active images in certain situations.

So let's just handle the ImageNotFound and ignore it.

Change-Id: I14e061a28678ad28e38bd185e3d0a35cae41a9cf
Closes-Bug: #1648574

8 years agoMerge "Extend get_all_by_filters to support resource criteria"
Jenkins [Thu, 8 Dec 2016 16:22:58 +0000 (16:22 +0000)]
Merge "Extend get_all_by_filters to support resource criteria"

8 years agoBump prlimit cpu time for qemu from 2 to 8
Sean Dague [Thu, 8 Dec 2016 15:09:06 +0000 (10:09 -0500)]
Bump prlimit cpu time for qemu from 2 to 8

We've got user reported bugs that when opperating with slow NFS
backends with large (30+ GB) disk files, the prlimit of cpu_time 2 is
guessed to be the issue at hand because if folks hot patch a qemu-img
that runs before the prlimitted one, the prlimitted one succeeds.

This increases the allowed cpu timeout, as well as tweaking the error
message so that we return something more prescriptive when the
qemu-img command fails with prlimit abort.

The original bug (#1449062) the main mitigation concern here was a
carefully crafted image that gets qemu-img to generate > 1G of json,
and hence could be a node attack vector. cpu_time was never mentioned,
and I think was added originally as a belt and suspenders addition. As
such, bumping it to 8 seconds shouldn't impact our protection in any
real way.

Change-Id: I1f4549b787fd3b458e2c48a90bf80025987f08c4
Closes-Bug: #1646181

8 years agoMerge "Port virt.disk.mount.test_nbd to Python 3"
Jenkins [Thu, 8 Dec 2016 11:28:49 +0000 (11:28 +0000)]
Merge "Port virt.disk.mount.test_nbd to Python 3"

8 years agoMerge "Port libvirt test_imagecache to Python 3"
Jenkins [Thu, 8 Dec 2016 11:24:56 +0000 (11:24 +0000)]
Merge "Port libvirt test_imagecache to Python 3"

8 years agoExtend get_all_by_filters to support resource criteria
Sylvain Bauza [Wed, 2 Nov 2016 11:28:02 +0000 (12:28 +0100)]
Extend get_all_by_filters to support resource criteria

Given the scheduler wants to know which RPs can support a set of different
requests, each one having a resource class with an amount, we need to
modify the current ResourceProviderList method for returning a subset.
The proposal for the request parameter is a dictionary of amounts keyed
by the resource class name.

Change-Id: I94e800dabd5cc995728898dd6d8f6d42ba645312
Partially-Implements: blueprint resource-providers-get-by-request

8 years agoDon't use 'updated_at' to check service's status
ChangBo Guo(gcb) [Thu, 24 Mar 2016 12:33:50 +0000 (20:33 +0800)]
Don't use 'updated_at' to check service's status

Commit b9bae02af2168ad64d3b3d28c97c3853cee73272 introduced
'last_seen_up' to check service in Liberty. Nova use 'updated_at'
to check that before Liberty. So we can remove legacy item now.
Note: 'last_seen_up' may be null at the beginning. so we still
need 'created_at' in this case.

Change-Id: I5a273c294341027fba66a54a540182fc890522db

8 years agolibvirt: Fix initialising of LVM ephemeral disks
Matthew Booth [Wed, 7 Dec 2016 14:45:40 +0000 (14:45 +0000)]
libvirt: Fix initialising of LVM ephemeral disks

The LVM backend expects to write directly to the target disk rather
than to the image cache when initialising an ephemeral disk. This is
confounded by Image.cache(), which doesn't call the given callback
(_create_ephemeral in this case), if the target already exists.

Closes-Bug: #1648109
Co-authored-by: Feodor Tersin <ftersin@hotmail.com>
Change-Id: Ic9178d6c013670611e63d54a7669f35dc9770e91

8 years agoRemove extra ^M for json file
liyingjun [Tue, 29 Nov 2016 02:51:52 +0000 (10:51 +0800)]
Remove extra ^M for json file

There is a ^M symbol in the end of each line in
instance-shelve_offload-end.json, remove that.

Change-Id: I9eac6348f9714dfe637ea8cee01a8c1b6ca5f051

8 years agoMerge "Return 400 when name is more than 200 characters"
Jenkins [Thu, 8 Dec 2016 07:18:59 +0000 (07:18 +0000)]
Merge "Return 400 when name is more than 200 characters"

8 years agoMerge "Fix misuse of assertTrue"
Jenkins [Thu, 8 Dec 2016 04:01:38 +0000 (04:01 +0000)]
Merge "Fix misuse of assertTrue"

8 years agoPort virt.disk.mount.test_nbd to Python 3
ChangBo Guo(gcb) [Mon, 28 Nov 2016 05:51:00 +0000 (13:51 +0800)]
Port virt.disk.mount.test_nbd to Python 3

os.listdir also accepts file descriptor on Python 3,
need make sure path is string in _fake_listdir_nbd_devices.

Partially-Implements: blueprint goal-python35

Change-Id: I882d3feaa6a68212b6ce3bea4aedbe85dcbd5092

8 years agoMerge "Fix up non-cells-aware context managers in test_db_api"
Jenkins [Thu, 8 Dec 2016 02:08:39 +0000 (02:08 +0000)]
Merge "Fix up non-cells-aware context managers in test_db_api"

8 years agoMerge "Add SingleCellSimple fixture"
Jenkins [Thu, 8 Dec 2016 02:07:51 +0000 (02:07 +0000)]
Merge "Add SingleCellSimple fixture"

8 years agoUpdate ironic driver get_available_nodes docstring
Jim Rollenhagen [Wed, 7 Dec 2016 21:26:54 +0000 (16:26 -0500)]
Update ironic driver get_available_nodes docstring

This was out of date, it now returns a subset of Ironic nodes.

Change-Id: I7e0bdd2578e1c32dbb0d607b1355be7be45501df

8 years agoMerge "Make RPCFixture support multiple connections"
Jenkins [Wed, 7 Dec 2016 21:17:44 +0000 (21:17 +0000)]
Merge "Make RPCFixture support multiple connections"

8 years agoMerge "[proxy-api] microversion 2.39 deprecates image-metadata proxy API"
Jenkins [Wed, 7 Dec 2016 21:17:03 +0000 (21:17 +0000)]
Merge "[proxy-api] microversion 2.39 deprecates image-metadata proxy API"

8 years agoMerge "Port xenapi test_xenapi to Python 3"
Jenkins [Wed, 7 Dec 2016 21:11:58 +0000 (21:11 +0000)]
Merge "Port xenapi test_xenapi to Python 3"

8 years agoMerge "Port libvirt test_driver to Python 3"
Jenkins [Wed, 7 Dec 2016 21:07:24 +0000 (21:07 +0000)]
Merge "Port libvirt test_driver to Python 3"

8 years agoFix up non-cells-aware context managers in test_db_api
Dan Smith [Fri, 2 Dec 2016 20:12:24 +0000 (12:12 -0800)]
Fix up non-cells-aware context managers in test_db_api

We recently converted all the db_api calls to use pick_context_manager
so that they will work with CellsV2. There were, however, still some
instances in test_db_api that did the old thing for testing low-level
bits. This cleans those up in preparation for cells patches to come.
Since we have to use the pick decorators, this converts several things
to use a decorated closure for that reason. No real functional change
though.

Change-Id: I21a2e5e534f6da22942c65196904aaf82f47c317

8 years agoAdd SingleCellSimple fixture
Dan Smith [Thu, 1 Dec 2016 16:13:01 +0000 (08:13 -0800)]
Add SingleCellSimple fixture

This fixture makes it trivial to mock out all the cell listing stuff
for the simple case where you just want to assume a single cell that
is configured as the default database.

Change-Id: I7eecee388780677d2b342556fef0179b02707f3c

8 years agoMerge "Updated from global requirements"
Jenkins [Wed, 7 Dec 2016 18:18:19 +0000 (18:18 +0000)]
Merge "Updated from global requirements"

8 years agoMerge "tests: avoid starting compute service twice in sriov functional test"
Jenkins [Wed, 7 Dec 2016 18:17:27 +0000 (18:17 +0000)]
Merge "tests: avoid starting compute service twice in sriov functional test"

8 years agoMerge "tests: generate correct pci addresses for fake pci devices"
Jenkins [Wed, 7 Dec 2016 18:16:42 +0000 (18:16 +0000)]
Merge "tests: generate correct pci addresses for fake pci devices"

8 years agoMerge "libvirt: Mock imagebackend template funcs in ImageBackendFixture"
Jenkins [Wed, 7 Dec 2016 18:16:02 +0000 (18:16 +0000)]
Merge "libvirt: Mock imagebackend template funcs in ImageBackendFixture"

8 years agoMerge "Revert "reduce pep8 requirements to just hacking""
Jenkins [Wed, 7 Dec 2016 18:15:12 +0000 (18:15 +0000)]
Merge "Revert "reduce pep8 requirements to just hacking""

8 years agoMerge "Replace the assertEqual(None,A) with assertIsNone(A)"
Jenkins [Wed, 7 Dec 2016 18:14:23 +0000 (18:14 +0000)]
Merge "Replace the assertEqual(None,A) with assertIsNone(A)"

8 years ago[proxy-api] microversion 2.39 deprecates image-metadata proxy API
Pavel Kholkin [Thu, 1 Dec 2016 15:37:28 +0000 (18:37 +0300)]
[proxy-api] microversion 2.39 deprecates image-metadata proxy API

Almost all proxy APIs were deprecated in microversion 2.36.
But the sub-resource image-metadata of image was forgotten to deprecate.
This patch deprecates the image-metdata API from 2.39.

Implements blueprint deprecate-image-meta-proxy-api
Closes-bug: #1614578

Change-Id: I5507337ab6fe4a377f66dec3fe275d75618cd7b4

8 years agoMake RPCFixture support multiple connections
Dan Smith [Thu, 10 Nov 2016 21:19:32 +0000 (13:19 -0800)]
Make RPCFixture support multiple connections

For testing cells, we will need to track the driver instances that
we give out by url. This normally just works with a conventional
oslo.messaging driver, but the fake driver keeps internal data
structures for simulating its bus. If we end up with clients creating
a new instance of the driver in the rpc switching code, we'll never
be able to send messages to services because we'll always have
private/separate data structures.

So, this makes the fixture wrap the transport creation stuff
and unify references by url. In order to make this work, some
retooling of rpc.init() is done, which makes it more in line with
the recent additions we had for wrapping transport initialization
per connection anyway.

For now, a lot of our tests can't handle the possibility of
multiple RPC connections due to them looking at the global
transport_url configuration. So for the moment, even though this
makes the fixture support multiple independent connections, we
collapse any such attempts down to a single connection to the
default broker.

Note: this requires a fix in oslo.messaging 5.14.0

Depends-On: I01b6f5a20ea9752da46a546a908bd38cf11da681
Change-Id: Icb63d7dabd17f3c5633387793f68a8ba20863a7e

8 years agotests: avoid starting compute service twice in sriov functional test
Vladik Romanovsky [Tue, 6 Dec 2016 15:37:33 +0000 (10:37 -0500)]
tests: avoid starting compute service twice in sriov functional test

SRIOV functional tests that starts two or more guest were able to start
the compute service multiple times with the same hostname, which affected the
correctness of the tests.
This patch will make sure that the compute service is started only once.

Closes-Bug: #1647776
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Change-Id: I8556ce068571d8e496e6fba756c1977c1d2c3ca1

8 years agotests: generate correct pci addresses for fake pci devices
Vladik Romanovsky [Tue, 6 Dec 2016 22:07:19 +0000 (17:07 -0500)]
tests: generate correct pci addresses for fake pci devices

fakelibvirt library was not generating a correct pci address for
its fake pci devices. PCI slot field would remain constant in all
generated devices.

While this issue would be transparrent for most of the tests,
but test_create_server_with_PF_no_VF would be affected, as it
should lookup VFs by its addresses.

Change-Id: I810b1087229366770f1ea536b67e3b9741a030a8

8 years agoFix nova-serialproxy when registering cli options
Ludovic Beliveau [Tue, 6 Dec 2016 16:42:37 +0000 (11:42 -0500)]
Fix nova-serialproxy when registering cli options

In latest devstack, nova-serialproxy fails to start because it crashed
when it tries to register the cli options.

The issue is that it tried to register an array of options by invoking
conf.register_cli_opt(), when multiple options need to be register
through conf.register_cli_opts().

Change-Id: Icb09f849290b78b5dd73c3c96a13ade02492ba3a
Closes-Bug: #1647784

8 years agoUpdated from global requirements
OpenStack Proposal Bot [Wed, 7 Dec 2016 13:36:23 +0000 (13:36 +0000)]
Updated from global requirements

Change-Id: Ibef2ba02a56142c88770887556297940e02eeb0e

8 years agoMerge "libvirt: Combine injection info in InjectionInfo"
Jenkins [Wed, 7 Dec 2016 13:32:37 +0000 (13:32 +0000)]
Merge "libvirt: Combine injection info in InjectionInfo"

8 years agoMerge "conf: Remove deprecated service manager opts"
Jenkins [Wed, 7 Dec 2016 13:23:25 +0000 (13:23 +0000)]
Merge "conf: Remove deprecated service manager opts"

8 years agoMerge "libvirt: Improve _is_booted_from_volume implementation"
Jenkins [Wed, 7 Dec 2016 13:13:40 +0000 (13:13 +0000)]
Merge "libvirt: Improve _is_booted_from_volume implementation"

8 years agoMerge "Add a CellDatabases test fixture"
Jenkins [Wed, 7 Dec 2016 13:09:36 +0000 (13:09 +0000)]
Merge "Add a CellDatabases test fixture"

8 years agoRevert "reduce pep8 requirements to just hacking"
Sergey Nikitin [Wed, 7 Dec 2016 12:44:43 +0000 (16:44 +0400)]
Revert "reduce pep8 requirements to just hacking"

This reverts commit 1e287ae14bac519310221d187e7d1563c2310823

Constraints mechanism doesn't work for 'hacking' lib:
I11eb0d762869ad8920795fb710f1b2eeb9354f12

We have to install all of test-requirements to get
'hacking' at the right version.

Closes-Bug: #1648054

Change-Id: I512192e8a9ab3a53a52e6cc4d4b8a222951af7fb

8 years agolibvirt: Mock imagebackend template funcs in ImageBackendFixture
Matthew Booth [Tue, 22 Nov 2016 12:02:18 +0000 (12:02 +0000)]
libvirt: Mock imagebackend template funcs in ImageBackendFixture

This represents a small change to how we test the arguments passed to
a template function. Most tests which test cache() currently don't
directly test the callback function. Some test the callback function
which was passed to cache(), but this is undesirable as:

  * It breaks untestably if you replace it with a wrapper
  * You can't test the arguments which were passed to it

To make this easier to test, and because a subsequent change alters
this slightly in ways we want to make obvious, we update
ImageBackendFixture to execute the callback function when cache() is
called. We pre-emptively mock all callback methods so they are not
actually called. Test can assert on these mocks to check that the
intended callback was called, and the arguments used.

Implements: bp/libvirt-imagebackend-refactor
Change-Id: Ifef488bcc3d8b7bb11aa7ec8255f9a27f57c3291

8 years agolibvirt: Combine injection info in InjectionInfo
Matthew Booth [Tue, 5 Jul 2016 13:36:47 +0000 (14:36 +0100)]
libvirt: Combine injection info in InjectionInfo

Simplify method signatures by combining network_info, admin_pass, and
files into a single data structure.

Implements: bp/libvirt-imagebackend-refactor
Change-Id: I11ae6a0709d4d85f85c3e8e3f3cf8ca9e26a4798

8 years agoMerge "libvirt: Delete duplicate check when live-migrating"
Jenkins [Wed, 7 Dec 2016 10:28:51 +0000 (10:28 +0000)]
Merge "libvirt: Delete duplicate check when live-migrating"

8 years agoFix misuse of assertTrue
Takashi NATSUME [Wed, 7 Dec 2016 08:29:51 +0000 (17:29 +0900)]
Fix misuse of assertTrue

Replace assertTrue with assertEqual.

Change-Id: I9ffa265082a8c67bccfe3459426f18b9a51bd46d
Closes-Bug: #1647993

8 years agoMerge "Add more log when delete orphan node"
Jenkins [Wed, 7 Dec 2016 07:51:26 +0000 (07:51 +0000)]
Merge "Add more log when delete orphan node"

8 years agoMerge "Fix the scope of cm in ServersTestV219"
Jenkins [Wed, 7 Dec 2016 07:50:45 +0000 (07:50 +0000)]
Merge "Fix the scope of cm in ServersTestV219"

8 years agoMerge "Handle ComputeHostNotFound when listing hypervisors"
Jenkins [Wed, 7 Dec 2016 07:46:19 +0000 (07:46 +0000)]
Merge "Handle ComputeHostNotFound when listing hypervisors"

8 years agoReturn 400 when name is more than 200 characters
bhagyashris [Wed, 30 Nov 2016 15:11:48 +0000 (20:41 +0530)]
Return 400 when name is more than 200 characters

APIs listed below are returning 500 error if you pass name more than
200 characters.
1. create resource_providers
2. update resource_providers

Added maxLength check in schema to ensure name should not be more than
200 characters.

Closes-Bug: #1642485
Change-Id: Ia22ae86702dabe18bc577b17164a81c363da6d41

8 years agoReplace the assertEqual(None,A) with assertIsNone(A)
xianming mao [Wed, 7 Dec 2016 06:23:38 +0000 (14:23 +0800)]
Replace the assertEqual(None,A) with assertIsNone(A)

Now flake8 has required to replace assertEqual(None,A) with
assertIsNone(A), this patch do it.

Change-Id: Ib5f6b4a18a67c2db9920c4e0fde3e2276e72ecd6

8 years agoMerge "Add description for 2.9 microversion"
Jenkins [Wed, 7 Dec 2016 02:22:20 +0000 (02:22 +0000)]
Merge "Add description for 2.9 microversion"

8 years agoMerge "Merge v21 view builder for ips API"
Jenkins [Wed, 7 Dec 2016 02:21:35 +0000 (02:21 +0000)]
Merge "Merge v21 view builder for ips API"

8 years agoMerge "Handle MarkerNotFound from cell0 database"
Jenkins [Wed, 7 Dec 2016 00:46:51 +0000 (00:46 +0000)]
Merge "Handle MarkerNotFound from cell0 database"

8 years agoHandle MarkerNotFound from cell0 database
Matt Riedemann [Mon, 5 Dec 2016 21:24:05 +0000 (16:24 -0500)]
Handle MarkerNotFound from cell0 database

When listing instances in the cellv2 world we look them up
from three locations:

1. Build requests which exist before the instances are created
   in the cell database (after the scheduler picks a host to
   build the instance). Currently instances and build requests
   are both created before casting to conductor, but that's going
   away in Ocata with the support for multiple cellsv2 cells.
2. The cell0 database for instances which failed to get scheduled
   to a compute host (and therefore a cell).
3. The actual cell database that the instance lives in. Currently
   that's only a single traditional nova database, but could be one
   of multiple cellsv2 cells when we add that support in Ocata.

If a marker is passed in when listing instances, if the instance
lives in an actual cell database, we'll get a MarkerNotFound failure
from cell0 because the instance doesn't exist in cell0, but we check
cell0 before we check the cell database. This makes the instance
listing short-circuit and fail with a 400 from the REST API.

This patch simply handles the MarkerNotFound when listing instances
from the cell0 database and ignores it so we can continue onto the
cell database.

Closes-Bug: #1647464

Change-Id: I977497be262fb7f2333e32fb7313b29624323422

8 years agoMerge "Fix a typo in a comment in microversion history"
Jenkins [Tue, 6 Dec 2016 21:40:43 +0000 (21:40 +0000)]
Merge "Fix a typo in a comment in microversion history"

8 years agoMerge "libvirt: virtlogd: use virtlogd for char devices"
Jenkins [Tue, 6 Dec 2016 21:38:07 +0000 (21:38 +0000)]
Merge "libvirt: virtlogd: use virtlogd for char devices"

8 years agoFix a typo in a comment in microversion history
Chris Dent [Tue, 6 Dec 2016 19:11:07 +0000 (19:11 +0000)]
Fix a typo in a comment in microversion history

We use '_' in placement URLs.

This change was promised as a follow up to
Ia8b534d20c064eb3a767f95ca22814925acfaa77

Change-Id: Idc52bcf396dc8ad420d3183f9bee48e07656292d

8 years agoHandle ImageNotFound exception during instance backup
bhagyashris [Mon, 17 Oct 2016 13:59:21 +0000 (19:29 +0530)]
Handle ImageNotFound exception during instance backup

If user have already backed up instance to few numbers and then
execute backup api with rotation 1, then nova will delete the
previously created images exceeding rotation limit.
During deleting these images, if user mistakenly deletes one of the
image in advance, then backup instance won't be able to delete all
images exceeding rotation limit causing api failure.

This patch handles ImageNotFound exception during deleting backup
images, logs a warning message and continues deleting all of the
remaining images.

Closes-Bug: #1634773
Change-Id: Ib999138ddbbcd62e0c99a69e5c6d37b4e49f871f

8 years agoMerge "libvirt: Add comments in _hard_reboot"
Jenkins [Tue, 6 Dec 2016 18:28:15 +0000 (18:28 +0000)]
Merge "libvirt: Add comments in _hard_reboot"

8 years agoAdd a CellDatabases test fixture
melanie witt [Fri, 18 Nov 2016 17:18:24 +0000 (17:18 +0000)]
Add a CellDatabases test fixture

As we progress with the Cells v2 scheduling interaction work, we need
to be able to have switching between multiple databases work in our
functional tests. The existing Database fixture doesn't work in this
case because each connection switch via target_cell results in a new,
empty sqlite database, and main_context_manager is global in the DB
API and always points at the same sqlite database.

This adds a fixture that creates a new sqlite database per cell
database, runs migrations, and keeps track of the databases using
identifiers provided when cell databases are added to the fixture.
It patches get_context_manager, create_context_manager, and target_cell
to return the matching database connection according to identifier,
simulating switching between multiple databases in a single test.

Change-Id: I00748cbbb682813987a2ad8c69948f71223daee7

8 years agoMerge "libvirt: create consoles in an understandable/extensible way"
Jenkins [Tue, 6 Dec 2016 17:43:26 +0000 (17:43 +0000)]
Merge "libvirt: create consoles in an understandable/extensible way"

8 years agoMerge "Fix typo for 'infomation'."
Jenkins [Tue, 6 Dec 2016 16:41:18 +0000 (16:41 +0000)]
Merge "Fix typo for 'infomation'."

8 years agoMerge "Remove AdminRequired usage in flavor"
Jenkins [Tue, 6 Dec 2016 16:40:37 +0000 (16:40 +0000)]
Merge "Remove AdminRequired usage in flavor"

8 years agoMerge "convert libvirt driver to use os-vif for vhost-user with ovs."
Jenkins [Tue, 6 Dec 2016 16:39:21 +0000 (16:39 +0000)]
Merge "convert libvirt driver to use os-vif for vhost-user with ovs."

8 years agoMerge "add host to vif.py set_config_* functions"
Jenkins [Tue, 6 Dec 2016 16:38:37 +0000 (16:38 +0000)]
Merge "add host to vif.py set_config_* functions"

8 years agoMerge "Fix placement API version history 1.1 title"
Jenkins [Tue, 6 Dec 2016 16:37:55 +0000 (16:37 +0000)]
Merge "Fix placement API version history 1.1 title"

8 years agoMerge "placement: Perform build list of standard classes once"
Jenkins [Tue, 6 Dec 2016 16:37:08 +0000 (16:37 +0000)]
Merge "placement: Perform build list of standard classes once"

8 years agoMerge "placement: REST API for resource classes"
Jenkins [Tue, 6 Dec 2016 16:32:43 +0000 (16:32 +0000)]
Merge "placement: REST API for resource classes"

8 years agolibvirt: virtlogd: use virtlogd for char devices
Markus Zoeller [Tue, 6 Dec 2016 10:40:25 +0000 (11:40 +0100)]
libvirt: virtlogd: use virtlogd for char devices

This change makes actual usage of the "logd" sub-element for char devices.
The two REST APIs ``os-getConsoleOutput`` and ``os-getSerialConsole`` can
now be satisfied at the same time. This is valid for any combination of:
* char device element: "console", "serial"
* char device type: "tcp", "pty"
There is also no need to create multiple different device types anymore.
If we have a tcp device, we don't need the pty device anymore. The logging
will be done in the tcp device.

Implements blueprint libvirt-virtlogd
Closes-Bug: 832507
Change-Id: Ia412f55bd988f6e11cd78c4c5a50a86389e648b0

8 years agolibvirt: create consoles in an understandable/extensible way
Markus Zoeller [Mon, 7 Nov 2016 09:01:45 +0000 (10:01 +0100)]
libvirt: create consoles in an understandable/extensible way

This change refactors the way the consoles of a libvirt guest get
created. This is basically just a reshuffle of code and an extraction
of methods with the goal to make the plethora of conditionals easier
to understand. Also, future enhancements should be easier this way.
For example, the blueprint libvirt-virtlogd (targeted for Ocata) will
have to be integrated in this console creation flow.

During the implementation I noticed that the host caps are *not*
needed for creation. That was an unnecessary special case for s390x
which didn't make any sense as the guest arch is the important piece.
That's the reason I dropped the "caps" parameter of the method
"_create_consoles". That also made it necessary to adjust the unit
tests.

I also took the chance to rename the "guest" parameter, which represents
the domain *configuration object*, to "guest_cfg". This is (almost) used
in every other place in the libvirt driver.

Related blueprint libvirt-virtlogd

Change-Id: I93a4ac78aaf0ac0c0a99a27ef7e145949f706d45

8 years agoMerge "Create schema generation for AddressBase"
Jenkins [Tue, 6 Dec 2016 13:25:17 +0000 (13:25 +0000)]
Merge "Create schema generation for AddressBase"

8 years agoAdd more log when delete orphan node
jichenjc [Fri, 18 Nov 2016 20:51:15 +0000 (04:51 +0800)]
Add more log when delete orphan node

we have following log when delete opphan node
INFO nova.compute.manager Deleting orphan compute node xx

we might need to know why those node are removed so
we need additional log info about the removal.
however, it's not complete about why it's removed and
what's removed unless we dig into database layer

Change-Id: Icd8a60aea2fbe01f358bcdb010c97751625b47f6

8 years agolibvirt: Add comments in _hard_reboot
Matthew Booth [Mon, 5 Dec 2016 14:16:33 +0000 (14:16 +0000)]
libvirt: Add comments in _hard_reboot

Promote some important context gleaned from git history diving to code
comments.

Change-Id: Ie9fa202fe63acc181ac0c775a4dab24839117064

8 years agoMerge "support polling free notification testing"
Jenkins [Tue, 6 Dec 2016 10:17:50 +0000 (10:17 +0000)]
Merge "support polling free notification testing"

8 years agoUnity the comparison of hw_qemu_guest_agent
tianmaofu [Tue, 6 Dec 2016 08:40:27 +0000 (08:40 +0000)]
Unity the comparison of hw_qemu_guest_agent

The type of hw_qemu_guest_agent is Boolean, so there is
unnecessary to use bool_from_string.

Change-Id: I4101f806a259714383c144342e9c05722c8d888f

8 years agoMerge "Require cellsv2 setup before migrating to Ocata"
Jenkins [Tue, 6 Dec 2016 03:32:56 +0000 (03:32 +0000)]
Merge "Require cellsv2 setup before migrating to Ocata"