Commit Graph

41 Commits

Author SHA1 Message Date
Sunday Mgbogu e5a94aef46 Extend loadbalancer reconciliation test to cover listeners
This commit extends the loadbalancer reconcilation tempest
test to cover for when the listeners are deleted on OpenStack

Implements: blueprint reconcile-openstack-resources-with-k8s
Change-Id: If14b468e9a5f7d2c1492881d5a75ac8807030c4e
2022-09-06 22:32:37 +01:00
Zuul 49088c155a Merge "Add test_service_with_not_ready_endpoints test" 2022-01-24 11:06:37 +00:00
Zuul fd9ced52b3 Merge "Define new test_endpoints_object_removal config option" 2022-01-24 11:06:35 +00:00
Jon Uriarte 635cf80fc5 Define new test_endpoints_object_removal config option
There are some old kuryr-kubernetes versions that don't
support LB pool members removal upon endpoint deletion.
For such cases, and in order to be able to run the test
test_service_without_selector for all the versions, a
new configuration option test_endpoints_object_removal
is defined.

It's expected to set test_endpoints_object_removal to
False in those environments where the removal is not
supported, and keep it to the default True value in
the rest of them.

Change-Id: I8c2d6e8e66d707fcf22311456c0584a6167acea1
2022-01-19 22:24:24 +00:00
Jon Uriarte fca8e58141 Fix lb_reconcile_timeout exception formatting
It was complaining about string formatting when the timeouts
were being reached:
TypeError: not all arguments converted during string formatting

Change-Id: Ia926be7d43c0f06b775a35092fe644c0c7b78b1d
2022-01-18 23:09:39 +00:00
Jon Uriarte 2ffdd2f475 Add test_service_with_not_ready_endpoints test
This test case automates the issue described in
BZ https://bugzilla.redhat.com/show_bug.cgi?id=1980957.

The new test case:
 - creates a deployment with a failing readiness probe so all
   the pods are not ready
 - creates a service for the deployment (where the endpoints
   are not ready)
 - it checks Kuryr pods are not restarted

Change-Id: Id19f85625901b35900f9441aace8fe8938cb1d68
2022-01-14 18:24:17 +00:00
Maysa Macedo 46ddd75cf7 Ensure lb is active before checking connectivity
This commit ensures the load-balancer is active before checking
connectivity to it for the scenario of test_pod_service_curl.

Change-Id: I935cc510d8d96ca031f30c4a3dbdfec6a6238e92
2022-01-07 12:36:44 +00:00
Jon Uriarte 8501f18e61 Remove LB_TIMEOUT in favor of lb_build_timeout
Using the CONF.kuryr_kubernetes.lb_build_timeout config option instead
of the LB_TIMEOUT constant allows modifing the LB creation timeout for
different environments where the LB creation time can vary
significantly.

Remove LB_RECONCILE_TIMEOUT as well in favor of a new config option
CONF.kuryr_kubernetes.lb_reconcile_timeout.

Change-Id: Id1eb72c294abd6a2e5111bd0c7f97e311969b698
2021-12-23 12:29:31 +00:00
Itzik Brown e1fdcc0a5b Update scale deployment
- Move scale deployment to base
- Check pods are ready after scaling the deployment

Change-Id: I56da873e5a3e1a0e32909fdbdd65a5888c054be8
2021-11-07 12:20:32 +02:00
Itzik Brown 4bb12bd975 Update test_service_without_selector test
Check that loadbalancer's members are delete when deleting the endpoint

Change-Id: I5d01029bae9c782ab57d38dff8c6aea1b2128305
2021-11-04 14:22:03 +00:00
Maysa Macedo 5264e4c207 Ensure connectivity is checked after members are configured
After deploymented is scaled up we should be checking the
existence of the members and then checking the connectivity
and not the other way around.

Change-Id: I02b345e8d0e0b64ee9942eb532127f739b386281
2021-11-03 16:50:13 +00:00
Maysa Macedo 89b66e6008 Ensure lb is ACTIVE before connectivity check
When the load balancer reconciliation is triggered
besides checking if the current lb ID is different
from the previous lb, the lb members should also be
configured. This commit enforces the existence of the
lb members. Also, it checks if the load balancer is
ACTIVE before checking connectivity.

