summaryrefslogtreecommitdiffstats
path: root/tests/basic/quota.t
Commit message (Collapse)AuthorAgeFilesLines
* tests: run nfs tests only if --enable-gnfs is providedAmar Tumballi2019-01-241-0/+2
| | | | | | Fixes: bz#1665358 Change-Id: Idbf88ec3ac683733b32c313377eeb72f2819bf0d Signed-off-by: Amar Tumballi <amarts@redhat.com>
* Fixes quota aux mount failureSanoj Unnikrishnan2017-05-081-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aux mount is created on the first limit/remove_limit/list command and it remains until volume is stopped / deleted / (quota is disabled) , where we do a lazy unmount. If the process is uncleanly terminated, then the mount entry remains and we get (Transport disconnected) error on subsequent attempts to run quota list/limit-usage/remove commands. Second issue, There is also a risk of inadvertent rm -rf on the /var/run/gluster causing data loss for the user. Ideally, /var/run is a temp path for application use and should not cause any data loss to persistent storage. Solution: 1) unmount the aux mount after each use. 2) clean stale mount before mounting, if any. One caveat with doing mount/unmount on each command is that we cannot use same mount point for both list and limit commands. The reason for this is that list command needs mount to be accessible in cli after response from glusterd, So it could be unmounted by a limit command if executed in parallel (had we used same mount point) Hence we use separate mount points for list and limit commands. Change-Id: I4f9e39da2ac2b65941399bffb6440db8a6ba59d0 BUG: 1433906 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com> Reviewed-on: https://review.gluster.org/16938 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Manikandan Selvaganesh <manikandancs333@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* quota: mark tests/basic/quota.t as bad_testSusant Palai2016-05-011-0/+1
| | | | | | | | | | | | | | | | tests/basic/quota.t regularly leaves a core behind. Some of the failed tests: * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16439/consoleFull * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16440/console Change-Id: Iacf42c40f768dd2939994bbb87cc7ef366ee495f BUG: 1332045 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14136 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* glusterd: default value of nfs.disable, change from false to trueKaleb S KEITHLEY2016-04-271-0/+1
| | | | | | | | | | | | | | | | | | Next step in eventual deprecation of glusterfs nfs server in favor of ganesha.nfsd. Also replace several open-coded strings with constant. Change-Id: If52f5e880191a14fd38e69b70a32b0300dd93a50 BUG: 1092414 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13738 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* tests/quota : improving tests for quotaManikandan Selvaganesh2016-03-031-7/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests/basic/quota.t includes all the basic test that needs to be tested for quota. In most of the other tests specific to bugs(tests/bugs/quota/*), tests such as creating and starting volume, enabling quota, setting limit, writing data, doing list have been done which is essential to write a individual quota test file, but, if the specific bug just needs to test *few* particular cases, I have moved those tests under tests/basic itself to speedup the regressions. Basics of inode-quota and it's enforcing, renaming with quota are basic tests and is hence moved under tests/basic folder. In other files, I have removed tests which are not needed, such as 'pidof glusterd' or checking for 'gluster volume info' or if there are any test which is already being tested under tests/basic and is being written again. Change-Id: Iefd6d9529246d59829cc5bf02687a1861d8462a8 BUG: 1294826 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/13216 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/quota : Fix spurious failurevmallika2015-07-121-30/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem : Basically, in this test case a file is created which exceeds the quota limit. Once the limit is reached that file will be deleted. At the same moment we are testing inode-quota. It can so happen that before the marker updates the information related to deletion of file, a new file creation operation comes and sees that quota limit is still exceeded. Solution : Inducing a check to see if marker updation completed successfully. Updated all the test case which has the similar machanism and also moved the "usage" function to a common place "volume.rc" Change-Id: I36ddbc5ebbf1b74c9d326a0d1d5f3b32f20a906a BUG: 1229297 Signed-off-by: Sachin Pandit <spandit@redhat.com> Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11125 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* Quota: fix testcases not to send parallel writes for accuratevmallika2015-05-251-8/+10
| | | | | | | | | | | | | | | | | | | | | | | quota enforcement Currently quota enforcer doesn't consider parallel writes and allows quota to exceed limit where there are high rate of parallel writes. Bug# 1223658 tracks the issue. This patch fixes the spurious failures by not sending parallel writes. Using O_SYNC and O_APPEND flags and block size not more that 256k (For higher block size NFS client splits the block into 256k chinks and does parallel writes) Change-Id: I297c164b030cecb87ce5b494c02b09e8b073b276 BUG: 1223798 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/10878 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* tests: Check aux umount is unmounted for quota testsPranith Kumar K2015-05-041-0/+1
| | | | | | | | | | Change-Id: If57d08f3446755ea41f66ca258efcc8ea5a89063 BUG: 1217701 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/10480 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: fix rebalance_completedJeff Darcy2015-03-261-8/+1
| | | | | | | | | | | | This was causing spurious faiures in bug-884455.t and possibly elsewhere. Change-Id: Iad6b7515ca0c7c485300f79dcd2477efc76877f8 BUG: 1163543 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/9994 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* tests: fixing typo errorsSakshi Bansal2015-02-021-2/+2
| | | | | | | | | | | Change-Id: I8caab03531d74c64dcfa05c35a7daeee646cd2fa BUG: 1075417 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/9507 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/9548 Tested-by: Vijay Bellur <vbellur@redhat.com>
* Spare spurious regression in quota.tEmmanuel Dreyfus2015-01-101-1/+4
| | | | | | | | | | | | | Like quota-nfs.t, quota.t shows spurious regressions because dd writes too fast. Reuse the C program used by quota-nfs.t to write slowly, and rename it to show it is not specific to quota-nfs.t BUG: 1129939 Change-Id: I14b50e368023e88dc8bcc76c266cc908d62f89e2 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9410 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gNFS : mount fails if connection to brick(s) is not established yet.jiffin2014-10-311-0/+3
| | | | | | | | | | | | | | | | | Connection between gluster-nfs and brick process requires time (especially for rdma).During that time when we try to mount using nfs ,it will fail saying that volume not found. So we need a check using 'is_nfs_export_available'before mounting to ensure volume is available.This patch will provide the check before nfs mount if it is not given in the test files Change-Id: I242eb6e3118ebaca1df46314302a203a0c9738a8 BUG: 1158831 Signed-off-by: jiffin tony thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/9011 Reviewed-by: Meghana M <mmadhusu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* Regression test portability: quota.tEmmanuel Dreyfus2014-10-201-2/+2
| | | | | | | | | | | | | - Use du -k to have size reported in kB, as NetBSD defaults to blocks - on overquota, Linux says 'No space left' and NetBSD 'Disc quota exceeded' BUG: 1129939 Change-Id: I6a2baef94cb60e9fabf06a6f8d01f2acb6ee0a30 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8930 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* porting: various fixes regression tests OSX/FreeBSDHarshavardhana2014-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | - `wc -l` on OSX/FreeBSD adds spurious spaces, this clobbers up TAP output parsers - fix it. - `umount -l` doesn't exist on OSX/FreeBSD use 'umount -f' if available. - Add check for 'file' version, to handle mime type variations across versions - Converge 'glusterfs --attribute-timeout=0 --entry-timeout=0' into '$GFS' - Modify remaining 'mount -t nfs' to use 'mount_nfs' - Update sha1sum for OSX to use 'openssl sha1'. Change-Id: Id1012faa5d67a921513d220e7fa9cebafe830d34 BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8501 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* Regression test portability: mountEmmanuel Dreyfus2014-08-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address various portability-related problems related to mount - In order to address the non-portability of NFS mount options, use the mount_nfs shell function everywhere, and use it to translate options. - Make sure NFS mounts are unmounted before shutting down the daemons in order to avoid deadlock. The change is done in every test that did not unmounted NFS mounts at the end of the script, and in global cleanup function as well. The force_umount shell function from volume.rc was duplicated as umount_nfs in nfs.rc so that we do not have to add an include on volume.rc for all NFS tests that do not need it. - The FUSE mount type on NetBSD is puffs|perfuse|fuse.glusterfs instead of just fuse.glusterfs, make the regexp configurable in include.rc - Finding wether the mount is RO or RW in mount output needs a system-dependent command configurable in include.rc - mount options in /proc/mounts may be limited to "rw", adjust the regexp for this case where there is no comma And while there change rm into rm -f in tests/basic/mount.t for removal opearation that should fail, since rm may ask for confirmation Change-Id: I1fb708486ec350b2885e2404879561c1020fa8fd BUG: 1129939 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8494 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* tests: make dd less noisyJeff Darcy2014-07-151-1/+1
| | | | | | | | | | | | | Also fixed one case in quota.t where error output is expected. There are probably other similar cases which can be fixed separately. Change-Id: If80fad0d9fcff6f8ca91d00f4f7b2d5f3fef4256 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/8298 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Regression test portability: dd usageEmmanuel Dreyfus2014-07-141-5/+5
| | | | | | | | | | | | | | NetBSD, FreeBSD, and MacOS X dd(1) bs argument uses m for megabyte, while Linux uses M. Use bs=1024k instead of bs=1M for better compatibility. BUG: 764655 Change-Id: I603f57adbc9b31f6d634b918726437fbfce42e03 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8278 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Justin Clift <justin@gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Change umount with force_umount with 5 retriesPranith Kumar K2014-06-231-1/+1
| | | | | | | | | | | | | Change-Id: I0e2dbdfd34080328dfa6b4eebef0366f2b0fcb04 BUG: 1092850 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8117 Tested-by: Justin Clift <justin@gluster.org> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Tests: Umount nfs mount before volume stopPranith Kumar K2014-05-201-2/+2
| | | | | | | | | | Change-Id: Ia1b98ee56bfa562c3f97f1649699f49917ebbfc7 BUG: 1092850 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7813 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tests: Use uniform timeoutsPranith Kumar K2014-05-191-6/+6
| | | | | | | | | Change-Id: I479ab941b3b2da3b16f624400fbd300f08326268 BUG: 1092850 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7799 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests/quota: Wait till the rebalance is completeVarun Shastry2014-04-021-4/+14
| | | | | | | | | | | | Change-Id: Ia6f0c81fb1542ce1de965a69a61535691df056c3 BUG: 1077159 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/7380 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Justin Clift <justin@gluster.org> Tested-by: Justin Clift <justin@gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Set quota limit key in dht_selfheal of dirs.Varun Shastry2014-01-221-0/+71
| | | | | | | | | | | | | | Also fixed check in dht_is_subvol_in_layout to check if the layouts are zero'ed out. Change-Id: I4bf8ebf66d3ef1946309b6c9aac9e79bf8a6d495 BUG: 969461 Signed-off-by: shishir gowda <sgowda@redhat.com> Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6392 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: Improvements to quotaRaghavendra G2013-11-261-7/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Two stages of quota enforcement is done: Soft and hard quota Upon reaching soft quota limit on the directory it logs/alerts in the quota daemon log (ie DEFAULT_LOG_DIR/quotad.log) and no more writes allowed after hard quota limit. After reaching the soft-limit the daemon alerts the user/admin repeatively for every 'alert-time', which is configurable. * Quota enforcer is moved to server-side. It takes care of enforcing quota. Since enforcer doesn't have the cluster view, it relies on another service called quota-aggregator. Aggregator, on query can return the size of a directory based on the cluster view. Enforcer is always loaded in the server graph and is by passed if the feature is not enabled. Options specific to enforcer: server-quota - Specifies whether the feature is on/off. It is used to by pass the quota if turned off. deem-statfs - If set to on, it takes quota limits into consideration while estimating fs size. (df command). The algorithm followed is, i. Adjust statvfs based on limit configured on root. ii. If limit is set on the inode passed, use size/limits on that inode to populate statvfs. Otherwise, use size/limits configured on root. iii. Upon statvfs, update the ctx->size on the inode. iv. Don't let DHT aggregate, instead take the maximum of the usages from the subvols of the DHT, since each of it contains the complete information. Enforcer also makes use of gfid-to-path conversion functionality to work correctly when a client like nfs predominently relies on nameless lookups. * Quota Aggregator acts as a thin client to provide cluster view Its a lightweight *gluster client* process with no mount point, started upon enabling quota or restarting the volume. This is a single process run on each brick, which can answer queries on all volumes in the cluster. Its volfile stored in GLUSTERD_DEFAULT_WORKING_DIR/quotad/quotad.vol. Credits: Raghavendra Bhat <rabhat@redhat.com> Varun Shastry <vshastry@redhat.com> Shishir Gowda <sgowda@redhat.com> Kruthika Dhananjay <kdhananj@redhat.com> Brian Foster <bfoster@redhat.com> Krishnan Parthasarathi <kparthas@redhat.com> Change-Id: Id1cb25b414951da34c665a55f77385d482e0f9de BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/5952 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/quota: regression tests on general functionality of quotaVarun Shastry2013-03-111-0/+51
Change-Id: Ie8fd9d21f3a8644ce4d6f6cb887c101451cec10c BUG: 919998 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4657 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>