Commit Graph

66 Commits

Author SHA1 Message Date
Tom Weininger c03e9c39d2 Test new HSTS feature
Test HTTP Strict Transport Security with Octavia.

Partial-Bug: #2017972
Change-Id: Ie54714015e943fd1cb75ca95f8cf241fbc99268c
2024-04-23 18:53:25 +02:00
Gregory Thiemonge ece5ab4369 Add SCTP protocol listener api tests
Story: 2007884
Task: 41174

Change-Id: I090045a0eac39cb64f0373f932e7b42640ee5ad9
2023-07-11 08:48:53 -04:00
Michael Johnson 6dac8ff58f Update Octavia tempest tests for no scoped tokens
There has been a direction change in the "secure-RBAC" goal and scoped
tokens are no longer being implemented[1].
The Octavia tempest tests were updated for the new keystone roles and
scoped tokens at the same time with an (bad) assumption that they would be
turned on at the same time.
This patch updates the Octavia tempest plugin to not assume that scoped
tokens are in use when the RBAC type is set to keystone_default_roles.

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#direction-change

Depends-On: https://review.opendev.org/c/openstack/octavia/+/877433
Change-Id: Ia1c4ca0b675d39bd43640184d6d3deba823fd3f6
2023-03-14 23:21:51 +00:00
Michael Johnson 9e9f526d65 Add "member" role to non-admin test credentials
Some services are enabling "new defaults" RBAC by default. This will require all non-admin users to have either the "member" or "reader" role. This patch updates the Octavia tempest plugin to include the "member" role in test credentials when the tempest plugin is configured for "RBAC_test_type" other than owner-or-admin.

Change-Id: I8aadb98d438943b18a8d72ff54e216930cfd3ccc
2023-01-18 18:02:06 +00:00
Bas de Bruijne 530a88a434 Make user role logging optional
Not in every cloud does tempest have permissions to list the
role assignments. Since it is not critial for running the tests,
the logging of the user roles should be configurable.

Change-Id: I8aea2b597b9dd9bbdc5a1527fae03e86364aab4c
2023-01-03 17:41:29 +00:00
Michael Johnson 031ecca513 Adds a pool client authentication scenario test
This patch adds a pool client authentication scenario test that uses
test servers that require client authentication.

Change-Id: Id5b200954cdf02280d31ed910012a1591a2d2697
2022-09-22 18:57:35 +00:00
Zuul a3a95b132e Merge "Fix octavia-tempest-plugin on old tempest releases" 2022-02-09 15:30:24 +00:00
Zuul 3d8d6ca0eb Merge "Add centos-9-stream job" 2022-02-08 23:23:48 +00:00
Gregory Thiemonge a2c234ea22 Add centos-9-stream job
Add octavia-v2-dsvm-scenario-centos-9-stream

Add extra args to the "scp" command to authorize the pubkey exchange
with a cirros VM.
Detect the openssh client version to enable the use of the SCP protocol
(starting with openssh 8.7, the SFTP protocol is the default protocol
with scp, SFTP is not supported by Cirros) when sending files to the
cirros VM.

Depends-On: https://review.opendev.org/828189

Change-Id: I689a50e6762fd22e1aaec8aa84ff5b075ff5bd45
2022-02-07 21:21:46 +01:00
Gregory Thiemonge b0da4f3ce5 Fix octavia-tempest-plugin on old tempest releases
This is a follow-up commit for 'Add type to allow ECDSA keys'
(I34ac429ab5442cef056ee8b63fcb2ba41e8b9b27), this commit allows
using octavia-tempest-plugin with older tempest releases
(ex: in our jobs on stable/train).
It catches the exception if [validation].ssh_key_type is not
supported and doesn't pass the ssh_key_type argument to tempest
functions.

Change-Id: I5c2db87975803b30ea230c3bbf5dab4b96da4614
2022-02-04 10:58:09 +01:00
Ade Lee d0ea406ee4 Add type to allow ECDSA keys
Some tempest tests will fail under FIPS because they are trying to
ssh to a cirrus instance that has a version of dropbear that does
not support signatures other than using SHA-1 for RSA keys. This
is not allowed under FIPS.  The workaround until cirros is updated
is to use ECDSA keys.  This patch allows the key type to be
specified.

