Commit Graph

5588 Commits (cd147631f8254c2f727ccfc937566a7a200349f9)

Author SHA1 Message Date
Dan Smith 8dfefcebee Fix memory explosion in multi-store image tests
For some reason, the MultiStoresImportImages test was causing the
test runner to balloon to ~1.5G, which generates spurious OOMs in
the gate, resulting in worker death and failure.

This test was generating 10M of data with data_utils.random_bytes(),
instead of the default of 1K, for no apparent reason. We are still
not sure why, but this results in the memory ballooning, potentially
because of BytesIO, or request.put() mishandling.

Regardless, this is unnecessary, and causing failures in the gate,
so this patch switches it back to the default, which works fine.

Change-Id: I9f1ea0114531a735bd38ad54da7ce15fb2bf7f7c
2 years ago
Zuul d76d371e1d Merge "compute: Skip AttachVolumeShelveTestJSON when cross_az_attach unavailable" 3 years ago
Zuul 6386312186 Merge "Remove race due to 1907084" 3 years ago
Zuul 2262cced38 Merge "Fix TypeError when there exists image with size None" 3 years ago
Balazs Gibizer 2e515fe596 Remove race due to 1907084
The test_attach_scsi_disk_with_config_drive test cases is racy at volume
detach. Nova first detach the volume in cinder then later deletes the
BlockDeviceMapping from the nova DB. Test waits for the volume to become
available and then checks the list of volume attachments in the nova API
then it can see that the attachment is still there.

Closes-Bug: #1907084
Change-Id: I814ae3215f39d1e8407c4ca1c7117a314941c80b
3 years ago
Zuul 32e71b0620 Merge "Add tag in compute interfaces schema for microversion 2.70" 3 years ago
Lee Yarwood 8581ea2cdc compute: Skip AttachVolumeShelveTestJSON when cross_az_attach unavailable
Both tests within this class create an instance and volume within the
same availability zone before shelving the instance. By default this
fully offloads the instance removing it from the availability zone.

If [cinder]/cross_az_attach is set to False within nova.conf this then
results in failures to attach volumes to the instance as they no longer
share the same availability zone.

To avoid this we now skip AttachVolumeShelveTestJSON based on the value
of [compute-feature-enabled]/compute_volume_common_az in tempest.conf
introduced by 979e494da2. This should be set if
cinder]/cross_az_attach is False within nova.conf ensuring that the resources
will be created in the same AZ.

Closes-Bug: #1889687
Change-Id: Ic51f6c7671bae2b241ada6d0c75fd9ea410eb73b
3 years ago
Ghanshyam Mann 7d9b50a810 Cleanup server before image at test level
test_attach_scsi_disk_with_config_drive test
create the server via self.create_test_server which
delete the server at class level cleanup and created
image cleanup happen at test level so throw error.

We need to delete the server at test level cleanup and before

This is required as when both Glance and Nova use a shared RBD backend
Nova will clone an instance disk directly from the Glance RBD volume.
This results in any attempt to delete the Glance image to fail while the
server is still provisioned as it still references the Glance RBD volume.

Closes-Bug: #1905725
Change-Id: I1aa6a161d3821470fe282914929ebdc93dd5e802
3 years ago
Zuul 05628f2e91 Merge "Remove six.PY3/six.PY2" 3 years ago
Lee Yarwood adcddceabb compute: Cleanup server before image in AttachSCSIVolumeTestJSON
This change simply reorders the cleanup operations within the
test_attach_scsi_disk_with_config_drive test to ensure the server is
always removed prior to the image.

This is required as when both Glance and Nova use a shared RBD backend
Nova will clone an instance disk directly from the Glance RBD volume.
This results in any attempt to delete the Glance image to fail while the
server is still provisioned as it still references the Glance RBD volume.

Change-Id: Ibcb1d1e3d1bb087060bcd0569a70c9955cd1357f
Closes-Bug: #1905725
3 years ago
Zuul b2c04d4c50 Merge "Test attach scsi disk with config drive enabled" 3 years ago
zhufl 940a9e2159 Fix TypeError when there exists image with size None
When there exists image with size None(e.g.,images whose status is
queued), test_list_images_param_sort will raise TypeError:
TypeError: '<' not supported between instances of 'int' and 'NoneType',
So we should ignore images with size None.

Change-Id: Ie084c65303238eaeff0a753915356d72aa039434
Closes-Bug: #1905515
3 years ago
Ghanshyam Mann cdcdf2ba5b Skip test_create_object_with_transfer_encoding
test_create_object_with_transfer_encoding is failing
consistently since 20th Nov and blocking Cinder and
Swift gate.


Let's skip this test until we find the fix.

Related-Bug: #1905432

