Commit Graph

32 Commits

Author SHA1 Message Date
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
Roman Dobosz 331547d50a Adapt to new OS resource names.
Change-Id: Id04ef0217a14fb8c3430c10d581b520e0afdb566
2022-04-12 15:01:31 +02: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 14a0c07bd9 Merge "Fix Namespace handling" 2021-11-05 08:41:32 +00:00
Itzik Brown 15eeb47ca8 Increase timeout waiting for namespace deletion
Increase the timeout in test_recreate_pod_in_namespace until BZ#1997120
is fixed
Change-Id: Ib0a63190d0d07dbe1bf9ab69752703b013d5309e
2021-11-04 04:08:27 +00:00
Maysa Macedo 774fc6bae0 Fix Namespace handling
With the handling of Namespaces now being
dependent on Pods creation, tempests tests
need to get updated to account for that.

Change-Id: Id0879f128ca8c057ea6ec540fec0e76d656e7b13
2021-10-14 13:25:50 +00:00
Itzik Brown 92e18b336f Check connectivty from within the cluster
Check connectivity to the service from a pods within the namespace in
test_namespace instead from outisde

Change-Id: I5af7fc1be342d7fafa217347b1d84c3679c118c1
2020-04-27 09:58:17 +03:00
Luis Tomas Bolivar fe61431318 Adapt namespace test to the kuryrnetwork CRD object
Change-Id: If0aaf748d13027b3d660aa0f74c4f6653e911250
2020-03-16 11:29:24 +01:00
Zuul 2ddd1dd65d Merge "Reduce flakiness of pod creation timeout" 2019-12-04 12:22:46 +00:00
Zuul e4e7ae04a9 Merge "Add a check for ClusterIP IP of LB service" 2019-12-02 16:27:15 +00:00
Maysa Macedo f34269cd22 Reduce flakiness of pod creation timeout
As this test recreates the namespace and a pod on it,
it could take a bit longer for the older KuryrNet CRD
to be removed and recreated, plus the pool to be populated
causing the pod creation to timeout. This commit reduce the
flakiness by increasing the timeout.

Change-Id: I31a874c5f1d0d134e555a32b09a71e9466daea77
2019-11-28 14:50:48 +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
Michał Dulko 8d66ca382a Mark test_namespace_sg_isolation as unstable
We have issues with this test, most likely due to Neutron bug [1]. This
commit marks it as unstable, so it gets skipped on failure.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1688323

Change-Id: I8a1bfab6e4b6c0e08d8cd2b7e8c6a5efdd87bbd3
2019-11-25 10:23:16 +01:00
Maysa Macedo feaef8ed86 Ensure correct failure message is checked on CRD validation
The error message retuned when a CRD is not validated has changed
on Kubernetes 1.16. We should also update the NP and Namespaces
tempests tests to match it, as the gate is using Kubernetes 1.16.

Change-Id: I4ed2bdbbc664579689763f2759741b0efced6db6
2019-11-19 18:27:02 +00:00
Itzik Brown ffae68805f Skip Namespace isolation when NP is enabled
Change-Id: I113bc0e365eb40d7ae5f306516bfc1dc0a718c8a
Depends-On: I5b6b9a908a48eef9aa7cb08ca3a95269b1300578
2019-11-07 11:35:24 +00:00
Zuul 55c980d4e4 Merge "Test recreate namespace and pod" 2019-09-09 13:45:39 +00:00
Maysa Macedo 3d82e55050 Test recreate namespace and pod
This commit adds test to the recreation of a namespace
and a pod without waiting for Kuryr generated resources,
which is the actual behavior expected by the user.

Change-Id: I082355b0414ee5308418c683fb133d67ea414d3f
2019-09-05 08:15:51 +00:00
Zuul 2bd54511a0 Merge "Ensure CRD validation is only checked if enabled" 2019-07-10 18:37:27 +00:00
Luis Tomas Bolivar ad648cd406 Enhance svc namespace isolation for LoadBalancer type svc
This patch extends the current service isolation test with a service
of LoadBalancer type, checking that it has connectivity across
namespaces depite of the namespace isolation.

Depends-On: I35f3be8fc16d71d0d2ac01c5451d398dd631f118

Change-Id: I40bf39c4c1d0b43f5d83e6aed81786390753ce99
2019-07-09 12:03:40 +00: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
Maysa Macedo b940406278 Ensure CRD validation is only checked if enabled
CRD validation support was not added in previous releases.
We should ensure all tests related to it are only triggered
when crd validation is enabled in the tempest config.


