Bug 762946 (GLUSTER-1214)

Summary: When cache-size is given out of range, error is logged but GlusterFS starts
Product: [Community] GlusterFS Reporter: Sachidananda Urs <sac>
Component: io-cacheAssignee: Raghavendra G <raghavendra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.5CC: gluster-bugs, lakshmipathi, rabhat, tejas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTNR Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sachidananda Urs 2010-07-24 14:54:24 UTC
When the cache-size is out of range error:

[2010-07-24 20:05:51] E [xlator.c:328:_volume_option_value_validate] iocache: '32' in 'option cache-size 32' is out of range [4194304 - 6442450944]

is logged. But GlusterFS does not fail, mount point is created.

Comment 1 Raghavendra G 2010-10-25 02:33:31 UTC
Out of range is not an error. The check is present just to warn the user, but its not invalid.

Comment 2 Sachidananda Urs 2010-10-25 02:37:26 UTC
Change the log message to W instead. E is quite misleading.

Comment 3 Anand Avati 2010-10-25 03:17:47 UTC
PATCH: http://patches.gluster.com/patch/5554 in master (xlator.c/option-validation: change the log level to warning when given value is out of range.)

Comment 4 Anand Avati 2010-10-25 03:17:58 UTC
PATCH: http://patches.gluster.com/patch/5555 in release-3.0 (xlator.c/option-validation: change the log level to warning when given value is out of range.)

Comment 5 Lakshmipathi G 2010-11-11 02:29:39 UTC
verified with 3.1.1qa4.It fixed 


set option doesn't allow to set value less 4mb

----
# gluster volume set bz performance.cache-size 32
Set volume unsuccessful
Error, Cannot be less than 4MB
[root@space laks]# gluster volume set bz performance.cache-size 3200
Set volume unsuccessful
----

If volfile is edited manually it displays following warning -

--
[2010-11-11 11:00:02.703548] W [xlator.c:321:_volume_option_value_validate] bz-io-cache: '32' in 'option cache-size 32' is out of range [4194304 - 6442450944]
[2010-11-11 11:00:02.726984] W [xlator.c:321:_volume_option_value_validate] bz-io-cache: '32' in 'option max-file-size 32' is out of range [-1 - -1]
----

Comment 6 Raghavendra Bhat 2010-11-11 07:46:02 UTC
Checked with glusterfs-3.1.1qa5. It is fixed. Message is a warning message.


[2010-11-11 16:09:55.362207] I [fuse-bridge.c:2808:fuse_init] glusterfs-fuse: FUSE inited with protocol versions: glusterfs 7.13 kernel 7.13
[2010-11-11 16:10:04.831396] I [fuse-bridge.c:3607:fini] fuse: Unmounting '/mnt/client'.
[2010-11-11 16:10:04.901945] I [glusterfsd.c:672:cleanup_and_exit] glusterfsd: shutting down
[2010-11-11 16:10:31.309628] W [xlator.c:321:_volume_option_value_validate] vol-io-cache: '22' in 'option cache-size 22' is out of range [419
4304 - 6442450944]
[2010-11-11 16:10:31.309668] W [io-stats.c:1644:init] vol: dangling volume. check volfile 
[2010-11-11 16:10:31.309699] W [dict.c:1204:data_to_str] dict: @data=(nil)
[2010-11-11 16:10:31.309716] W [dict.c:1204:data_to_str] dict: @data=(nil)
Given volfile:
+------------------------------------------------------------------------------+
  1: volume vol-client-0
  2:     type protocol/client
  3:     option remote-host bigbang
  4:     option remote-subvolume /d/glusterfs/export/export
  5:     option transport-type tcp
  6: end-volume
  7: 
  8: volume vol-write-behind
  9:     type performance/write-behind
 10:     subvolumes vol-client-0
 11: end-volume
 12: 
 13: volume vol-read-ahead
 14:     type performance/read-ahead
 15:     subvolumes vol-write-behind
 16: end-volume
 17: 
 18: volume vol-io-cache
 19:     type performance/io-cache
 20:     option cache-size 22
 21:     subvolumes vol-read-ahead
 22: end-volume
 23: 
 24: volume vol-quick-read
 25:     type performance/quick-read
 26:     option cache-size 22
 27:     subvolumes vol-io-cache
 28: end-volume
 29: 
 30: volume vol
: