<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/tests/basic/quota-ancestry-building.t, branch v5.0</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>Fixes quota aux mount failure</title>
<updated>2017-05-08T06:15:55+00:00</updated>
<author>
<name>Sanoj Unnikrishnan</name>
<email>sunnikri@redhat.com</email>
</author>
<published>2017-03-22T09:32:12+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2ae4b4058691b324535d802f4e6d24cce89a10e5'/>
<id>2ae4b4058691b324535d802f4e6d24cce89a10e5</id>
<content type='text'>
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 &lt;sunnikri@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16938
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Manikandan Selvaganesh &lt;manikandancs333@gmail.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;sunnikri@redhat.com&gt;
Reviewed-on: https://review.gluster.org/16938
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Manikandan Selvaganesh &lt;manikandancs333@gmail.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota/tests : remove quota-ancestry-building.t from bad tests</title>
<updated>2016-05-04T10:06:00+00:00</updated>
<author>
<name>Manikandan Selvaganesh</name>
<email>mselvaga@redhat.com</email>
</author>
<published>2016-05-03T09:42:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a1a1ff66eecba2edc523b41652172088b8e08dc9'/>
<id>a1a1ff66eecba2edc523b41652172088b8e08dc9</id>
<content type='text'>
Change-Id: Iaee0934d8be4e133b43bd390ed029f11cce1a24b
BUG: 1332020
Signed-off-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14185
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra Talur &lt;rtalur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Iaee0934d8be4e133b43bd390ed029f11cce1a24b
BUG: 1332020
Signed-off-by: Manikandan Selvaganesh &lt;mselvaga@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14185
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra Talur &lt;rtalur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>quota: mark quota-ancestry-building.t as bad_test</title>
<updated>2016-05-01T14:37:17+00:00</updated>
<author>
<name>Susant Palai</name>
<email>spalai@redhat.com</email>
</author>
<published>2016-05-01T09:33:05+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cf943b71db9188dbd87fbb8f97ca610b7004317d'/>
<id>cf943b71db9188dbd87fbb8f97ca610b7004317d</id>
<content type='text'>
tests/basic/quota-ancestry-building.t regularly fails like this:

    ./tests/basic/quota-ancestry-building.t (Wstat: 0 Tests: 34 Failed: 6)
      Failed tests:  14-19
    Files=1, Tests=34, 43 wallclock secs ( 0.05 usr  0.01 sys +  2.28 cusr  2.91 csys =  5.25 CPU)
    Result: FAIL
    ./tests/basic/quota-ancestry-building.t: 2 new core files
    End of test ./tests/basic/quota-ancestry-building.t

Some of the failed tests:
 * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16385/console
 * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16386/console

Change-Id: Ibbae908b4f752e195e7a7bdd10b102d7bcec312b
BUG: 1332020
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14134
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tests/basic/quota-ancestry-building.t regularly fails like this:

    ./tests/basic/quota-ancestry-building.t (Wstat: 0 Tests: 34 Failed: 6)
      Failed tests:  14-19
    Files=1, Tests=34, 43 wallclock secs ( 0.05 usr  0.01 sys +  2.28 cusr  2.91 csys =  5.25 CPU)
    Result: FAIL
    ./tests/basic/quota-ancestry-building.t: 2 new core files
    End of test ./tests/basic/quota-ancestry-building.t

Some of the failed tests:
 * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16385/console
 * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16386/console

