summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster
Commit message (Collapse)AuthorAgeFilesLines
* Fixing None issue when running multiple volumesVijay Avuthu2018-01-281-2/+3
| | | | | Change-Id: I7a8465a60c8e5d8f84a647ae65dbabcab2184516 Signed-off-by: Vijay Avuthu <vavuthu@redhat.com>
* Fixing Plumbum spawn issue with pgrepVijay Avuthu2018-01-281-1/+1
| | | | | Change-Id: If303d22f52d31e99676a6e97fbe0b9cb7d5a1234 Signed-off-by: Vijay Avuthu <vavuthu@redhat.com>
* Library for checking snapshot daemon is running or notRajesh Madaka2018-01-251-0/+33
| | | | | | | Added is_snapd_running function to uss_ops.py file Change-Id: Ib1ff0a16550c94604209588bd5221f9ee6e9db92 Signed-off-by: Rajesh Madaka <rmadaka@redhat.com>
* Adding AFR self heal daemon test casesVijay Avuthu2018-01-232-0/+204
| | | | | | | | | | | Gave meaningful names to functions Returning -1 if there is no process running Replace numbers with words Rewording the msg "More than 1 or 0 self heal daemon" Review Comments incorporated Change-Id: If424a6f78536279c178ee45d62099fd8f63421dd Signed-off-by: Vijay Avuthu <vavuthu@redhat.com>
* rebalance_ops: Adding a function wait_for_fix_layout_to_completesPrasad Desala2018-01-201-0/+40
| | | | | Change-Id: Id33b1de7c01cd7774d3c4cce3c40ddfe2dc0d884 Signed-off-by: Prasad Desala <tdesala@redhat.com>
* Check if servers/nodes which is expected to be passed as listShwethaHP2018-01-165-37/+70
| | | | | | | | is str. i.e passing a single node to the function. If it is str, then convert it to list Change-Id: I1abacf62fdbe1ec56fe85c86d8e2a323a2c3971b Signed-off-by: ShwethaHP <spandura@redhat.com>
* Override default volume_type configuration in gluster base class ifShwethaHP2018-01-161-1/+25
| | | | | | | | | volume type configuration is defined in the config file. Providing an option in config file to create volume with 'force' option. Change-Id: Ifeac20685f0949f7573257f30f05df6f79ce1dbd Signed-off-by: ShwethaHP <spandura@redhat.com>
* Adding functions for:ShwethaHP2018-01-113-1/+118
| | | | | | | | | 1. Waiting for all bricks to be online 2. Waiting for all self-heal-daemons to be online 3. Waiting for all volume processes to be online Change-Id: I01a8711838227eb167e69710ecbd3abd0fecb9e6 Signed-off-by: ShwethaHP <spandura@redhat.com>
* Modifying gluster_base_class to have static methods for :ShwethaHP2017-12-131-151/+317
| | | | | | | | | | | | | | | | | | | | | | | | 1. setup_volume 2. mount_volume 3. setup_volume_and_mount 4. cleanup_volume 5. unmount_volume 6. unmount_and_cleanup_volume These are added as static methods to give the test developer the flexibility to call the setup/cleanup's or any other function from any where in the testclass which inherits GlusterBaseClass Also, this will remove the need for GlusterVolumeBaseClass and hence removing the hardcoding of creattion of volume, mouting in setUpClass of GlusterVolumeBaseClass. This will also help in writing new baseclasses for example: Block which can have class funcitons specific to block and inherit all the functions from GlusterBaseClass Change-Id: I3f0709af75e5bb242d265d04ada3a747c155211d Signed-off-by: ShwethaHP <spandura@redhat.com>
* Fixing the glusto-tests Build Failures:ShwethaHP2017-11-231-12/+11
| | | | | | | | | | 21:00:43 ./glustolibs-gluster/glustolibs/gluster/lib_utils.py:67:5: E722 do not use bare except' 21:00:43 ./glustolibs-gluster/glustolibs/gluster/lib_utils.py:290:5: E722 do not use bare except' 21:00:43 ./glustolibs-io/shared_files/scripts/file_dir_ops.py:308:13: E722 do not use bare except' 21:00:43 ./glustolibs-io/shared_files/scripts/file_dir_ops.py:316:13: E722 do not use bare except' Change-Id: Ia0babf3d5a10b19c48425e4fcbcb8e79eea5e391 Signed-off-by: ShwethaHP <spandura@redhat.com>
* glustolibs: Handled the case to honour mounts option in config.yml if it is ↵Arthy Loganathan2017-09-111-8/+19
| | | | | | | specified Change-Id: Icb47d923860bbd2c1c70d2f7c23965a5368afa52 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Do not validate the return code of the 'rebalance status' command when just ↵stableShwethaHP2017-09-111-8/+3
| | | | | | | | | logging the output Change-Id: I6ff7e363871607c2f9d4272be7198150db59af5d Signed-off-by: ShwethaHP <spandura@redhat.com>
* Making mounting of volume optional in the BaseClass.ShwethaHP2017-08-312-18/+43
| | | | | | | | Mounting of a volume will not always be distributed volume. Providing a option to mount a local volume as well. Change-Id: Iadbb596fba7e2a5fa4ba3ba53967961a70d00c8c Signed-off-by: ShwethaHP <spandura@redhat.com>
* 1) bring_bricks_online: Wait for bricks to be online for 30 secondsShwethaHP2017-08-286-14/+23
| | | | | | | | | after bringing them online. 2) log all the xml output/error to DEBUG log level. Change-Id: If6bb758ac728f299292def9d72c0ef166a1569ae Signed-off-by: ShwethaHP <spandura@redhat.com>
* Fixing the BVT Issues:ShwethaHP2017-08-192-7/+10
| | | | | | | | | | | | | | | 1) self-heal failures: With the recent changes made to gluster for the bug: https://bugzilla.redhat.com/show_bug.cgi?id=1480423, the location of the brick process pid's changed to /var/run/gluster. Making the corresponding changes to glusto-tests libraries. Moving away from referring to pid file to grep for the process with the brick name. This fixes the issue. 2) Group options not being set properly: Since we were popping the 'group' option from the 'options' dictionary after the group options being set to set the other volume options, the option gets removed from the g.config['gluster']['smb_volume_options'] as well. Hence perform a deep copy of the dict before modifying the dict. Change-Id: I293bf81913857cb0327f30aa1db5aaa9be5a318e Signed-off-by: ShwethaHP <spandura@redhat.com>
* Typo: Space to be added between the commands execution.ShwethaHP2017-08-171-1/+1
| | | | | Change-Id: I5ea8b6c0b58fd19c31fc96cc567c53000cd3841b Signed-off-by: ShwethaHP <spandura@redhat.com>
* Providing configs to set volume options, group options when exporting volume ↵ShwethaHP2017-08-093-5/+62
| | | | | | | | | | | | | | | as 'smb share', 'nfs-ganesha export' in the config yml. Reading the configs in the gluster_base_class and setting those configs when exporting the volumes as 'smb share' or 'nfs-ganesha export'. recommended options when exporting volume as 'smb share': group: "metadata-cache" cache-samba-metadata: "on" Change-Id: I86a118c7015eaedd849a0f6e8b613605df5b6c32 Signed-off-by: ShwethaHP <spandura@redhat.com>
* add gluster object exists check to volume config defaultJonathan Holloway2017-08-082-5/+4
| | | | | | | | | gluster_base_class.py: fix error by adding check to ensure gluster entry exists when no gluster object defined in config file setup.py: version up to 0.21 Change-Id: I37001673c03a32571b78bbd32489fc1992333d73 Signed-off-by: Jonathan Holloway <jholloway@redhat.com>
* Set volume options on all the volume typesShwethaHP2017-08-031-1/+8
| | | | | | | | | | | | Providing a section in the config file to set volume options that can be applicable to any volume type created. The glusterbase class also reads the volume_options if provided in config file and set it on all the volumes being created. These volume options will be overwritten if there are any volume options specified while defining the volumes under 'volumes' section. Change-Id: I0003312251b4f8b151c9ba5c71d1b6a8884cc85e Signed-off-by: ShwethaHP <spandura@redhat.com>
* Inject gluster,samba,nfs logs with messageShwethaHP2017-07-262-7/+141
| | | | | Change-Id: If16daf6a0633c4ea30f7fb91b919d2ec42d0ff62 Signed-off-by: ShwethaHP <spandura@redhat.com>
* Added more verification checks in NfsGaneshaVolumeBaseclassArthy Loganathan2017-07-261-22/+31
| | | | | Change-Id: I78bf4eda8c350b22d3a5fabb32b5a20f48ab474e Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* running_on_volumes, running_on_mounts should be an optionShwethaHP2017-06-271-5/+10
| | | | | | | | | | under gluster in the config file. Currently the config file has the options under gluster tag. Hence making the appropriate changes in the runs_on to parse the options correctly. Change-Id: Iec95d1884b13c349a36c4324b571a1c0f23c930a Signed-off-by: ShwethaHP <spandura@redhat.com>
* Added gdeploy configuration files ad jinja templates for nfs ganesha operationsArthy Loganathan2017-06-208-1/+107
| | | | | Change-Id: I30f8b464d2193909a0d83daff7ea695b97fb3863 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Fix to match only the given volname in showmountArthy Loganathan2017-06-201-1/+1
| | | | | Change-Id: I41290d79f016e590a936d031665259f61aa1474a Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Added nfs ganesha tests to run IO test suites from multiple clients and ↵Arthy Loganathan2017-06-201-0/+52
| | | | | | | checks nfs ganesha behaviour Change-Id: I2dc7f0fb016982b7b7fa4a87c0310e4c96376f94 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Added library functions for nfs-ganesha featuresArthy Loganathan2017-06-202-0/+1406
| | | | | Change-Id: I2f35a218630e23c005bb995ac8513118553aeba0 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Minor changes in gluster base class wrt nfs-ganeshaArthy Loganathan2017-06-122-6/+13
| | | | | Change-Id: Iaceb22cd5b2fe920c9cdc6d110d26939e26e5ffe Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Resolving the Cyclic Imports. It cased during resolving theShwethaHP2017-06-061-1/+1
| | | | | | | merge confilts. Change-Id: Ie48d758c8883b8189ece735708fb5469ece5a0c2 Signed-off-by: ShwethaHP <spandura@redhat.com>
* Adding sanity heal tests when IO in progress.Shwetha Panduranga2017-06-012-1/+674
| | | | | | | | | 1) test heal with replace-brick when io in progress 2) test heal when bricks goes offline and comes back online when io in progress. Change-Id: Id9002c465aec8617217a12fa36846cdc1f61d7a4 Signed-off-by: Shwetha Panduranga <spandura@redhat.com> Signed-off-by: ShwethaHP <spandura@redhat.com>
* Adding a sanity case to test shrinking volume. i.e remove-brickShwetha Panduranga2017-05-312-20/+322
| | | | | | | | | Remove brick Sanity case covers testing of remove-brick of a subvolume, waiting for rebalance to complete, commiting the operation and validate IO is successful on the mount. Change-Id: I5912f62b3df5dfb5bf5339de036967f83b6a5117 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Adding a test for Gluster Basic Component Verification Sanity Suite.Shwetha Panduranga2017-03-033-81/+265
| | | | | | | - expanding the volume i.e test add-brick is successful on the volume. Change-Id: I8110eea97cf46e3ccc24156d6c67cae0cbf5a7c1 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Adding a new test to VVT:Shwetha Panduranga2017-02-274-480/+473
| | | | | | | | | | | | | | | | | | | | | 1) glusterbaseclass: - Making changes in glusterbaseclass to not necessarily have volume_type and mount_type. 2) volume_libs: - setup_volume don't have to export the volume. It just creates starts and setup's any operation on the volume. - Moved the sharing/exporting the volume to BaseClass 3) Renaming samba_ops to samba_libs to have better naming practice. 4) Adding nfs_ganesha_libs for any nfs related helper functions 5) Adding a new vvt case which creates, deteles, creates the volume. Change-Id: I238c349df7165d669d3bc7234d97845dba2f51a6 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Adding helper functions to volume libs:Shwetha Panduranga2017-02-061-10/+100
| | | | | | | | | | | 1) To check if volume is exported as nfs/cifs share 2) A function which logs volume info and volume status. This will be used in most of the tests for validation purposes 3) Check if all process of the volume is running or not. This will be used mostly in all the cases for validation purposes. Change-Id: I0cd797e5bfe269da8630b41193ea458be3a720f9 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Raise custom exceptions rather assert failuresNigel Babu2017-02-012-15/+44
| | | | | | | | | The setup should never raise an assert failure in a test. Only tests should fail an assert. If an essential test setup doesn't work, we should be raising custom exceptions instead. Change-Id: I6d5cce448132b71b6fde3a39fef894be8b1216d3 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* Clean up pyflakes and pep8 errorsNigel Babu2016-12-1217-88/+66
| | | | | Change-Id: Ibdd092118d3bb912716c46fd278ef3c680a6e742 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* Modifying the glusterbaseclass not to update the defaul values to global config.Shwetha Panduranga2016-12-052-53/+77
| | | | | | | | | For example: if 'volname' is not in mount, then do not update the default volname in g.config['mount']. Change-Id: Ib547b51372b16a08b07c11a5dcf70feca8674075 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Start gluster nfs-server only when the mount type is 'nfs'.Shwetha Panduranga2016-12-012-9/+10
| | | | | Change-Id: Ie7a25927d9bd55a7115adfae4fd550f96f435950 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Improving the GlusterVolumeBaseClass to check for nfs and smb exports.Shwetha Panduranga2016-11-301-27/+48
| | | | | | | | | | Removing starting glusterd, peer probe from VolumeBaseClass and assuming the config/setup phase to handle the glusterd, peer probe. Changing the BVT case to baseclass 'GlusterVolumeBaseClass'. Change-Id: I930d785dfe652b826e4a1853f30a954f98d15ede Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* set nfs.disable to off on the volume to start nfs server on that volume.Shwetha Panduranga2016-11-071-0/+7
| | | | | Change-Id: Ic63a69ec0d0cafcb71059b41625fe054167910d0 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Added lib_utils.pyArthy Loganathan2016-10-251-0/+662
| | | | | Change-Id: I4cd5061d9df470aed1a620eb3f67cab236645215 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Adding a bvt testcaseShwetha Panduranga2016-10-262-39/+94
| | | | | Change-Id: Ide7e3bac46fbaf354a2a5c8baef8510b4aefec78 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Added volume_list() and get_volume_list() in volume_ops.pyArthy Loganathan2016-10-251-0/+57
| | | | | Change-Id: I66339659158efd3af466ccd83aa243011eee61d8 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Changed GlusterDemoClass to GlusterVolumeBaseClassArthy Loganathan2016-10-251-1/+1
| | | | | Change-Id: I7cb15b6fb6f3d6a2a24c9c1a6677b9d5948142ea Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* Adding libs for brick ops, volume helpers, mount helpers, gluster baseShwetha Panduranga2016-10-1712-0/+4240
| | | | | | | class, heal related helpers, samba helpers, and windows ops helpers Change-Id: I0ad8fc7548c88e89d2ba6441166b9a38af76cea0 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
* Adding library functions for bitrot, quota, rebalance, tiering, snap and ↵Arthy Loganathan2016-10-056-0/+4060
| | | | | | | volume ops Change-Id: Iadb0772fc338f5dffd485b2526babaffb3494be6 Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
* glustolibs: add initial treeJonathan Holloway2016-09-293-0/+49
Change-Id: I08900d87fcd9a11b4f157d235facb766905d5ae2 Signed-off-by: Jonathan Holloway <jholloway@redhat.com>