Depends-On: https://review.opendev.org/c/openstack/tempest/+/807465
Change-Id: I34ac429ab5442cef056ee8b63fcb2ba41e8b9b27
2021-11-05 20:38:44 +00:00
Zuul ec23dbc276 Merge "Adds a pool re-encryption scenario test" 2021-10-02 01:05:31 +00:00
Michael Johnson 29d8e61ca2 Update service client access in tempest tests
All the load balancer service clients are registered via the plugin interface[1],
that way Tempest register and create the lazy initialization of registered clients
so that they can be access from there in consistent way.

But octavia-tempest-client create a separate instance of those and access instead of
accessing the registered service client in Tempest. This commit makes all the service clients
access from Tempest registry and remove the separate objects.

[1] cac3eefc44/octavia_tempest_plugin/plugin.py (L54)

Change-Id: Ie24909b49baf2c6a886e2ff711e641e36ffe6b50
2021-06-30 23:15:30 +00:00
Gregory Thiemonge 3497f6cb70 Fix owner_or_admin API tests
lb_observer and lb_global_observer don't have any meaning when
admin_or_owner policy override in enabled.
This commit disables client creation for those roles and removes their
uses from API tests (the behavior of the owner_or_admin tests are now
similar to their behavior before the introduction of the new RBAC
tests).

Requires the following configuration in tempest.conf:

[load_balancer]
RBAC_test_type = owner_or_admin
member_role = member
admin_role = admin

Change-Id: I2231384933d5974b962a558e8c0b3bffb1140b5a
2021-04-20 06:19:50 +02:00
Zuul 67ecd6757d Merge "Update tests for scoped tokens and default roles" 2021-04-15 18:49:22 +00:00
Michael Johnson 6006de75a7 Update tests for scoped tokens and default roles
This patch refactors the RBAC enforcement checks in the API tests.
It also updates those test for keystone scoped tokens and default roles.

Change-Id: I6fad03f5a89c213562918ca258884aac34ba7ce7
2021-04-08 22:07:40 +00:00
Michael Johnson 74b6f2ff50 Adds a pool re-encryption scenario test
This patch adds a pool re-encryption scenario test that covers
TLS enabled pools, pools with CA validation, and pools with
certificate revocation lists.

Co-Authored-By: Gregory Thiemonge <gthiemon@redhat.com>

Change-Id: Ib3d8d766b8eb358b48da74f8634f6d24510394b4
2021-04-02 16:20:26 +00:00
Zuul 434170a8e0 Merge "Fix testing IPv6 VIP network connectivity" 2021-03-27 06:27:25 +00:00
Gregory Thiemonge 54225ad231 Fix testing IPv6 VIP network connectivity
The IPv6 VIP subnet used in the tests is created using devstack's
default IPv6 subnetpool.
Devstack ensures that any CIDR from this subnetpool is routable from the
devstack node if the subnet is plugged into devstack's router1.

Change-Id: Iaf3113087a344787add3405208fb229838a56d0b
2021-03-16 15:33:20 +01:00
Michael Johnson baf12e025c Enable HTTPS on the test servers
This patch creates the required pki resources and enables HTTPS
on the test web servers. It sets up port 443 for regular HTTPS and
port 9443 for HTTPS that will require a valid client certificate.

Change-Id: Ib7cee4c8600fd1be4a9d7027d3ca1f413a0b1007
Story: 2003858
Task: 41170
2021-02-25 00:36:07 +00:00
Michael Johnson 2735735e64 Install test_server.bin in well known location
This patch installs and uses test_server.bin from
/opt/octavia-tempest-plugin as a well known location on the
filesystem. This way tests, like grenade, that run the devstack
plugins once in /old paths, can find the binary when running from
/new paths.

Change-Id: Ia78f16fde026269dec01f4dceb202842ad12a557
2020-11-13 14:41:08 -08:00
Michael Johnson 6a9236ad9a Adjust API tests for NotImplemented skip
This is a patch to restructure the API tests to use the
new skip_if_not_implemented capability.

Depends-On: https://review.opendev.org/745239

Change-Id: I291488e1c9418e51d6fe7ea142eaca13e3c181a0
2020-09-08 16:52:09 -07:00
Michael Johnson 89bdbcd125 Adjust scenario tests for NotImplemented skip
This is a patch to restructrue the scenario tests to use the
new skip_if_not_implemented capability.

Change-Id: I49a7fb6650030f2a1115c6d42442062bd33415fd
2020-09-03 17:10:56 -07:00
Zuul c611b45680 Merge "Remove all usage of six library" 2020-08-26 08:46:05 +00:00
Carlos Goncalves bb23855ce6 Add tests for allowed CIDRs in listeners
This patch adds API and scenario tests for testing allowed CIDRS in
listeners introduced in API version 2.12 (included in Train release).

