summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-06-09 11:31:19 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-06-20 13:43:42 +0000
commitb7b91962e7ae6e94b15019ed1e60d75bab7bc1f2 (patch)
treebbbe61359ddfaa81a65c2a5cf3d181e5f4781f65
parent94b378c18ae968719beb71bdf5c8229f7df5625f (diff)
nl-cache: add group volume set option for ease of use
> Reviewed-on: https://review.gluster.org/17495 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > (cherry picked from commit 38780ff2d0717cd800a49072879a664b04385fd1) Change-Id: Id03643a9598da53051a01ca09e1d2a62bc195ab6 BUG: 1460896 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/17528 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--extras/Makefile.am4
-rw-r--r--extras/group-nl-cache5
-rw-r--r--glusterfs.spec.in4
-rwxr-xr-xtests/basic/nl-cache.t9
4 files changed, 18 insertions, 4 deletions
diff --git a/extras/Makefile.am b/extras/Makefile.am
index 3717a71e461..3af11032f6b 100644
--- a/extras/Makefile.am
+++ b/extras/Makefile.am
@@ -9,7 +9,7 @@ SUBDIRS = init.d systemd benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM \
confdir = $(sysconfdir)/glusterfs
conf_DATA = glusterfs-logrotate gluster-rsyslog-7.2.conf gluster-rsyslog-5.8.conf \
- logger.conf.example glusterfs-georep-logrotate group-virt.example group-metadata-cache group-gluster-block
+ logger.conf.example glusterfs-georep-logrotate group-virt.example group-metadata-cache group-gluster-block group-nl-cache
voldir = $(sysconfdir)/glusterfs
vol_DATA = glusterd.vol
@@ -37,3 +37,5 @@ install-data-local:
$(DESTDIR)$(GLUSTERD_WORKDIR)/groups/metadata-cache
$(INSTALL_DATA) $(top_srcdir)/extras/group-gluster-block \
$(DESTDIR)$(GLUSTERD_WORKDIR)/groups/gluster-block
+ $(INSTALL_DATA) $(top_srcdir)/extras/group-nl-cache \
+ $(DESTDIR)$(GLUSTERD_WORKDIR)/groups/nl-cache
diff --git a/extras/group-nl-cache b/extras/group-nl-cache
new file mode 100644
index 00000000000..a41e8ecfd64
--- /dev/null
+++ b/extras/group-nl-cache
@@ -0,0 +1,5 @@
+features.cache-invalidation=on
+features.cache-invalidation-timeout=600
+performance.nl-cache=on
+performance.nl-cache-timeout=600
+network.inode-lru-limit=50000
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index f515be6915c..aa54a9eb1b1 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -1218,6 +1218,7 @@ exit 0
%attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/virt
%attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/metadata-cache
%attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/gluster-block
+ %attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/nl-cache
%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glusterfind
%dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glusterfind/.keys
%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glustershd
@@ -1299,6 +1300,9 @@ exit 0
%endif
%changelog
+* Fri Jun 9 2017 Poornima G <pgurusid@redhat.com>
+- Install /var/lib/glusterd/groups/nl-cache by default
+
* Wed May 10 2017 Pranith Kumar K <pkarampu@redhat.com>
- Install /var/lib/glusterd/groups/gluster-block by default
diff --git a/tests/basic/nl-cache.t b/tests/basic/nl-cache.t
index ddd4e257dc9..f61532879b2 100755
--- a/tests/basic/nl-cache.t
+++ b/tests/basic/nl-cache.t
@@ -10,9 +10,12 @@ TEST glusterd
TEST $CLI volume create $V0 $H0:$B0/${V0}{0..4}
EXPECT 'Created' volinfo_field $V0 'Status'
-TEST $CLI volume set $V0 performance.nl-cache on
-TEST $CLI volume set $V0 features.cache-invalidation on
-TEST $CLI volume set $V0 features.cache-invalidation-timeout 600
+TEST $CLI volume set $V0 group nl-cache
+EXPECT '600' volinfo_field $V0 'performance.nl-cache-timeout'
+EXPECT 'on' volinfo_field $V0 'performance.nl-cache'
+EXPECT '600' volinfo_field $V0 'features.cache-invalidation-timeout'
+EXPECT 'on' volinfo_field $V0 'features.cache-invalidation'
+EXPECT '50000' volinfo_field $V0 'network.inode-lru-limit'
TEST $CLI volume start $V0;
EXPECT 'Started' volinfo_field $V0 'Status';