Change-Id: I63c500920875c08ce7aba788742a04b9b3653daf
3 years ago
Zuul 9ca8827ff5 Merge "[Trivial]Remove unused variables and methods" 3 years ago
zhufl 776185971a Add tag in compute interfaces schema for microversion 2.70
Optional field 'tag' is added in the response body of the following APIs
in compute microversion 2.70:
   - GET /servers/{server_id}/os-interface
   - POST /servers/{server_id}/os-interface
   - GET /servers/{server_id}/os-interface/{port_id}

This is to add it in the interface schema of compute microversion 2.70.

Implements: blueprint fix-microversion-gap

Change-Id: I6d5c27cadf75919a54e20eb2b095dec22817e47a
3 years ago
zhufl bf5ed0b676 [Trivial]Remove unused variables and methods
This is to remove unused variables and methods to keep code clean.

Change-Id: Ib0b1e6ecb23481103791b065a622b4b89190412e
3 years ago
Zuul 72a3ff996f Merge "[Trivial]Do not use cls in instance method" 3 years ago
zhufl d926b8d08f [Trivial]Do not use cls in instance method
cls should not be used in instance method, self should be used instead.

Change-Id: Ia125ffac1b42a1fe05b28dee7080e298426e7f2d
3 years ago
Slawek Kaplonski bc360aeb0f Skip test_server_rescue with volumes when there is no Cinder
Change-Id: I34969b03230eff2a52f923d4e21fdf9248f247c1
Closes-Bug: #1904131
3 years ago
Zuul 481f08eb01 Merge "Set image_alt_ssh_user during stack" 3 years ago
likui 7d91c87345 Remove six.PY3/six.PY2
The Python 2.7 Support has been removed by:
So remove hacking rules for compatibility between python 2 and 3

Change-Id: I0e78b982b79674520c7695c0cca7352677d7b7a0
3 years ago
Zuul 0769270ec5 Merge "Replace assertItemsEqual with assertEqual" 3 years ago
Zuul ae784996c9 Merge "Add glance image import copy-image tests" 3 years ago
Weronika Sikora c54a911004 Set image_alt_ssh_user during stack
At this moment, only image_ssh_user is present in the config
of Tempest. It's set to cirros by default and used for
SSH connections in tests. However, several tests build
instances with image_ref_alt, but still use image_ssh_user to
connect, which results in failure if image_ref_alt is set to
a non-cirros image. They should use image_alt_ssh_user instead,
which can be set to whichever user the image_ref_alt needs in
either local.conf or during plugin installation.

This change replaces image_ssh_user with image_alt_ssh_user
and modifies Tempest's config to have access to said
variable. It also adds a password variable in Tempest's
config for the alternative image.

Change-Id: Ibe81a068c6fdeb7cd1eedf1df76ce62737160a01
Closes-Bug: #1844535
3 years ago
likui 6aa0fa3561 Replace assertItemsEqual with assertEqual
assertItemsEqual was removed from Python's unittest.TestCase in
Python 3.3 [1][2]. We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertEqual.

[1] -
[2] -
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: If9ed6624afb277f1d09e5c5a2b7073de85d467d4
3 years ago
Ghanshyam Mann 4346a82ffe Add glance image import copy-image tests
Glance image can be copied to mutli stores using
copy-image import method. Adding test for the same.


Change-Id: Ia7c967946304a8c7a79774b4116dd6169822f3ac
3 years ago
Paras Babbar 0d62208241 Test attach scsi disk with config drive enabled
There were recently issues discovered in nova as it
used to consider only an instance's existing volumes
when finding the next available SCSI address when
attaching the volume, so for example if the instance
has config drive in the shape of a SCSI CDROM, it's
SCSI address gets ignored in the new address calculation
and thus there will be address collision in the xml and
libvirt will complain and hence the attachment to volume
failed with the error that the doamin already contains
the disk with that address.

This test will actually covers the same scenario by
enabling the config drive and attach/detach the volume
to the instance that is boot up using the custom image
meta property hw_cdrom_bus and hw_disk_bus as scsi
with virtio-scsi mode.

There is an additional create_image_with custom prop.
method created that will copy the default image used
in the conf. and then updating it with the custom
property mentioned in the attach scsi volume test.

Also to create an image with the custom property needs
admin priviliges for image_client so hence adding the
test here in admin tests with updating the image_client
with admin privilege in compute admin test class.

Related-Bug: #1867075

Change-Id: I9c7be55aaa363860a78d2efe2a4685433777625b
3 years ago
afazekas 104e0b731a Delete test_reboot_server_soft
The test has been skipped for than 6 years already.

Nova automatically switched to hard reboot if the guest is
not responding, no way to see the difference from the API.