Change-Id: Ibe677e046afc16f038ccacb10e5fe62802828581
2020-08-24 11:00:17 +02:00
jacky06 bd58726375 Remove all usage of six library
Convert all code to not require six library and instead
use python 3.x logic.

Change-Id: I9d5e9fce5d387c655c0bfc1bdcb699a1aa0f56a1
2020-07-13 14:17:57 -04:00
Andreas Jaeger 4215b7085f Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

The tempest plugin is used on older branches as well.
We really only need hacking on master anyways,
where we no longer support python 2, so here we
make the requirement specific to python 3.

Change-Id: I885da1613e9cf754302700019a1207a279b3af2a
2020-04-04 09:26:33 +02:00
Gregory Thiemonge 29d179016a Add UDP test scenario
Update test_healthmonitor_traffic & test_basic_traffic tests
to support UDP traffic in test_traffic_ops
Add simple UDP test in test_ipv6_traffic_ops

Add a UDP test server, merged with the existing HTTP test server.

Change-Id: I1e497b75672753ed0e7acf482bc0e4a6138d3437
2020-01-24 08:30:01 +01:00
Zuul 94c0b7a19f Merge "Run tests with algorithm supported by provider driver" 2019-12-27 05:20:21 +00:00
Maciej Józefczyk b6df5f8143 Run tests with algorithm supported by provider driver
This patch adds map of supported algorithms by
provider drivers. For a first iteration lets select
the first from supported algorithms to be used as
a default and run the tests with it.

In addition this patch splits check_members_balanced()
into subfunctions related to the algorithm
that is validated.

Story: 2006264
Task: 35972

Change-Id: Id055763f35b487da539eddfe802c543a11246503
2019-12-10 10:12:30 +00:00
Adam Harwell c2aa20c24a Test the Availability Zone [Profile] admin API
Depends-On: https://review.opendev.org/#/c/693765/
Change-Id: Ifc2965152c1bca8e899cf3c84153203ddb85712f
2019-12-09 11:41:58 +11:00
Michael Johnson 402de7d80c Add TLS SNI scenario tests
This patch adds scenario tests that exercise the SNI capabilities
of the Octavia TLS offloading.

Depends-On: https://review.opendev.org/690444
Change-Id: I4bbd103e34997dd6b1bb64cb5d69b5135c6e26ea
2019-11-08 14:23:09 -08:00
Maciej Józefczyk 6a508ce44a Add an option to reuse connections
While using requests.session TCP connections are
reused. OVN Load Balancing algorithm uses hash with source port
to route clients requests. In that terms if connection is reused
the load is not spread across members. This patch adds an option
to disable reusing connections.

Change-Id: I61a202a2c1a6d15d714464d519de39f5f2acb2a6
Story: 2006264
Task: 35992
2019-10-24 13:29:59 +02:00
Zuul 7140479919 Merge "Enable overcommit_memory in test server VMs" 2019-08-16 19:26:24 +00:00
Zuul 1b0e8b1529 Merge "Fix VIP IPv6 subnet discovery order" 2019-08-08 11:44:54 +00:00
Gregory Thiemonge f72a886031 Enable overcommit_memory in test server VMs
Enable memory overcommit in server VMs to fix an allocation error when
using static binaries that have been compiled with a recent golang
toolchain (>= 1.11).

Story: 2006346
Task: 36103

Change-Id: I1e5979b4e49492c9a84f936681214deac556d856
2019-08-07 09:06:45 +02:00
Michael Johnson 2b10e0a447 Add amphora update service client and API test
This patch adds a service client for the amphora agent configuration update
API and adds an API test for the amphora configuration update API.

It also adds the service client for amphora failover and cleans up some
client credintials in the amphora scenario tests.

Change-Id: I4b1a1f48d2f619b883619811539ddb262d6b5f45
2019-07-31 15:20:06 +00:00
Michael Johnson 77df0326b8 Adds provider flavor capabilities API tests
This patch adds provider flavor capabilities API tests to the Octavia
tempest plugin.

Change-Id: Ie4f9f72e011ee8aa30e8f9aa35558533839fb8c8
2019-07-30 09:45:34 -07:00
Carlos Goncalves 84af48c0f0 Fix VIP IPv6 subnet discovery order
Code was assuming the subnet existed already and only after creating one
if not. On environments where the subnet does not exist, it raises an
IndexError exception as there are no elements in priv_ipv6_subnet. This
patch fixes the order of the code to first create the subnet if ones
does not exist yet.