Note, that it also removes the tempests gates to avoid
a circular dependency.

Change-Id: I64d8596f8d0504eeb898d40be7a11aa6635bca17
2021-11-02 11:45:17 +00:00
Sunday Mgbogu ddef1710fb Add Kuryr-tempest-plugin test for LoadBalancer Reconciliation
The tempest test is to check for LoadBalancer reconciliation on
OpenStack. By deleting the LoadBalancers on OpenStack, the
reconcilation ensures they are recreated on Octavia.

Implements: blueprint reconcile-openstack-resources-with-k8s

Change-Id: Ic0f3597fad3b8fb5f95df537522603e94fd4b231
2021-09-16 13:57:05 +00:00
Itzik Brown 19a3314ca8 Check LB members when scaling a deployment
- Create a deployment and a service
- Scale the deployment and check LB members count are equal to the
  deployment replicas
- Scale the deployment to 0 and check that there are no LB members

Depends-On: Idb879245607a6f0f914a44220312d54aa40e2e3d
Change-Id: Ic1db03ea52d3796f669ec8e5a88b5da2481c0150
2021-09-13 19:49:05 +03:00
Itzik Brown 02778b3625 Check service longevity
Check a service connectivity for couple of minutes

Change-Id: I2347e49eaac018c630e9f437efe4db9af2e7fa23
2021-08-19 16:30:02 +03:00
Tabitha Fasoyin bb32e50644 Adds tests for making listener timeouts configurable
Change-Id: Ida82b70aedd3979697ef7e5760ea389ab99c4a5b
2021-04-21 14:05:05 +00:00
Tabitha 34fe966f34 Adds connectivity test for SCTP service
This patch adds a new test to check SCTP connectivity from pods.
The 'create_setup_for_service_test' and 'assert_backend_amount_from_pod'
functions were also extended to support SCTP services. The kuryr-sctp
application was also extended to support connection with IPv6 address family.

Partially-Implements: blueprint sctp-support
Change-Id: Ic63a2807238d3d879bb172d74b05bada2399f07f
2021-02-22 18:13:00 +01:00
scavnicka 9819fe5d7f Create Tempest case to ensure Services without Selectors
To ensure that connectivity is working we need to create a new
tempest test, which will create a service without selectors,
create the endpoints and check the connectivity to the endpoints.

Depends-On: Ia6404c22132af3a17ce865c4f33a57b2b6832e9f
Change-Id: I07f24bb754f2dde24fe47b340ebec04440ff3890
2020-12-01 18:22:02 +01:00
Itzik Brown bc8b216943 Fail get_controller_pod_names when no pods found
Also skip test_unsupported_service_type for non containerized setups

Change-Id: I4c33cf40ffb6efc43260b6d58d2d0c0c15dd8c89
2020-08-18 11:06:44 +03:00
Itzik Brown 2fe1791ff2 Remove skip of test_service_udp_ping
It was skipped because of 1886909 which should be fixed

Depends-On: https://review.opendev.org/#/c/742384/
Change-Id: Ia28cf8b9c27560f4672a3bc46fd8a12eae790a51
2020-08-05 14:58:15 +00:00
Itzik Brown 6760376f17 Skip service_udp_ping until Bug 1886909 is fixed
Launchpad: https://bugs.launchpad.net/networking-ovn/+bug/1886909
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1846189

Change-Id: I7f51b0189003d4489a929b6c5ceebb9bd5fbd159
2020-07-09 09:22:47 +03:00
Michał Dulko 681ff7a0cc Basic IPv6 support
This commit fixes stuff related to the fact that most apps require IPv6
addresses to be in brackets. Also now tests that use floating ips are
skipped if IPv6 is configured. FIPs are not supported on IPv6 and we
need to figure out other way to test them.

Implements: blueprint kuryr-ipv6-support
Change-Id: Ic2be3cf93bd9d114af907d26198e8011281bfabf
2020-02-14 18:07:26 +01:00
Itzik Brown 47c0c5478f Add a check for ClusterIP IP of LB service
Check from a pod the connectivity to the internal IP of
LB services instead of from an external node

