summaryrefslogtreecommitdiffstats
path: root/openshift-storage-libs
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Add state arg in *_service_status_* libs in openshift-ops moduleNitin Goyal2019-07-021-5/+14
| | | | | | | | Before, these libraries could be used for 'active' state only. Make it accept one additional 'state' argument for possibility to use it for any state, not just one. Change-Id: I6d4fbd7584b308e3ad248213cb0ec3f4996f6437
* Add TC resize PVC with invalid sizeArun Kumar2019-07-011-1/+1
| | | | | | | | This test case checks if invalid size is passed, size of PVC does not change. Verify the size of PVC and I/O can be performed on the volume attached to PVC. Change-Id: Ia833c76a6d9990ebbac78759c54dc7d28f530ec6
* Fix 'get_active_and_enabled_devices_from_mpath' libraryNitin Goyal2019-06-211-1/+1
| | | | | | | Sometimes grep cmd shows '--' symbol. Which is breaking code. So changed the code to exclude '--' via grep cmd. Change-Id: I3ef903e19196b2d0d70e074a676881725240983b
* Use 'cmd_run' func instead of 'g.run' func in openshift_ops.pyValerii Ponomarov2019-05-293-150/+46
| | | | | | | | | | | | | It will allow us to recreate SSH connections when it is broken. Also, do following additional things: - Fix 'podcmd' module, where 'user' argument for 'g.run' is missing in it's wrapper. - Use "g.log.error" command to log errors when they appear inside of the 'cmd_run' func. - Delete several unused commands, instead of fixing them. - Update several test cases's logic due to the changes in the libraries. Change-Id: I908e5adcff739b6ab3a4aefaebfe46abdee22655
* Make g.run recreate SSH connection in case of it's breakageValerii Ponomarov2019-05-291-0/+25
| | | | | | | | | | It happens, that saved SSH connection gets corrupted and we get errors trying to run commands on remote machines. So, to avoid such problem, monkey-patch Glusto's special method for getting SSH connections with ourselves-crafted method which recreates SSH connection in case it is broken. Change-Id: Iee69d21f3e23541480653205d86fefef2d842d34
* Fix 'test_pv_resize_by_exact_free_space' tcValerii Ponomarov2019-05-292-2/+12
| | | | | | | | | | | | It was broken it 2 places: - It is first tc in the 'resize' test suite, which runs right after OCP API restart. And it happens to fail to talk to the OCP API. So, fix it by adding API service waiter in place where we restart it. - In this tc we delete huge volume which consumes almost whole disk space. And happens that this operation takes up to the 6 minutes. But we were waiting only for 5 minutes. So, just increase timeout. Change-Id: Ic6ada67b96ac8a37d13f57c0576e862226517b0d
* Make 'validate_multipath_pod' func raise exceptions in case of errorsValerii Ponomarov2019-05-281-39/+21
| | | | | | | | | Now, this function hides info about the real problem which caused error So, make it raise exceptions in place with info about error for ease of debugging. Also, fix it's usage providing mpath always. Change-Id: I8cbc62a12f3999e3d64fb6b504865f30b1602cf1
* Make 'command.cmd_run' func be resistable to broken SSH connectionsValerii Ponomarov2019-05-241-0/+4
| | | | | | | It happens that we get "No ssh connection" errors from time to time. So, avoid such errors recreating SSH connections if such error appears. Change-Id: Idc71c4ceece6b3040c396b25da1deadcefd29b60
* Add TC expansion of block hosting volume using heketiNitin Goyal2019-05-231-0/+34
| | | | | | | This TC verify the expanshion of BHV and after expanding volume verify that space is usable. Change-Id: I2621aedc1cbddcad374fe52013aba2d48acfd1e0
* Add TCs creation of block vol greater than default size of BHVNitin Goyal2019-05-031-0/+39
| | | | | | | The purpose of TCs is to validate that block device size cannot be more than the block hosting volume. Change-Id: I35aac44bdc2b3e72f1de9ab167e1468ece932f14