Change-Id: Ibbae908b4f752e195e7a7bdd10b102d7bcec312b
BUG: 1332020
Signed-off-by: Susant Palai &lt;spalai@redhat.com&gt;
Reviewed-on: http://review.gluster.org/14134
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Quota: fix testcases not to send parallel writes for accurate</title>
<updated>2015-05-25T18:34:22+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-05-25T08:05:48+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=225ff553106396066d68d8c757e5c001f5d9ab15'/>
<id>225ff553106396066d68d8c757e5c001f5d9ab15</id>
<content type='text'>
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 &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10878
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10878
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Check aux umount is unmounted for quota tests</title>
<updated>2015-05-04T08:23:28+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2015-05-01T05:31:15+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=7759748915485d6c740a7fed831376f298eb90bb'/>
<id>7759748915485d6c740a7fed831376f298eb90bb</id>
<content type='text'>
Change-Id: If57d08f3446755ea41f66ca258efcc8ea5a89063
BUG: 1217701
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10480
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If57d08f3446755ea41f66ca258efcc8ea5a89063
BUG: 1217701
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10480
Tested-by: NetBSD Build System
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>function gf_string2bytesize_range should handle 'xB' byte values</title>
<updated>2015-04-01T06:31:44+00:00</updated>
<author>
<name>vmallika</name>
<email>vmallika@redhat.com</email>
</author>
<published>2015-03-02T07:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d6b6c32ac7f0a6b3d77009aec8bdd0cd289bd0ff'/>
<id>d6b6c32ac7f0a6b3d77009aec8bdd0cd289bd0ff</id>
<content type='text'>
Change-Id: I208289aae2423e4bb015cf33bafd2a961e1c3fc6
BUG: 1197593
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9779
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I208289aae2423e4bb015cf33bafd2a961e1c3fc6
BUG: 1197593
Signed-off-by: vmallika &lt;vmallika@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9779
Reviewed-by: Atin Mukherjee &lt;amukherj@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Sachin Pandit &lt;spandit@redhat.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: portability fixes</title>
<updated>2015-03-30T12:32:56+00:00</updated>
<author>
<name>Emmanuel Dreyfus</name>
<email>manu@netbsd.org</email>
</author>
<published>2015-03-30T03:43:12+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=aff367a601351ff7bfbfc572d6ae0d4ffafae0f0'/>
<id>aff367a601351ff7bfbfc572d6ae0d4ffafae0f0</id>
<content type='text'>
Fix various portability problems in mount-nfs-auth.t,
quota-ancestry-building.t and trash.t:

- dd bs=1M is not portable, use dd bs=1024k instead
- dd bs=1MB is not portable iether, use dd bs=1000000 instead
- After restarting NFS service, wait for it to become available
- After killing a process, wait for it to terminate
- BSD awk does not accept a=b="", use a=""; b="" instead
- NetBSD displays the original program name in paenthesis at the end
  of ps output. Strip it using sed 's/ *([^()]*)$//' is we want just
  the command
- Do no use umount $N0, which leads to many troubles solved by
  EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
- The -p option for mkdir must be before the directory name
- du -b is not portable. Use ls -l instead.

BUG: 1129939
Change-Id: I3d44a10a37d47ebb6a263c206566487e3ffb85d8
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/10033
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix various portability problems in mount-nfs-auth.t,
quota-ancestry-building.t and trash.t:

- dd bs=1M is not portable, use dd bs=1024k instead
- dd bs=1MB is not portable iether, use dd bs=1000000 instead
- After restarting NFS service, wait for it to become available
- After killing a process, wait for it to terminate
- BSD awk does not accept a=b="", use a=""; b="" instead
- NetBSD displays the original program name in paenthesis at the end
  of ps output. Strip it using sed 's/ *([^()]*)$//' is we want just
  the command
- Do no use umount $N0, which leads to many troubles solved by
  EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" umount_nfs $N0
- The -p option for mkdir must be before the directory name
- du -b is not portable. Use ls -l instead.

BUG: 1129939
Change-Id: I3d44a10a37d47ebb6a263c206566487e3ffb85d8
Signed-off-by: Emmanuel Dreyfus &lt;manu@netbsd.org&gt;
Reviewed-on: http://review.gluster.org/10033
Reviewed-by: Krishnan Parthasarathi &lt;kparthas@redhat.com&gt;
Reviewed-by: Anoop C S &lt;achiraya@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: ancestry building quota tests on fuse mount</title>
<updated>2015-01-12T05:19:28+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2015-01-07T15:18:51+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=119bedfa06c3a6bb38089dafbcd6e0c2bd9b26cf'/>
<id>119bedfa06c3a6bb38089dafbcd6e0c2bd9b26cf</id>
<content type='text'>
quota-anon-fd-nfs.t is essentially testing ancestry building code path and
quota limit reaching. Since nfs client and server on same machine leads to
deadlocks, it is better to use fuse mount to trigger these code paths. Just
stop the volume and start again, this wipes the inode table clean. Performing
writes after this will trigger ancestry building + quota checks.

Change-Id: I2d37a8662040a638d3fac3f9535d32498a5b434d
BUG: 1163543
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9408
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
quota-anon-fd-nfs.t is essentially testing ancestry building code path and
quota limit reaching. Since nfs client and server on same machine leads to
deadlocks, it is better to use fuse mount to trigger these code paths. Just
stop the volume and start again, this wipes the inode table clean. Performing
writes after this will trigger ancestry building + quota checks.

Change-Id: I2d37a8662040a638d3fac3f9535d32498a5b434d
BUG: 1163543
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
Reviewed-on: http://review.gluster.org/9408
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
