Commit Graph

398 Commits

Author SHA1 Message Date
Ghanshyam Mann 115d6bd490 Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg

Change-Id: I2687b8b310bc50efb077b638ba4842419789fa84
2024-01-03 23:57:16 -08:00
Zuul ab45b2fadb Merge "Cleanup py27 support" 2023-08-07 12:17:59 +00:00
niuke f4a0137c37 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: Ia6a5c61fa4f946ec4593176625627bd8f3e930da
2023-08-04 09:17:54 +08:00
niuke 3b0d1bd261 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py

Change-Id: I669204f768fa84c352158bcc1f73e13bd102e449
2023-08-04 09:12:31 +08:00
Ghanshyam Mann 160b9a208b Add stable/2023.1 jobs on master gate
As 2023.1 is released, we should add its job on master
gate to keep branchless tempest plugins compatible
to stable branch.

Ref: Tempest plugins guide for stable branch testing:
- https://docs.openstack.org/tempest/latest/stable_branch_testing_policy.html

Change-Id: I2d80915b78ac024c5db5fa21d9e71f7904a58c3f
2023-06-09 05:05:49 +00:00
Zuul 4af87c6e91 Merge "Setting security context for kuryr demo pod" 2023-03-21 14:22:31 +00:00
Itzik Brown 9db5ded1e7 Setting security context for kuryr demo pod
Otherwise for k8s >= 1.26 it fails with:
kuryr-pod-1568568478 is forbidden: violates PodSecurity

Change-Id: I5593c78b6809b945fa690c723525bc8b6473c58f
Depends-On: I7a51b3553a17c21160f76e527a61ef829610a888
2023-03-20 08:13:19 +00:00
Michał Dulko 46a98e1716 Test container: use UID instead of name
Newer OpenShift version won't allow you to specify username as `USER`
instruction argument. This commit changes the test container dockerfile
to create the user with `--uid 100` and then use `100` as the argument
instead.

Depends-On: I7ed0ae76108a409bc72bc61ab7c12164e8277257
Change-Id: I7a51b3553a17c21160f76e527a61ef829610a888
2023-02-23 17:23:47 +01:00
Itzik Brown 3acaa0062a Fix get subnet name in get_port_pool
Subnet name in the form of ns/{ns_name}-subnet was added
This is the form in 3.11

Change-Id: I1d1e1a5fbc0cfe4de404089110b31c4eebd95e7b
2023-01-12 10:21:42 +02:00
Itzik Brown 76f0c5ac74 Fix get subnet name in get_port_pool
Subnet name in the form of ns_uid/ns_name was added

Change-Id: Ibbca8bf7ddc1550eb6e0c3f0fcebbc31c9b77e4c
2023-01-02 10:55:18 +00:00
Michał Dulko 82934553ab Update tox.ini for new tox version
Seems like passenv directive in tox.ini needs to separate multiple
environment variable names by comma now. This commit updates tox.ini
to respect that.

Change-Id: Icf63fe7697b31af29ca7e1b9de5c78874f52efe1
2023-01-02 11:53:25 +01:00
Ghanshyam Mann 34255b30a2 Add stable/zed jobs on master gate
As zed is released, we should add its job on master
gate to keep branchless tempest plugins compatible
to stable branch.

Ref: Tempest plugins guide for stable branch testing:
- https://docs.openstack.org/tempest/latest/stable_branch_testing_policy.html

Change-Id: I04b4acadd2864ab3160a97888dbb912c18951907
2022-10-19 17:48:01 +02:00
Ghanshyam Mann 0863d4ad32 Pin stable branch jobs nodeset to Ubuntu Focal (20.04)
In 2023.1 cycle. we are moving the default distro
version of Ubuntu to Jammy (22.04)[1] so we need to pin
the nodeset for stable branch job in master gate so that
they continue run on their supporting distro version which is
Ubuntu Focal since stable/victoria.

[1] https://governance.openstack.org/tc/goals/selected/migrate-ci-jobs-to-ubuntu-jammy.html

Depends-On: https://review.opendev.org/c/openstack/kuryr-kubernetes/+/861836
Change-Id: I1cf6bd24bf00b445ccb0e87702edd84db4d5f2a1
2022-10-19 17:47:34 +02:00
Sunday Mgbogu 1569ccfd69 Fix scenraio when LB or Pool is not ready
The patch is to fix a scenario when LB or Pool ID
is not available while attempting to reconcile members.