The following alternatives were not agreed on the PTG.
 - Change the acpid config an all supported image before the reboot,
   and log the acpi event in a tempest friendly way
 - ssh the machine before reboot, in this case more likely a
   soft reboot would happen, but we are unable to distinguish it from
   the hard one.

Take into account that the minimum scenario test uses soft reboot
and the nova functional test also covers reboot.

The test hasn't failed for more than 6 years (it's been skipped),
so nothing prevents us from removing it by the usual removal procedure:

The test deletion was also announced on ML:

Change-Id: I62b48865f5b21e55c28b8ee08ad5786473cc5ddf
Related-Bug: #1014647
3 years ago
Zuul ccd164694e Merge "Fix negative tests of update_volume for volume microversion 3.59" 3 years ago
Zuul 04aaa8a05d Merge "Set max_microversion 2.56 for ServerPersonalityTestJSON" 3 years ago
Zuul aa81332c25 Merge "Skip additional test if 'xenapi_apis' flag is False" 3 years ago
Zuul 60429ddd04 Merge "Fix flavor NotFound in test_resize_server_revert_deleted_flavor" 3 years ago
Zuul 2f073f0ae8 Merge "Add glance multistore tests" 3 years ago
Stephen Finucane ce23482fd7 Skip additional test if 'xenapi_apis' flag is False
In change I0ae3f7a81ca7b56f56871e61bcf196ca572ae6d6, we introduced the
'xenapi_apis' feature flag to disable tests for XenAPI-only APIs that
are scheduled to be removed. However, we missed one test from the skip.
Add that test now, with a new, better name to highlight its purpose. We
also correct a related docstring.

Change-Id: Ica872c31751a7e0edb310acdc4bf59baaf6dfc54
Signed-off-by: Stephen Finucane <>
3 years ago
Zuul 307d2bde1f Merge "Adding description for testcases - swift part1" 3 years ago
Zuul 24ffe96042 Merge "Add keystone v3 EC2 credential tests and client" 3 years ago
PranaliD 491d63e12c Add glance multistore tests
Adding tests for below scenarios

 1. test for import_to_all_stores(--all-stores true)

 2. test for import_to_specified_stores(--stores store_list)

Change-Id: I3aa413c624881065a1cf46c6345f9eda923df8eb
3 years ago
Zuul 4f1a3bb3c4 Merge "Add Access Rules tests" 3 years ago
Colleen Murphy 5eaf6bdc9a Add keystone v3 EC2 credential tests and client
The v2 version of the /users/{}/credentials/OS-EC2 API was already
present, for completeness this patch adds the v3 equivalent.

This API is not documented because it is preferred to use the
/v3/credentials API for this functionality.

Change-Id: Ide90658fa07a3d5a7ba2e52c3ab7377170273b76
3 years ago
Zuul c00798ea9c Merge "volume: Introduce extend attached encrypted volume tests" 3 years ago
Zuul a59a1aba20 Merge "Adding description for testcases - compute part11" 3 years ago
Zuul c6c0891564 Merge "Fix test_allowed_address_pair test case cleanup" 3 years ago
zhufl 27f410a2d6 Adding description for testcases - compute part11
When Tempest is used in customer site, often we are required to
provide a testcase list including testcase names and descriptions.
Now no this kind of doc is available, so we can add descriptions
with the format of doc string for every testcase, so later we
can generata such a testcase description list.

There are hundreds of testcases missing descriptions, so we can
add them gradually, and limit the modified files in one patch
for the convenience of reviewing.

Change-Id: I5bf95ca579b731ca4baefb590edb8e265126ce4f
partially-implements: blueprint testcase-description
3 years ago
Zuul 6e81c8b785 Merge "Adding description for testcases - compute part8" 3 years ago
Zuul d351843628 Merge "Use the correct attachment id for multiattach." 3 years ago
Zuul a86b565990 Merge "Fix test_list_flavors for compute microversion 2.55" 3 years ago
Zuul 0ac27dc298 Merge "compute: Wait until server is ACTIVE before deleting during resource_setup" 3 years ago
Stephen Finucane 39fa9c1631 Add 'xenapi_apis' compute feature flag
Nova is removing the XenAPI virt driver. There are a number of APIs that
only work with this virt driver so those are being removed at the same
time. Once removed, they will return a HTTP 410 response, regardless of
the microversion.

Add a feature flag that allows us to skip these tests on clouds that no
longer provide these APIs. It default to False (skip). We will set this
to True (do no skip) on stable branches of nova.

Change-Id: I0ae3f7a81ca7b56f56871e61bcf196ca572ae6d6
Signed-off-by: Stephen Finucane <>
3 years ago
Zuul 2c306e295d Merge "Adding description for testcases - compute part10" 3 years ago
Zuul fb66ad5594 Merge "Adding description for testcases - volume part3" 3 years ago