Change-Id: I92f22827d4456e9a13b9a5b45d96babf4bf93451
2019-07-07 21:46:53 +00:00
Maysa Macedo 579812a571 Ensure Kuryr CRDs are validated
This commit verifies if KuryrNetPolicy and KuryrNet CRD
are created with all the needed and correct fields.

Depends-On: https://review.opendev.org/#/c/665416/

Change-Id: Iab33a1d2cdef76981826c181cc44b074c921d2db
2019-06-25 09:16:42 +00:00
Genadi Chereshnya 2a19675588 Checking connectivity from host to pod/service in the namespace
Create a pod and service on non-default namespace
Check connectivity to the pod and service

Change-Id: I0aa3b11501805c12ccde71e5f237ee3639fa8a57
2019-01-02 11:41:38 +02:00
Daniel Mellado 6ffd99ba93 Remove direct calls to os_client for SGs
This commit removes the direct call to self.os_admin.security_groups_client
and uses the methods on the base test class.

Change-Id: I666a3046047d385818c57ea6aaa8182c1c669b1e
2018-09-11 05:44:45 -04:00
Luis Tomas Bolivar aa89116970 Fix test namespace request to include schema
test_namespace got broken after merging:
https://review.openstack.org/#/c/590740/

This patch ensure the schema is provided

Change-Id: Ie0390e1839a55b01ca231247d1f59cb1e39f30e0
2018-08-20 14:46:57 +02:00
Antoni Segura Puimedon d9f7f96c9a Namespace tests: use requests instead of subprocess
Use requests instead subprocess in namespace tests

Change-Id: Iba2d3f5bbad56e5306260d2eb673e6974703e3ee
Signed-off-by: Antoni Segura Puimedon <celebdor@gmail.com>
2018-08-16 15:27:37 +03:00
Itzik Brown 340315e29a Use expected pod output as a constant
Also add idempotent_ids to test_namespace tests

Change-Id: I8a8c339e1ad0753b95bc36190b6b1628d4fc5354
2018-08-08 13:17:47 +00:00
Luis Tomas Bolivar 8db1cbc44c Namespace svc isolation tempest coverage
It extends the namespace tests to also ensure proper services isolation
between namespaces.

It creates pods and services in different namespaces and checks that
traffic is blocked between them, unless it is the default namespace,
which can reach all the services regardless of the namespaces.

Depends-On: I7b78e12cdf2bce5d0780e582814ef51ef0c459a7
Change-Id: I460eb37415fa6d864c68e29ee79abdc8d1760c61
Implements: blueprint openshift-project-isolation-support
2018-08-07 13:18:43 +00:00
Luis Tomas Bolivar 477994616f Fix delete namespace resources function
Change-Id: I37025bf65b67fe04f2a6d9b14bbe1b7bc387e370
2018-08-03 09:45:02 +02:00
Luis Tomas Bolivar 08ba88d048 Namespace isolation tempest coverage
It creates a new test to ensure proper isolation between namespaces.
It creates different pods in different namespaces and check that
traffic is block between them, unless it is the default namespace,
which can reach all the namespaces and be reached by all of them.

Depends-On: Ibf63841b2a6b0c339c4c76980f1489e26af016d7
Implements: blueprint openshift-project-isolation-support

Change-Id: Ie72c93564f38bc51a3abd009085beda92430daea
2018-08-02 12:23:48 +02:00
Luis Tomas Bolivar 2640527765 Namespace network resources cleanup
It adds checks for connectivity and namespace deletion, including
checking for resource leftovers.

Change-Id: Id08dfeb0d7423857cd471100410dabd71646b402
2018-06-22 12:15:48 +00:00
Luis Tomas Bolivar 41990e9ce7 Add tempest coverage for namespace creation
It adds coverage to test namespace creation when the namespace
handler and subnet driver are used. It checks the namespace gets
created but also that the related resources get created too, in this
case the Neutron Subnet, as well as the Kuryr Net CRD. In addition,
it check the KuryrNet CRD has the right information about the network
and subnet IDs created.

Depends-On: I84580201f38c219f1943510bb493da0f07e07153

Change-Id: Iafc08ede300aecf1dc52135c6e51b89875e729d6
2018-05-22 12:52:23 +02:00