Change-Id: I3d6e09f0a17228994032eba2fecf9f7663e6cf14
2022-09-07 10:34:53 +00:00
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
yangjianfeng 4b0fceea70 Add annotation project driver scenario test cases
Depends-on: https://review.opendev.org/832768
Depends-On: https://review.opendev.org/c/openstack/neutron/+/853261
Implements: blueprint specify-project-by-annotation
Change-Id: Ia4591ef96ce642f53ead6147ff4b56960746e510
2022-08-16 16:46:08 +02:00
Zuul d0840287fa Merge "Change naming (again) for networks and subnets." 2022-06-20 18:18:09 +00:00
Roman Dobosz 0cc8ae0fae Change naming (again) for networks and subnets.
There is a need for changing names again, since namespace id is no
longer stored in description and name for net/subnet is a compound of
name and uid.

Depends-On: https://review.opendev.org/c/openstack/kuryr-tempest-plugin/+/845745
Change-Id: Ib97a597f8afb47316e77154a9bf3ced41ce48468
2022-06-14 18:16:52 +00:00
Michał Dulko 28da7f63d3 Use proper ApiException from kubernetes client
Seems like folks developing Python kubernetes client had move the
ApiException around. So the backward-compatible way of using it is
kubernetes.client.rest.ApiException and trying to use it by
kubernetes.client.excetpions.ApiException will not work in older library
versions. As this client is supposed to still be compatible with
stable/victoria and kubernetes==11.0.0, this commit changes the
exception module to `rest` where needed.

Change-Id: If056529d49a053970891f89d12007174f544a551
2022-06-14 14:56:12 +02:00
Roman Dobosz 61bfb58898 Fix the crd_lb_ip not being defined.
During execution it may happen, that there will be UnboundLocalError
exception thrown for crd_lb_ip variable, due to unmet condition for
service ip not being set in the KuryrLoadbalancerCRD. Fixed by simply
defining variable.

Change-Id: Ie879ba0b9b85111ec1b906d66ec48127ce8dd1f9
2022-05-10 09:32:36 +02:00
Zuul 962594cc7b Merge "Adapt to new OS resource names." 2022-04-18 22:34:07 +00:00
Roman Dobosz d4debdd171 Update 'Maintained' stable branch jobs on master gate
We have stable/yoga released and stable/ussuri is in
'Extended Maintenance' state. Current 'Maintained'
stable branches are yoga, xena, wallaby, and victoria.

As per tempest stable branch testing policy[1], adding the
newly released stable/yoga job and remove the EM stable/ussuri
job.

[1] https://docs.openstack.org/tempest/latest/stable_branch_testing_policy.html

Change-Id: Id7434270af5fc654fc9bff9e0105e2408db392f9
2022-04-15 09:17:04 +02:00
Roman Dobosz 331547d50a Adapt to new OS resource names.
Change-Id: Id04ef0217a14fb8c3430c10d581b520e0afdb566
2022-04-12 15:01:31 +02:00
Zuul 65f6cef16b Merge "Check that pod is deleted in delete_pod" 2022-03-28 14:37:04 +00:00
Itzik Brown 5835cc46c9 Check that pod is deleted in delete_pod
Instead of sleeping after deletion - check that the pod is deleted for
a period of 30 seconds

Change-Id: Iaa88f8d851430b19e09b3fbe2b4bc070a93a3a93
2022-03-28 13:18:39 +03:00
Zuul 19da1d2fce Merge "Use one pod to check connectivity in kuryr_restart" 2022-03-23 12:21:01 +00:00
Itzik Brown f6f77354b1 Use one pod to check connectivity in kuryr_restart
In test_kuryr_restart use one pod to check connectivity to the
created pods from this pod instead of assigning a fip for each created
pod. This can solve problems when there is shortage of floating ips.

Also, Don't fail on deletion of a pod in cleanup if it's not found

Change-Id: I55a33f88356ff3d1ef6ed0ce83bb102172e46023
2022-03-21 15:55:30 +02:00
Jon Uriarte 113be9ebf5 Initialize kns_crd variable in create_namespace()
Set kns_crd dictionary initial value in order to avoid the
unhandled error `UnboundLocalError: local variable 'kns_crd'
referenced before assignment` when the timeout_period is
reached.

Change-Id: I20f9c2400dd0ecf0171f02d7cfd3fc10923f4d18
2022-03-18 11:43:40 +00:00
Michał Dulko 0e68dcf892 Revert "Temporarily disable stable jobs"
This reverts commit 06b6d31ee1.

The stable jobs seem to be fixed now.

Depends-on: https://review.opendev.org/c/openstack/kuryr-kubernetes/+/833994

