summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs
Commit message (Collapse)AuthorAgeFilesLines
* Add test case to automate heketi add node into valid clustervamahaja2019-11-141-0/+6
| | | | | Change-Id: I4a2ac7b819929c2de6c8ea5520257800d2e134cc Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add TC creating bunch of PVCs during network failureArun Kumar2019-11-081-6/+30
| | | | | | | | Create network side failure by opening and closing the ports related to gluster-blockd during creation of the PVC's, Verify PVC's are bound and validate multipath. Change-Id: Ibc53a13e2abb8674661da83d5881a13bbb2ad7fb
* Make 'provisioner' be autocalculated for storage classesValerii Ponomarov2019-10-312-8/+29
| | | | | | | | | | | | | | | In OCS 3.11.4 was changed the approach for 'provisioners' in storage classes due to the BugZilla bugs [1] and [2]. So, change the approach for getting 'provisioner' value in this project making it be autocalculated based on the data taken from the block provisioner pod, which is located in the working namespace. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1732787 [2] https://bugzilla.redhat.com/show_bug.cgi?id=1738394 Change-Id: Ic1037038e39abba2b2a1ad6dc3ddbfe42473cb88 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add possibility to check Heketi DB inconsistencies after each tcValerii Ponomarov2019-10-251-0/+33
| | | | | | | | | Define 'check_heketi_db_inconsistencies' config option setting there 'False' or 'True' values. Default value is 'True'. If heketi client doesn't support the 'heketi db check' feature, then 'heketi db check' just won't be performed. Change-Id: I7faff35b15e40d864c0377ae7fee154e217d8eae
* Add library to get heketi block volumes by name prefixvamahaja2019-10-171-0/+32
| | | | | | | | | | | | | | This change required due to - 1. Get block volume by prefix is common step which is used in two places for now and will be used in other places too. 2. Hence add library "heketi_blockvolume_list_by_name_prefix" in heketi_ops.py. 3. And use added library and update code from class "GlusterStabilityTestSetup" and "TestGlusterBlockStability". Change-Id: I9e60d58d5c84380104081335745270b3d21ff071 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add test cases to perform heketi cluster operations with nodesvamahaja2019-10-173-0/+164
| | | | | Change-Id: I22410ad8c81ca71ac9c2cbaddd66f086abcdf3c5 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add library to add/remove iptables rule on hostvamahaja2019-10-171-0/+50
| | | | | Change-Id: I1055b232711c95fdbf89ba9fe8b9d61a561fbcd5 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add new library heketi_node_removeNitin Goyal2019-10-101-0/+34
| | | | Change-Id: I96759bbcd74cad7755c99255b4b96261133d5adc
* Add support for new resource typekasturiNarra2019-10-101-4/+11
| | | | | | | | | As of now user can only pass dc name as argument to validate iscsi and multipath session, with this support user can also pass pod name by specifying rtype=pod Change-Id: Iecc86edc2a2239fc05535f0e4f7e9ae93d5e76f5
* Add TC Fail tcmu-runner service while creating and deleting pvcArun Kumar2019-09-251-0/+30
| | | | | | | | | | Create 8 Block PVC and wait for them to get bound. Delete created PVC's and create 8 more PVC's simultaneously. Kill the tcmu-runner service while PVC creation and deletion is in the progress. Restart all the services related to block volumes and verify all pending operations are completed sucessfully. Change-Id: I0cb4cd29b92233a65be93f4b96f1a9a0cb8bed9f
* [Lib+tc]Add testcase and library to validate total count of volumesSri Vignesh2019-09-251-0/+33
| | | | | | | | Add library to check db results Validate count of volumes of heketi and db are same Change-Id: I6e75f2d8d5f19a94c1dced5a07f9c948b4de9ef4 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
* Fix typos in verify_volume_name_prefix function's descriptionadityaramteke2019-09-231-1/+1
| | | | Change-Id: I46ad6aefd3c699b4ce7807db89c2016791a48e05
* Add multiple PVCs states waiterValerii Ponomarov2019-09-232-49/+64
| | | | | | | | Add new function called 'wait_for_pvcs_be_bound', which allows us to wait for 'Bound' state of multiple PVCs using single timeout. Also, reuse this new function in the baseclass.py Change-Id: Ia3809d322925b90fdef984db59b3e9e83a82abc7
* Fix heketi_blockvolume_create lib descriptionNitin Goyal2019-09-191-1/+1
| | | | | | Change the 'cluster' to 'clusters' in kwargs description. Change-Id: Iac9170d0549adc6bb5b76f5772de47d1db083951
* Remove json description from heketi_device_add libNitin Goyal2019-09-191-1/+0
| | | | | | | Remove json description from heketi_device_add library as it is not supported. Change-Id: If3121294dc9456587af36d65726842f399730a9b
* [Revert] "Fix heketi_device_add library"Nitin Goyal2019-09-191-2/+0
| | | | | | This reverts commit 046244942f7ad3f5f24b675dfa299ad955f1412f. Change-Id: I1f49d613af3dd236bf4113db757cbf9ce752e973
* Add waiter for multiple resources absenceValerii Ponomarov2019-09-192-38/+65
| | | | | | | | | | Add new function called 'wait_for_resources_absence', which allows us to wait for absense of multiple resources using single timeout. Also, reuse this new function in the baseclass.py for PVC/PV removal waitings. Change-Id: I6e3daae012199e50d3aeb68b697cfae801b0b49b
* Merge heketi node operation tests in one class and fix libraryvamahaja2019-09-191-17/+20
| | | | | | | | | | | | | | | | Fix consists of - - Use "**kwargs" approach in the "heketi_node_list" function as it is done in lots of other functions. - Parse the CLI output in the "heketi_node_list" function using regex instead of the splitting and stripping strings. - Combine test cases related to the same feature into one module - test_heketi_node_operations.py - Remove redundant checks which already exist in common libraries. - Remove unnecessary logging. Change-Id: I815ddfbbacb765140229e7630ec87a6bbaa6255b Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add testcase for passing clusterid when creating storage classAshmitha2019-09-182-3/+5
| | | | Change-Id: I4a6fd02f5713b4e86a9d70cdaffd3ca9369932f4
* Add TC create and delete PVC's when block services are downNitin Goyal2019-09-161-1/+6
| | | | | | | Add new TC verify PVC's create and delete fails while gluster-blockd and tcmu-runner services are down on one node. Change-Id: I5acbcfd6c9a227c0cce21c62f5e162caf970aa22
* Fix multiple usages of waitersValerii Ponomarov2019-09-163-10/+17
| | | | | | | | | | | | | | | | Fix consists of 2 parts: - Calculate correctly left time for waiting in 'scale_dcs_pod_amount_and_wait' function. Before, it had bug, where we were waiting less time than requested. And it led to the unexpected timeout errors. Example: it could fail waiting only 180sec having 600sec as real timeout. - Reset 'attempts' on the instantiated 'waiter's to avoid redundant waiting reusing the single waiter instance. Example. On deletion of 20 PVCs we save about 1,5 minutes. In whole test suite we create much more PVCs than 20. Change-Id: I5d06a63dd0c2c5bd67fdb09fef87948d65e6bf22
* Fix heketi_device_add libraryNitin Goyal2019-09-161-0/+2
| | | | | | As part of the fix loaded the output into json which was missed. Change-Id: Ia3d07f768362232ec2b34641be1a6ae4c4eec399
* Add test cases for the heketi zones featureValerii Ponomarov2019-09-131-1/+9
| | | | | | | | | | Add 10 test cases for testing Heketi zones feature. To make all the Heketi zones test cases run in the single suite using the same cluster set 'common.allow_heketi_zones_update' config option to "True" value. By default it is set to "False" and only small set of test cases can run having such value. Change-Id: I69a1f7c96c9f52a06134e715e113ccd9b06764e6
* Fix test cases which are failing to delete volume after test completionvamahaja2019-09-131-0/+42
| | | | | | | | | | | In test case when we use large disk size, heketi takes time to create volume and due to timeout it gives error. Add fix in such test cases to check if volume created after getting an exception, get details of such volumes or raise exception in case it fails to create volume. Change-Id: I1c23a8c6558c23edf8947771e4f41a4bd3ffd66a Signed-off-by: vamahaja <vamahaja@redhat.com>
* Fix self.node issue in GlusterBlockBaseClass classvamahaja2019-09-131-7/+8
| | | | | | | | | Gluster block test cases failed with error "self.node" variable not found as self.node variable is not created in "GlusterStabilityTestSetup" class. Fixed change in baseclass.py by using variable "self.ocp_client[0]". Change-Id: I2affabbb626b7e266a9bb243d3ec249229ec9670 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Fix get gluster pod library for independent clustervamahaja2019-09-131-0/+3
| | | | | | | | | | | | "get_ocp_gluster_pod_details" library gives error "IndexError: list index out of range" in case of independent mode setup as "get_custom_resource" returns "[[]]" which in not none. Added fix to check if any element present in list. Change-Id: Iffd081f835ffaf9cb50c020cd297444ea2678950 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add test case to try creation of storage class with duplicate nameAshmitha2019-09-122-2/+5
| | | | Change-Id: If30737958bc667264fc01fe81d411f406b501918
* Add test cases to perform heketi cluster operationsvamahaja2019-09-111-0/+44
| | | | | Change-Id: I5886680a0d5666c68c677893e0fb327be0e80760 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Move func get_block_hosting_volume_by_pvc_name to baseclasskasturiNarra2019-09-091-0/+23
| | | | | | | | Move get_block_hosting_volume_by_pvc_name from test_restart_gluster_services to baseclass to be able to reuse it in other test modules. Change-Id: I65847792601b422293d4baed2ccade664ad7e54b
* Add TC abrupt reboot of initiator nodeNitin Goyal2019-09-061-0/+26
| | | | | | | Add new TC where we verify rediscovery of iscsi paths which happen after abrupt reboot of initiator node. Change-Id: I841e875881c47f8215d48821cd76c0399d43badc
* Add Error msg in GlusterBlockBaseClassNitin Goyal2019-09-061-9/+21
| | | | | | | Added Error msg in GlusterBlockBaseClass for better visibility in case of failures or debugging purpose. Change-Id: Ia92cd6f6129cb5aa55f6f8e807ef056e54691956
* Correct description of libraries in gluster_ops moduleNitin Goyal2019-09-061-2/+2
| | | | | | Changed the description of libraries in gluster_ops where it was wrong. Change-Id: I8ea9ec4ff1f28250d4544d6329b386271cf1e551
* [Library]: Modification in block volume create with nameSri Vignesh2019-09-051-3/+3
| | | | | | | | modification in block volume name parameter passed twice while creating Change-Id: Ieb827a8e7fa40a84eed7f8c5e90760710e6615b2 Signed-off-by: Sri Vignesh <sselvan@redhat.com>
* Add functionality to create more than 1 DC in parallelValerii Ponomarov2019-09-042-23/+97
| | | | | | | | We have test cases which create more than 1 app DC at once. So, add functionality to be able to create bunch of DCs in parallel and reuse it in one of test cases. Change-Id: Id606d02c31a919bbc6d49d59714dd5628c6a835d
* Fix pep8 errors in the files of the 'openshift-storage-libs' dirValerii Ponomarov2019-09-036-43/+43
| | | | Change-Id: Iaa7deca275958d4de68601dc16d1920f3dab85f2
* Fix "openshift_storage_version" to get valid version for OCS 3.10 & 3.9vamahaja2019-08-281-4/+14
| | | | | Change-Id: Ia0325c4309837fe3f89eab3c066775f9fb1ab1de Signed-off-by: vamahaja <vamahaja@redhat.com>
* Fix error handling logic in the "vmware" cloud providerNitin Goyal2019-08-271-4/+4
| | | | | | | | Fix error handling logic in the "vmware" cloud provider module by adding "raise" statement in places where it is lost. Change-Id: I92e97da4109bc6ab7368b41d2a6886e9f2be31c1
* Remove extra '-' from create_secretNitin Goyal2019-08-202-2/+2
| | | | Change-Id: I2ebc1c2e7e7aefb5e0d70342a7ec243a12b0663b
* Fix test cases skipped due to closed bugsvamahaja2019-08-192-1/+98
| | | | | | | | Add fix to test cases which are skipped due to bugs - BZ-1644685, BZ-1652913, BZ-1634745, BZ-1635736, BZ-1636477, BZ-1641668 Change-Id: I03a7f7dddaba5d3e41770969352b2263c84cb920 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add OCS version check for test casesvamahaja2019-08-141-0/+179
| | | | Change-Id: I4196cb1395a3720e03f62473d11e5f46d797c355
* Add TC restart app pod when target node is downNitin Goyal2019-08-134-0/+375
| | | | | | | | | | | New TC insures that app pod is restarted properly when one of the target node is down. This patch includes libs of vmware api These libraries can perform VM operations like power on and off via vmware client api's. Change-Id: I11ad4dc3318cb0583de5882d8067ed7e30ea9962
* Reuse more common functions in the GlusterStabilityTestSetupvamahaja2019-08-131-1/+4
| | | | | Change-Id: Ia4e0fb737b16ea7bdc8ffd5ae44cdd418471552a Signed-off-by: vamahaja <vamahaja@redhat.com>
* Move "node reboot" logic from test case to librarySri Vignesh2019-08-121-0/+47
| | | | | | | | | Separate node reboot functionality from single test case to re-use it at other places. Update test case accordingly. Change-Id: Ib9a7f15d29237e4f21aafc408c074e799e706740 Signed-off-by: Sri Vignesh <sselvan@redhat.com> Signed-off-by: vamahaja <vamahaja@redhat.com>
* Workaround BZ-1727360 in the "get_gluster_pod_names_by_pvc_name" funcvamahaja2019-08-072-63/+71
| | | | | | | | | | "get_gluster_pod_names_by_pvc_name" function depends on the ocp3.11 specific shell command, which fails on old OCP versions. So, fix it by getting info in compatible way. Also, update usages of this function with new return data structure. Change-Id: Ibb8559590a1288c032630b3292f631d28bc87263 Signed-off-by: vamahaja <vamahaja@redhat.com>
* Add test case where BHV and BV are created and deletedkasturiNarra2019-07-191-0/+30
| | | | | Change-Id: I7ead23c46a472fee70d684c45f32f5e4efb0674f Signed-off-by: kasturiNarra <knarra@redhat.com>
* Add TC run IOs when tcmu-runner service is downNitin Goyal2019-07-191-5/+10
| | | | | | | | This test case verifies that when tcmu-runner is down we are able to run IOs on block volumes, and stoping tcmu-runner would effect gluster-blockd and gluster-block-target services. Change-Id: I0b4a23f7c2dce909f07a22893f83a6c1d0285091
* Fix logic for recreation of SSH connectionsValerii Ponomarov2019-07-161-9/+51
| | | | | | | | | | Before, in case we had some constant networking issue trying to connect to a host, we were falling into the endless loop of connection recreation. The error we got after it is the 'recursion limit exceeded'. It is unexpected. So, change this logic making it avoid recursion and do just one connection recreation attempt which is useful to fix broken connections. Change-Id: Id808edbad7e6d69ad58a75bfbae176fddb173d18
* Make Heketi commands run on a Heketi POD when main command failsValerii Ponomarov2019-07-111-295/+126
| | | | | | | | It happens that heketi client located out of the Heketi POD may fail not reaching the server side. So, add back-up approach where we run Heketi commands on a Heketi POD when main commands fail. Change-Id: Ie6ae5be82082f34426f9288b02575e3abd4940f5
* Add TC run IOs when gluster-blockd service is downnigoyal2019-07-091-0/+15
| | | | | | | New TC verifies that it is possible to run IOs on block volumes when gluster-blockd service is down. Change-Id: Ia1de14d2990f833221f6725e9b0e48d77ef85c10
* Separate out gluster-block stability TCNitin Goyal2019-07-051-0/+52
| | | | | | | move gluster-block stability TC to new module named 'gluster_stability/test_gluster_block_stability.py'. Change-Id: Iac1f432e438a2815bdc2115ab19e0170e46930c1