Change-Id: I6ce0b16985de6cc7182026975a63f03844d9d9ee
2019-11-27 16:27:27 +02:00
Genadi Chereshnya 54220e17fa Fixing service connectivity testing
The service connectivity to ClusterIp service should be tested
from the pod in the same namespace

Depends-On: I35f3be8fc16d71d0d2ac01c5451d398dd631f118

Change-Id: Ife099f1d05c0cae954119f0ef4616c95076f83e7
2019-07-08 14:55:42 +02:00
Yossi Boaron fc679d4946 Add connectivity test for service UDP
This patch includes the following changes:
1. Deletion of previous UDP service test (unsupported protocol),
this test should be changed to protocol=SCTP whenever we"ll run
Kubernetes version that supports SCTP.

2. New test to check connectivity of UDP service
from the host.

Follow up patches will check connectivity from pods, and
for LoadBalancer UDP service.

Depends-On: I712e088e21774d85033025996e31fda510c239a7

Change-Id: I8f38f2c657d6412de71f20e51c9f2ff2e13093f2
2018-11-15 12:32:40 +02:00
Yossi Boaron 6e23790eec Update service functions to support UDP
This patch extends 'create_setup_for_service_test' and
'assert_backend_amount' functions to support both UDP
and TCP services.

In addition this patch also verifies that all members
appears in K8S-Endpoints are responsive.

The tests for UDP services will be covered in a follow-up
patches.

Change-Id: I1969ecc4fda361c890ff70e12fa1be0232ded1d4
2018-11-13 16:45:43 +02:00
Antoni Segura Puimedon 177dab22a2 Use ThreadPool and requests instead of subprocess
This way in less than a second we can check 100 times the service
and reduce the test flakiness.

In addition this patch also gets pod execution error
information, curl -Ss displays errors on stderr but the
streaming facility was swallowing them.

This patch adds the following:

* stderr for pod execution,
* status_code for pod execution,
* refactoring of service backend utility functions.

Change-Id: Ide6674c250cb2a7300ef8a77648f77e0d9c589bc
Signed-off-by: Antoni Segura Puimedon <celebdor@gmail.com>
2018-08-19 13:01:27 +03:00
Genadi f2c9485ca8 Create service with UDP protocol
Check that kuryr-controller doesn't crash when creating a service with
UDP protocol

Change-Id: I553fc1dca7cfdd227a167ac1ebb0d9596c2a1caf
2018-08-16 14:15:16 +00:00
Genadi 2f12fdd664 Create service with unsupported type
Check that kuryr-controller doesn't crash when creating a service
of unsupported type (NodePort)

Change-Id: I0e83ca819a31d310b5be3af94ea1af8acfdc4c01
2018-08-16 14:14:46 +00:00
Genadi 00a957314a Testing VM to loadBalancer service connectivity
Creating function in base class for creating VM with relevant objects
Using function for existing  VM to pod connectivity test
Creating function for VM to service connectivity

Change-Id: I98e9c1fc1e2136ee1f9428fa3736dc49d5784e98
2018-08-12 10:06:13 +03:00
Michał Dulko 76097e10fb Add -Ss to curl executions
This commit makes sure curl is executed with --silent and --show-error
to get rid of progress bar and include errors in the output.

Change-Id: I9f1312a143beff067f6eec787784e5dd96dec485
Closes-Bug: 1784820
2018-08-01 12:05:28 +02:00
Michał Dulko d8c3bf13ec Get rid of cmp() usage and randomize pod labels
cmp() builtin is not available in Python 3. This commit removes its
usages. It also turns out we were comparing int to string in
assertNotEqual() in Services tests, so that was always passing.

Also tests were interfering with each other as labels added for pods in
Services tests were hardcoded. That's fixed here as well.

Change-Id: I37a5805f7670f905db24ddf86d3a4b4839453a6d
2018-07-30 17:53:57 +03:00
Daniel Mellado 8c1be2a373 Restore service tests
This commit restores services tests on Kuryr-Kubernetes after the issues
on the CI has been sorted out [1]