Story: 2006280
Task: 35982

Change-Id: I9fa9d7e16f32f516592bf155045d4f4e6a15ed6c
2019-07-25 19:18:49 +02:00
Michael Johnson 590fbe1203 Fix IPv6 tests if ipv6-private-subnet is stateless
If the cloud has configured the ipv6-private-subnet to use stateless
addressing, such as slaac or dhcpv6-stateless, we need to not request
a fixed IP from neutron.

Story: 2006164
Task: 35674

Change-Id: I27e82b34a39bea8a987724e013081079f236894d
2019-07-15 21:15:48 -07:00
Zuul 9d2c9984fc Merge "Add iptables-based active/standby scenario test" 2019-06-16 13:37:14 +00:00
Michael Johnson 7c5b9013ae Fix the IPv6 tests for no ipv6-public-subnet
The IPv6 tests will fail if the ipv6-public-subnet (created by the
tempest plugin) is not present. This is because we don't store
the lb_member_vip_ipv6_net value when we create an ipv6 subnet.

Change-Id: Ib44896c0707f29cb6b98bb249176602f3e7c7190
2019-05-28 11:04:40 -07:00
Adam Harwell 2b9432f7e9 Fix ipv6 multinode gate (use private subnet)
Public ipv6 subnet isn't actually pluggable -- neutron in devstack makes
the private ipv6 subnet externally routable instead. So, we should use
that in our tests.

Change-Id: I45354806f7ad1ce06e59e644004770ac57bcc6ef
2019-05-04 15:10:22 -06:00
Carlos Goncalves c2e1216e8e Add iptables-based active/standby scenario test
This patch adds a tempest scenario test for active/standby topology.

This scenario takes a similar approach to scenario proposed in Change-Id
Ibcd5552a67cea650edc72bfaa986357267ca2407 with the difference that it
does not rely on amphora stats API. Instead, it uses iptables to log VIP
traffic and make assertions based on logging.

Co-Authored-By: Michael Johnson <johnsomor@gmail.com>

Change-Id: I24a6fc3387166ec6cdbd57a5ca9f63743748ec68
2019-04-08 18:57:12 +02:00
Michael Johnson fc223fe16c Adds provider API tests
This patch adds provider API tests to the Octavia tempest plugin.

Change-Id: I25685276e12dd94e866f7db5b501baaa9a38cc84
2019-01-28 22:40:36 +00:00
Michael Johnson a2d0307498 Adds flavor API tests
This patch adds flavor API tests to the Octavia tempest plugin.

Depends-On: https://review.openstack.org/626819
Change-Id: I863ca500d255fe41eef2d7434e540d53b9ead903
2019-01-28 22:40:30 +00:00
Michael Johnson aff2e86ff9 Adds flavor profile API tests
This patch adds flavor profile API tests to the Octavia tempest plugin.

Depends-On: https://review.openstack.org/626819
Change-Id: I4e76b3717ddc577a912e39edbe701c71825361d2
2019-01-28 22:40:24 +00:00
Michael Johnson 04dc5cb4a0 Retry subnet/network deletes on 409 Conflict
Neutron can be slow to cleanup ports from subnets/networks.
This patch adds retries when deleting subnets and networks in the
tempest teardown/clean up phase after tests.

Also, there were cases where addClassResourceCleanup was being used
inside test cases instead of addCleanup. This patch corrects those to
use addCleanup.

Story: 2004826
Task: 29000

Change-Id: Ia29541d1c89f3559a3ce22b1a27c6bcf079ce2cc
2019-01-21 12:46:20 -08:00
Michael Johnson 0a0f9b342a Add a TLS scenario using Barbican
This patch adds a TLS load balancer scenario test using Barbican.

Story: 1627383
Task: 5149

Change-Id: I7013888f94261d94e1cd4c3167dc84da7125d1da
2019-01-08 09:52:04 -08:00
Michael Johnson 5a16ad3267 Add traffic tests using an IPv6 VIP
Adds a traffic scenario test that has an IPv6 VIP address and mixed
IPv4/IPv6 members. It tests that connections to the IPv6 VIP are
evenly balanced across the mixed members.

Change-Id: I6bb7be14379174be9018a74b07356ecd85089f45
Story: 1627892
Task: 27532
Depends-On: https://review.openstack.org/#/c/611460/
2019-01-02 16:14:50 -08:00