From 716ec7f458d592c30f5ff8c667d04c5c1e014e62 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Fri, 9 Jun 2017 11:31:19 +0530 Subject: [PATCH 504/509] nl-cache: add group volume set option for ease of use >Reviewed-on: https://review.gluster.org/17495 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >CentOS-regression: Gluster Build System >Reviewed-by: Pranith Kumar Karampuri >Signed-off-by: Poornima G Change-Id: Id03643a9598da53051a01ca09e1d2a62bc195ab6 BUG: 1460098 Signed-off-by: Poornima G Reviewed-on: https://code.engineering.redhat.com/gerrit/108891 Reviewed-by: Atin Mukherjee --- extras/Makefile.am | 4 +++- extras/group-nl-cache | 5 +++++ glusterfs.spec.in | 5 +++++ tests/basic/nl-cache.t | 9 ++++++--- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 extras/group-nl-cache diff --git a/extras/Makefile.am b/extras/Makefile.am index e6964e6..96b1b2b 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 0000000..a41e8ec --- /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 20af5d2..1ce2d41 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -1054,6 +1054,7 @@ exit 0 %exclude %{_sysconfdir}/glusterfs/gluster-rsyslog-7.2.conf %exclude %{_sysconfdir}/glusterfs/group-virt.example %exclude %{_sysconfdir}/glusterfs/group-metadata-cache +%exclude %{_sysconfdir}/glusterfs/group-nl-cache %exclude %{_sysconfdir}/glusterfs/group-gluster-block %exclude %{_sysconfdir}/glusterfs/logger.conf.example %exclude %_init_glusterd @@ -1373,6 +1374,7 @@ exit 0 %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/groups %attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/virt %attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/metadata-cache + %attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/nl-cache %attr(0644,-,-) %{_sharedstatedir}/glusterd/groups/gluster-block %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glusterfind %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/glusterfind/.keys @@ -2063,6 +2065,9 @@ end %endif %changelog +* Tue Jun 13 2017 Poornima G +- Install /var/lib/glusterd/groups/nl-cache by default + * Wed May 10 2017 Pranith Kumar K - Install /var/lib/glusterd/groups/gluster-block by default diff --git a/tests/basic/nl-cache.t b/tests/basic/nl-cache.t index ddd4e25..f615328 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'; -- 1.8.3.1