[1] https://bugs.launchpad.net/kuryr-kubernetes/+bug/1778048
    https://bugs.launchpad.net/kuryr-kubernetes/+bug/1778483
    https://bugs.launchpad.net/kuryr-kubernetes/+bug/1778516

Depends-On: https://review.openstack.org/#/c/578344/
Change-Id: I278f67dc74a0f513ea72ab6fabfbb91ccd02885a
2018-06-27 14:43:11 +02:00
Daniel Mellado 7c296759d9 Disable load balancer service scenario
This commits disables also TestLoadBalancerServiceScenario class so it
won't run where enable_service_tests is disabled. Otherwise it lasts
test fails due to its resource setup loading.

As it happened with [1] this commit will be reverted as soon as we
identify the root cause for the issue.

[1] https://review.openstack.org/#/c/577821/

Change-Id: I1b05fba7fcb7a282232544810a1a8b6c7b539438
Partial-Bug: #1778483
2018-06-26 22:25:45 +02:00
Daniel Mellado 87171eec8e Explicitly disable service tests by default
This commit sets a new config option that will disable service tests
before they go to the 'resource_setup' phase, as just adding a skip
decorator to the tests still triggers the setup phase and breaks the
gate.

As it happened with [1] this commit will be reverted as soon as we
identify the root cause for the issue.

[1] https://review.openstack.org/#/c/577821/

Change-Id: I2452bde17c56e94d2942e5a293e2e4ccc3e1b2b3
Partial-Bug: #1778483
2018-06-26 11:24:00 -04:00
Daniel Mellado 60f2319a87 Skip service tests
Due to [1] the services tests are randomly failing. In order to unblock
the gate while we investigate the issue this commit sets all the
services tests to be skipped.

Once we get to a fix this patch will be reverted.

Also, this commit temporarily moves daemon-octavia and daemon-lbaasv2
gates to experimental as they're blocking the merge due to the issue
with Flask [2]. Those gates will be moved back to check queue once the
patches are merged.

[1] https://bugs.launchpad.net/kuryr-kubernetes/+bug/1778516
[2] https://review.openstack.org/#/c/577760/

Change-Id: I5850b35e94ba733241d9e54206cc20ceba20df2c
2018-06-26 08:50:28 +02:00
Genadi 86c2e5afb4 Testing curl to the service of type LoadBalancer
Create a service with 2 pods related to it
Curl the service twice and check 2 different outputs

Change-Id: I38655eb7b707c3ba36deab4b43998048dffcc74e
2018-05-28 10:25:36 +03:00
Genadi 22a7992338 Testing curl succeeds from pod to the service
Refactoring test_service so it's possible to use
several tests in TestServiceScenario class, like:
1) Connectivity to the service from the machine running the test
2) Connectivity to the service from another pod
3) Connectivity to the service from VM (following patch)

Change-Id: I928aaafff1e75a98f33b94ee31c8ad9bc775ba2a
2018-04-20 13:40:20 +00:00
Antoni Segura Puimedon b7391ab1e3 Revert "Skip service test"
This reverts commit 2555caf480.

Depends-On: I895d3e5af71ccc7219be422b9ca9e9f8833bad8f
Change-Id: I119d5bb2244fcbb89c709b8bd1fb73323d2cddca
2018-04-19 17:46:53 +02:00
Daniel Mellado 2555caf480 Skip service test
This commit makes service tests fail because an issue on kuryr
kubernetes when creating services using octavia without lbaasv2. [1]

This is a temporary measure to unlock the gates and will be reverted as
soon as the appropiate patches are merged [2]

[1] https://bugs.launchpad.net/kuryr-kubernetes/+bug/1763045
[2] https://review.openstack.org/#/c/560433/

Depends-On: https://review.openstack.org/#/c/560946/
Change-Id: Idf55152b5f8ccc2133e272cdf9b9efd5e5ae64c9
2018-04-13 10:19:06 +02:00
Genadi Chereshnya f07e37c1eb Testing service creation and connectivity
Creating functions to create delete and get ip from the service
Updating creation of pod to have a label
Testing connectivity to the service

Change-Id: I3c6d5dc9614820b889ce10f0ea9c6a6a3f09968f
2018-03-29 11:31:54 +03:00