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
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
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
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
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.
Closes-Bug: #1905725
Change-Id: I1aa6a161d3821470fe282914929ebdc93dd5e802
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
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
https://docs.openstack.org/api-ref/compute/#list-port-interfaces
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
The Python 2.7 Support has been removed by:
https://review.opendev.org/#/c/704096/
So remove hacking rules for compatibility between python 2 and 3
Change-Id: I0e78b982b79674520c7695c0cca7352677d7b7a0
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
Depends-On: https://review.opendev.org/682902/
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] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277
Change-Id: If9ed6624afb277f1d09e5c5a2b7073de85d467d4
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
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:
https://docs.openstack.org/tempest/latest/test_removal.html
The test deletion was also announced on ML:
http://lists.openstack.org/pipermail/openstack-discuss/2020-October/017889.html
Change-Id: I62b48865f5b21e55c28b8ee08ad5786473cc5ddf
Related-Bug: #1014647
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 <sfinucan@redhat.com>
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
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
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
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 <sfinucan@redhat.com>