Change-Id: I42c208812862c43d4b43b87c8331218b8ba890fd
2022-03-16 21:55:57 +00:00
Michał Dulko b667a5c6bc Bump pod exec timeout in Service connectivity tests
When testing UDP connectivity to a Service we're using ncat with `-w 5`
option. This sets the connectivity timeout to that value. However our
`exec_command_in_pod()` method is run in async mode and defaults timeout
to wait for completion to just 2 seconds. This is in conflict and if for
some reason UDP server on the pod is slow, will terminate the request
before it's completed, leaving empty stdout but also stderr, so that we
won't even log the error response.

This commit bumps that timeout to 10 seconds to give the pod time to
actually response. I decided to bump it for all the checks as we've seen
this happening with SCTP tests as well and I expect this might have the
same cause.

Change-Id: I303b87d01496cf7353b2b8b699e0dce598e032ab
2022-03-04 15:03:10 +01:00
Zuul 79917999e9 Merge "Limit number of K8s API requests" 2022-03-03 19:11:20 +00:00
Michał Dulko d7dd6b2eb6 Remove support for OCP Routes
That support is long gone from kuryr-kubernetes and this commit removes
the tests that are no longer needed.

Change-Id: I3593285d09ecde0c2bdc14805adc39630a592a49
2022-03-02 10:03:17 +01:00
Michał Dulko 86423cc26c Limit number of K8s API requests
As the K8s client is logging every response to every request, we're
starting to hit limits of tox' or Zuul's log side limit. This commit
attempts to limit number of requests by making sure that in case of
status checks we're iterating a list of pods instead of calling API for
every pod. Moreover many `time.sleep()` occurences are modified to
reduce the number of the requests made.

Change-Id: Ifc2dfce2405429bbcae8c01f13f06d4e9fae9c8a
2022-03-01 13:17:52 +01:00
Zuul 85807e55a9 Merge "Improve test_egress_np_to_service_wo_selectors" 2022-02-24 11:40:12 +00:00
Michał Dulko 5368b60c5f Improve test_egress_np_to_service_wo_selectors
Seems like the test in question was only waiting for the NP to get the
podSelector written into the status and not for the expected and
existing SG rules to match. This commit fixes that.

Change-Id: I04c3906225877caafe26487696991e9e3dbaf082
2022-02-23 14:25:34 +01:00
Michał Dulko 06b6d31ee1 Temporarily disable stable jobs
We have multiple CI stability issues going on at the moment.  In order
to be able to merge master fixes, we need to disable broken stable jobs.
Once kuryr-tempest-plugin is stabilized we should be able to merge fixes
to the stable jobs and then we'll be able to revert this patch and make
them voting again.

Change-Id: I5e8fccec80b1a5593e9e32f8dadf8bc220d0424a
2022-02-22 17:55:51 +01:00
Jon Uriarte 68b3f43b25 Amend NP CRD pod selector check loop
Add namespace parameter to get_np_crd_info() method call
and timeout condition to_egress_np_to_service_wo_selectors
test.

Change-Id: I10fe58d3e008817c882435f085a943e54eb9a2de
2022-01-24 16:57:29 +00: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
Zuul 8f9da81d3b Merge "Fix lb_reconcile_timeout exception formatting" 2022-01-24 11:06:33 +00:00
Zuul 4d7bf141fa Merge "Amend check_sg_rules_for_np() method" 2022-01-24 11:06:31 +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
Zuul 871fe9ece6 Merge "Fix test_port_pool when namespace is created" 2022-01-17 14:09:43 +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
Jon Uriarte d9a93bcba9 Amend check_sg_rules_for_np() method
Move ingress_cidrs_found and egress_cidrs_initialization to
inside the while loop so they're cleared in each iteration.
Move rule match comprobation outside the rules for loop.

Change-Id: I1acba9f407de084f19d9ee12fb6e95de03d578df
2022-01-14 18:13:01 +00:00
Zuul 5fd8c32c31 Merge "Add wait until active LB in NP test" 2022-01-14 02:26:36 +00:00
Zuul 3a8ccf5b4f Merge "Tune curl repetitions value" 2022-01-13 08:02:15 +00:00
Zuul cbc0e8f326 Merge "Ensure lb is active before checking connectivity" 2022-01-13 08:02:13 +00:00
Jon Uriarte 7a63c928e7 Add wait until active LB in NP test
The test test_egress_np_to_service_wo_selector is failing in some
environments when checking the connectivity to services (before
the NP is applied). The endpoints are defined in kuryrloadbalancers
objects but the connectivity is not working.

This change adds the method wait_until_service_LB_is_active() and
calls it in that test before checking the connectivity to the
services.

Change-Id: I41cec1ea1db43e2fbeb0bf6d5fafb84c87e77d1c
2022-01-11 12:36:58 +00:00