summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert geo_rep_ops to python3Vitalii Koriakov2018-11-081-3/+3
| | | | | Change-Id: I2f491f7cadd92846730c6528920c9fa8c2c9edce Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* Using a raw strings for fixing flake warningsVitalii Koriakov2018-10-298-20/+17
| | | | | Change-Id: Ie134790ea05919a4b396657c11cbc3fc7a7fc529 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* glustolibs: Add GlusterBlockBaseClassbhumikagoyal2018-10-251-2/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the base class for gluster-block which includes functions that helps in automating the test cases on client and target side. These functions will help in block creation, block discovery, login on the client, getting mpath, mounting the block, logout. The teardown function will take care of unmounting blocks, logging out and block deletion and volume cleanup. The .yml file for block should be like: Example gluster_block_args_info: volname: testvol #Should be same as volume name in glusterfs config fle servers: #Server names should be same as names in glusterfs config file - 192.168.100.163 - 192.168.100.192 size: 2GiB ha: 3 auth: enable prealloc: num_of_blocks: 2 #Number of blocks to be created with this configuration ring-buffer: 16 blockname: block_testing #Base name of the blocks to be created. Change-Id: I8cd354fc991cd21c542cfd7f03399cc23c9f7917 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* Revert "Raise Exceptions in setup_volume and mount_volume"Jonathan Holloway2018-09-141-77/+96
| | | | | | This reverts commit 2d425798657a725e02d63ff631c5b87187ea4ca4. Change-Id: I388fe7ff11e28e027fe9006512e35ec57ff10d9c
* Raise Exceptions in setup_volume and mount_volumeNigel Babu2018-09-121-96/+77
| | | | Change-Id: I1310b9da1262b06e77a621831d599cd4077c31ed
* is_brick_mux_enabled misspelling fixesVitalii Koriakov2018-09-051-2/+1
| | | | | Change-Id: I61da7bbe3f5b64f7c93b291a5ada52cde37997d9 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* Added methods and fixed importVitalii Koriakov2018-09-051-29/+50
| | | | | Change-Id: Id8f86e027e1109b0351dd45e073b68bf31fe1de6 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* Changed disabled to disableVitalii Koriakov2018-08-301-1/+1
| | | | | Change-Id: I616ffab2a797330778781a8245de87a0f5775df3 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* Adding is_brick_mux_disabled methodVitalii Koriakov2018-08-301-1/+18
| | | | | Change-Id: I2b5e8cb9d02967736f18ed80c1aaff48ac684716 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
* glustolibs: add functions for gluster-block operationsbhumikagoyal2018-08-292-0/+480
| | | | | | | | | | | | | | | | | | | block_libs.py: Module for some gluster-block related helper functions like block info validation, checking if block exists etc. This module will call the functions in block_ops and the result will be used for further operations. These functions are either called from GlusterBlockBaseClass or can be called directly from testcases. block_ops.py: Module for gluster-block helper functions like block_create, block_delete, block_modify, block_info, block_list. The functions here will either be called from GlusterBlockBaseClass or block_libs.py or can be called directly from the testcases. Change-Id: I5d82ac32bbf27a2a6597ad275ff09b3601615f2b Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
* Fix spelling mistake across the codebaseNigel Babu2018-08-0710-32/+32
| | | | Change-Id: I46fc2feffe6443af6913785d67bf310838532421
* Adding a function which gets all files and directories on a bricksPrasad Desala2018-07-271-0/+53
| | | | | Change-Id: I0a439b8defeb6b8e72694f1d97e1309a7ba988fa Signed-off-by: Prasad Desala <tdesala@redhat.com>
* Tests: ensure volume deletion works when intended.Yaniv Kaul2018-07-171-13/+46
| | | | | | | | | | | It could have failed without anyone noticing. Added 'xfail' - do we expect to fail in deletion (and changed tests accordingly) On the way, ensure stdout and stderr are logged in case of such failures. Change-Id: Ibdf7a43cadb0393707a6c68c19a664453a971eb1 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* Library: modification in quota_fetch_listsrivickynesh2018-07-031-0/+2
| | | | | Change-Id: I524db04636de4afb9cd6ab79c8b60a8607f8b553 Signed-off-by: srivickynesh <sselvan@redhat.com>
* Adding test case for change owner, group, permission for directoryMohit Agrawal2018-06-291-0/+35
| | | | | | | | | | | | | | | | | 1) Create Dir with some file inside dir 2) Verify dir exists on all bricks as well as mount point 3) Compare dir stat with mount-point and brick location path 4) Change the ownership of directory 5) Compare dir stats with mount-point and brick path 6) Try to change pemission with different user for directory 7) Compare dir stat with mount-point and brick path 8) Try to change permission with different user for directory 9) change permission of directory 10) Compare dir stat with mount-point and brick path 11) Try to change permission with different user for same directory Change-Id: I284842be8c7562d4618d4e69e202c4d80945f1c5 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Adding dht function is_layout_completePrasad Desala2018-06-281-0/+70
| | | | | | | | | | | | | | | | | | | | | | | def is_layout_complete(mnode, volname): """This function reads the subvols in the given volume and checks whether layout is complete or not. Layout starts at zero, ends at 32-bits high, and has no holes or overlaps Args: volname (str): volume name mnode (str): Node on which cmd has to be executed. Returns (bool): True if layout is complete False if layout has any holes or overlaps Example: is_layout_complete("abc.xyz.com", "testvol") """ Change-Id: I46b20bf71c0dd3ac7d2dd393fa209744c4eebb3c Signed-off-by: Prasad Desala <tdesala@redhat.com>
* glusto/dht-lib: Adding new function find_new_hashedSusant Palai2018-06-281-1/+165
| | | | | | | | | | | Added functions to search for a hashed/nonhashed subvol for a file/dir. Adding function find_new_hashed. This is written for rename case so that the new name will hash to a different subvol than that of the the old name. Change-Id: I8dc0b40ab517071096b704966e680c61d8bcc516 Signed-off-by: Susant Palai <spalai@redhat.com>
* Quota : Validate limit on deep directoriesharigowtham2018-06-261-1/+1
| | | | | | | | | | | | | | | The below operations are performed on various types of volumes and mount. * Enable Quota * Create 10 directories one inside the other and set limit of 1GB on each directory * Perform a quota list operation * Create some random amount of data inside each directory * Perform a quota list operation * Remove the quota limit and delete the data Change-Id: I2a706eba5c23909e2e6996f485b3f4ead9d5dbca Signed-off-by: harigowtham <hgowtham@redhat.com>
* geo-rep/lib: API to create root sessionrallan2018-06-221-0/+93
| | | | | | | | | Added: 1. georep_root_prerequisites 2. georep_create_root_session Change-Id: Iac026322bc387c6b54bcd81a734785eb9d5cae9d Signed-off-by: rallan <rallan@redhat.com>
* geo-rep/lib: API to create nonroot sessionKotresh HR2018-06-221-5/+71
| | | | | | | | | | | Also updated following. 1. API name of 'setup_mountbroker_prerequisites' to 'georep_nonroot_prerequisites' 2. Added setting up of passwordless SSH to slave node in prerequisites Change-Id: I15e567100750d88d7e9e698308c852ad6afbf082 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* geo-rep/ops: Setup passwordless SSHKotresh HR2018-06-221-0/+41
| | | | | | | | 1. API to generate ssh keygen 2. API to copy ssh key on to remote node Change-Id: I0b89ce9d77d4a16eaa3ad10f646d412f1190f56e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* geo-rep/ops: Remove backslashesKotresh HR2018-06-211-16/+16
| | | | | | | Also fix the typo in georep_create Change-Id: I58ca115da827b458d07ce38806a40b1d5bfae643 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* geo-rep/lib: Mountbroker setup pre-requisite APIKotresh HR2018-06-211-0/+98
| | | | | Change-Id: Icd529b26c66f7fc8e39f620276d9fb7053cd7547 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* geo-rep: Set passwd for the given userKotresh HR2018-06-211-0/+31
| | | | | | | | The API to set passwd for the given user and group in all the slave nodes. Change-Id: I69dc150c598c9101be825f159f037f4ad43706ed Signed-off-by: Kotresh HR <khiremat@redhat.com>
* Geo-rep: Non-root session related opsKotresh HR2018-06-211-0/+97
| | | | | | | | | | Setting up mountbroker along with adding user and checking status. Setting pem keys specific to non-root Change-Id: Ic8e38087d118f43aea0da270ea8f8f9da81286c1 Signed-off-by: rallan <rallan@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com>
* Geo-rep: Creating group and userKotresh HR2018-06-211-0/+58
| | | | | | | | | | Contains ops for restarting glusterd (used for slave nodes in non-root), adding a group as well as a user to set up a non-root geo-rep session Change-Id: Iec0990e86fbb5a92a70f26820d43529c21e1742f Signed-off-by: Kotresh HR <khiremat@redhat.com> Signed-off-by: rallan <rallan@redhat.com>
* Geo-rep: Config get and set optionsKotresh HR2018-06-211-7/+64
| | | | | | Change-Id: I6cb2a321cd774e5c1008d27c42d9df9219e74ff0 Signed-off-by: rallan <rallan@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com>
* Geo-rep: Delete and status opsKotresh HR2018-06-211-0/+62
| | | | | | | | | Deletion of a geo-rep session and getting the status of the geo-rep session Change-Id: I94f3c1877c4530246e1cc7077085c92ee7c72101 Signed-off-by: rallan <rallan@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com>
* Geo-rep: Starting and stopping a geo-rep sessionKotresh HR2018-06-211-0/+92
| | | | | | Change-Id: I47236b1b1bbd40b52bc85ad59ed7b78faa432410 Signed-off-by: rallan <rallan@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com>
* snapshot:: Modification in library for snap schedulerSunny Kumar2018-06-181-38/+50
| | | | | | | | | | | | Following modifications has been made - 1. Added function for snap scheduler initialization. 2. Snap scheduler initialization should not be combined with snap schedule enable. 3. Snap scheduler enable/disable should be issued for a node instead for every node in cluster. Change-Id: I23650f48b152debdfb4d7bc8af6f65ecb2bcddfb Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* Function for reset brick added in the brick_opsubansal2018-06-151-1/+52
| | | | | Change-Id: I01ad84cc2e35873b985d5d86d3cbacd226b42ae1 Signed-off-by: ubansal <ubansal@redhat.com>
* Pausing and resuming a geo-rep sessionrallan2018-06-151-0/+63
| | | | | Change-Id: I4d2767acb4fff7ab972e11d13ef4c547914110d9 Signed-off-by: rallan <rallan@redhat.com>
* Quota : Library to get the quotad pidVinayak Papnoi2018-06-141-0/+67
| | | | | | | | Adding quota_libs.py with the quota_fetch_daemon_pid library. This library gets the PID of quota daemon from all the nodes. Change-Id: Icc5ecba5649a2f7fd48d5cedda6c1dd3ad8b50c0 Signed-off-by: Vinayak Papnoi <vpapnoi@redhat.com>
* tests: Test case to verify brick consumable sizeSunil Kumar Acharya2018-06-141-0/+19
| | | | | | | | | | When bricks of various sizes are used to create a disperse volume, volume size should be of the size (number of data bricks * least of brick size) RHG3-11124 Change-Id: Ic791212bf028328996b896ae4896cf860c153264 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* Initial steps for geo-rep setuprallan2018-06-131-0/+110
| | | | | Change-Id: I1b06d935ae056dd0fe583f3c1a9f181ec2a40076 Signed-off-by: rallan <rallan@redhat.com>
* Libraries to enable and disable shared storageAkarsha2018-06-131-0/+116
| | | | | Change-Id: Ie5072e8f29185104bcd54348465cc6e96cce5f00 Signed-off-by: Akarsha <akrai@redhat.com>
* Quota: Fixing quota libs in glustoSanoj Unnikrishnan2018-06-133-194/+110
| | | | | | | | | | - added quota_libs.py with quota_validate library - Removed redundant function in quota_ops. - changed naming of quota_ops to be consistent and intutive w.r.t cli Change-Id: I4faf448ea308c9e04b548d6174d900fcf56978a5 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
* Changes to accept '*' as authentication value and minor enhancement in ↵Jilju Joy2018-06-121-16/+22
| | | | | | decription. Change-Id: I895b1eb51e0bc425ba1aff559374ea9383894ccb
* Add services to firewall and remove services from firewallRajesh Madaka2018-06-081-2/+46
| | | | | Change-Id: Ie81b6ecb7e7af0524a42b37f0256a2cfff5d7736 Signed-off-by: Rajesh Madaka <rmadaka@redhat.com>
* Gluster volume auth.reject operationJilju Joy2018-06-071-0/+100
| | | | | | | Adding minor enhancement Change-Id: I47cc2e6a134b0ebbc8573b3d46e7e0bd5e7fd0cc Signed-off-by: Jilju Joy <jijoy@localhost.localdomain>
* Gluster volume auth.allow operationJilju Joy2018-06-071-0/+122
| | | | | | Adding minor enhancement Addressed comments Change-Id: Ic4b693be51c853531a63218be7485374d1f6934e
* Use --mode=script at all times for remove_brickNigel Babu2018-06-061-2/+1
| | | | Change-Id: I6b4c3a0ed2ede26e4db3210ee87e604e01059748
* snapshot:: library for snapshot schedulersrivickynesh2018-05-311-0/+215
| | | | | Change-Id: Id2afba5b96177b2acde057357d58f0b257104c98 Signed-off-by: srivickynesh <sselvan@redhat.com>
* Added function to create ssl machineAkarsha2018-05-211-0/+225
| | | | | Change-Id: Ie9234be69a601d0489b159183fb02cff8758df89 Signed-off-by: Akarsha <akrai@redhat.com>
* Quota : function to check quota-deem-statfsVinayak Papnoi2018-05-161-2/+41
| | | | | | | | | | Adding a function to check if quota-deem-statfs is enabled or not. quota-deem-statfs should be enabled by default when quota is enabled. Resolved merge conflit. Addressed comments Change-Id: Ifbae5b123f42da3fff28299630373f4060520769 Signed-off-by: Vinayak Papnoi <vpapnoi@redhat.com>
* Check for failure in rebalance aggregate status in lib functionsPrasad Desala2018-05-161-21/+19
| | | | | | | | * wait_for_fix_layout_to_complete * wait_for_rebalance_to_complete Change-Id: I6e243725040f9d7bd7b46e00292771e76ee6fadf Signed-off-by: Prasad Desala <tdesala@redhat.com>
* Fix form_bricks_list to work with arbiterNigel Babu2018-05-111-2/+12
| | | | Change-Id: I04d3b8ef5ff08cc50fddf07461874210a08248a6
* Fix a mistake in gluster_init libNigel Babu2018-05-031-24/+24
| | | | | | Also fix pylint errors while I'm fixing things in there Change-Id: I62904384a7b7a441b426003b18743f3d3a7f2dde
* Fix cyclic import in brickmux_ops.pyNigel Babu2018-04-252-19/+13
| | | | Change-Id: I487822efd6c57b8c51b65b4eaf149eb67e96731b
* Opening firewall ports for rhel7Rajesh Madaka2018-04-251-0/+45
| | | | | Change-Id: I06194cd8968e0beb1dbd0815deaa999fc409272c Signed-off-by: Rajesh Madaka <rmadaka@redhat.com>