Nova list the interfaces attached to a server based on list of ports
bound to the server. However during detach interface nova unbounds the
port first and then deallocates the resources used by that port in
placement. The current detach waiter only waits until the interface
disappears from the interface list. This can cause that waiter returns
before the resource allocation is removed from placement cause a race in
the test asserting such allocation.
So this patch changes the waiter to wait for the successful detach
os-instance-action event for the server as that is only recorded after
the port is fully deallocated.
blueprint: qos-minimum-guaranteed-packet-rate
Change-Id: I8740f8e0cc18ffea31a9a068bccee50bf4e6fe28
As a preparation to test Network QoS minimum bandwidth and minimum
packet rate rules together this patch the necessary packet rate API
client to tempest lib.
blueprint: qos-minimum-guaranteed-packet-rate
Change-Id: I1c5c82e8178462652c36533093958c82b5130a55
In bug 1923194, a floating IP is associated to a server. Upon
performing the operation, Neutron sends Nova a network-vif-changed
external event, causing Nova to update its network info cache. Until
Nova does this, the new floating IP is not reflected in `server show`.
Tempest's `server show` is racing with this process, causing
intermittent failures when the new floating IP does not show up in
`server show` in time.
This patch adds a new waiter that waits for a floating IP to either
appear to disappear in the `server show` output, and modifies two
tests to use the new helper.
Closes bug: 1923194
Change-Id: I0f7e1c9096dc1903903fb31c5e854f07800efbfd
The test was randomly failing which was most likely caused by
a race condition - the temporary module is not created at the
moment when the test tries to load it.
This commit moves the temp module creation into a setUp method.
Closes-Bug: #1918316
Change-Id: I5d5356200f531a06b2814205d65f20dc528cf046
"QoS Limit Bandwidth" APIs must be used in Octavia-Tempest-Plugin
to add missing QoS based tests.
Note: this patch fixes the "expected status" code for
Update Minimum Bandwidth, that was set to default 200 instead of 202.
Change-Id: I30d9d823c972e560a0a48e24e44fb16bcc353c5a
The test was randomly failing which could be caused by a race
condition - the temporary files which are created during the
test weren't closed properly which could result in a situation
when they are not yet created but the test is trying to load
them.
Closes-Bug: #1918316
Change-Id: I7a5bf8b1404dbf96955b2eb96fb1a5552760a114
This change reworks both the waiters while attaching a volume *and* the
ordering of the waiters when detaching.
This is done to ensure the wait_for_volume_attachment_remove_from_server
waiter is called first as this uses the servers client and is able to
dump the contents of the instance console when we hit a timeout. The
contents of the instance console being incredibly useful to debug issues
within the guestOS when detaching devices as seen in bug #.
The wait_for_volume_attachment_remove_from_server waiter is also
extended to ignore missing Nova volume attachments as this can easily
happen if tests have manually detached volumes ahead of the cleanups
being called.
TODOs are also left to move away from using the volume status to
determine when a given volume has been attached and instead use the
state of volume attachments both in Nova and Cinder.
Related-Bug: #1931702
Change-Id: I8f7986dc6d8689d569b7fba74cca38de4236c6d6
Cinder has removed the volume v1 APIs in queens
cycle: I03bf2db5bd7e2fdfb4f6032758ccaf2b348a82ba
Tempest does not support queens release so we are good
to remove the volume v1 service clients also.
Change-Id: I297f230de51e0ef4f35eb33ddbaaab53c230713f
Add a method to return the current resource usage for a specific
resource provider. Given a specific rp_uuid return the resource
providers current generation as well as its assoicated resource class
usage at that time. Example output below:
(Pdb) self.resource_providers_client.list_resource_provider_usages('90234521-0f4f-4777-98d8-731db8e61a0d')
{'resource_provider_generation': 52, 'usages': {'VGPU': 1}}
More details of the api can be referenced here [1]
[1] https://docs.openstack.org/api-ref/placement/#resource-provider-usages
Change-Id: I13ca77f1cd8fbf74cd716b2d8eae772f5328a4d4
Once Glance finish the import operation(change image status
to active), it move the task to 'success' state but in between of
image become active and task is transitioning to 'success', tempest
try to check the task status and race condition happen.
Adding waiter method in test for task status check.
Closes-Bug: #1926671
Change-Id: I960b80314f1b0926eca33af830bc827f31cbeda6
1. Updated class level create_backup function to wait for resource delete
2. Added start_time, end_time, wait_time to the timeout exception message
to verify the test case waits for the build_timeout before throwing
the timeout exception
3. Updated the test case
https: //storyboard.openstack.org/#!/story/2008683
Change-Id: I4819b88c6789544124b67ab67b07141f1c50f36b
In python 3, all strings are considered as unicode string.
This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.
Change-Id: I64af1c7c7415cd4ab99b6a913fb84fecbc0a3bf1
This will invoke post and delete calls on os-assisted-volume-snapshots
endpoint.
Closes-bug: #1668407
Co-Authored-By: Ghanshyam Mann <gmann@ghanshyammann.com>
Change-Id: I81e8fd9f89ec1cb00fc0116c31f9c0559406164
The patch fixes:
AttributeError: 'Manager' object has no attribute 'compute'
thrown by the test_verify_tempest_config unit tests.
The patch edits the failing unit tests so that they use
a mocked Manager instead of the real one.
Closes-Bug: #1918407
Change-Id: I1fcce1ebba61ba33b1e948a80cb572f8ae17c548
Glance is adding a /image/$image/tasks API to make it easier to
consume the import API. This fetches the tasks after glance-direct
import, and validates that they look like we expect.
Because this is only supported after v2.12, we check for that before
doing the validation. To make that easier, this adds a has_version()
helper to the VersionsClient.
Change-Id: I2850f0659e82bf5c5a1005de0a063e7fcacadb51
We already added scope support for 'admin', 'member',
and 'reader' role. This commit is to adds the scope
support for specific roles, basically in get_creds_by_roles().
Test can now request the scope along with the number of roles
using the scope as prefix in credential type. Fpr example:
credentials = [['my_role', 'role1'], # this will be old style and project scoped
['project_my_role', 'role1'], # this will be project scoped
['domain_my_role', 'role1'], # this will be domain scoped
['system_my_role', 'role1']] # this will be system scoped
and below is how test can access the credential manager of respective
credentials type:
cls.os_my_role.any_client
cls.os_project_my_role.any_client
cls.os_domain_my_role.any_client
cls.os_system_my_role.any_client
Closes-Bug: #1917168
Change-Id: I9053faa255e3680d7f870e3cdedf62fb2eb5cb1a
Tempest dynamic credential does not support two
separate project admin or reader but sometime we need to
check the test behavior by requesting API with
different project admin or reader role.
This commit add support of alt project admin and reader,
also provide consistent method name for alt project member
role.
Change-Id: I11248fd0906d910180be30de7b59231e534b4563
md5 is not an approved algorithm in FIPS mode, and trying to
instantiate a hashlib.md5() will fail when the system is running in
FIPS mode.
md5 is allowed when in a non-security context. There is a plan to
add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate
whether or not the instance is being used in a security context.
In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.
Some downstream python versions already support this parameter. To
support these versions, a new encapsulation of md5() has been added to
oslo_utils. See https://review.opendev.org/#/c/750031/
This patch is to replace the instances of hashlib.md5() with this new
encapsulation, adding an annotation indicating whether the usage is
a security context or not.
In this case, all hashlib.md5() invocations are to run tempest tests
so this is not a security context. With this patch, we can run tempest
tests from a FIPS enabled machine.
Change-Id: Ib301466bb0a1996997c63599918fa96059a927bd