From 19210e4fc551893d1545e719fa26d9ad2d2f5cba Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Mon, 13 Nov 2017 18:41:58 +0530 Subject: [PATCH 090/124] Revert "build: conditionally build legacy gNFS server and associated sub-packaging" This reverts commit 83abcba6b42f94eb5a6495a634d4055362a9d79d. label : DOWNSTREAM ONLY Change-Id: If1c02d80b746e0a5b5e2c9a3625909158eff55d5 Signed-off-by: Jiffin Tony Thottan Reviewed-on: https://code.engineering.redhat.com/gerrit/167575 Tested-by: RHGS Build Bot Reviewed-by: Soumya Koduri Reviewed-by: Kaleb Keithley Reviewed-by: Sunil Kumar Heggodu Gopala Acharya --- configure.ac | 13 ------- extras/LinuxRPM/Makefile.am | 4 +-- glusterfs.spec.in | 54 ++++++---------------------- xlators/Makefile.am | 5 +-- xlators/mgmt/glusterd/src/glusterd-nfs-svc.c | 27 ++++++-------- 5 files changed, 24 insertions(+), 79 deletions(-) diff --git a/configure.ac b/configure.ac index 633e850..521671b 100644 --- a/configure.ac +++ b/configure.ac @@ -1359,18 +1359,6 @@ if test -n "$LIBAIO"; then BUILD_LIBAIO=yes fi -dnl gnfs section -BUILD_GNFS="no" -AC_ARG_ENABLE([gnfs], - AC_HELP_STRING([--enable-gnfs], - [Enable legacy gnfs server xlator.])) -if test "x${with_server}" = "xyes" -a "x$enable_gnfs" = "xyes"; then - BUILD_GNFS="yes" -fi -AM_CONDITIONAL([BUILD_GNFS], [test x$BUILD_GNFS = xyes]) -AC_SUBST(BUILD_GNFS) -dnl end gnfs section - dnl Check for userspace-rcu PKG_CHECK_MODULES([URCU], [liburcu-bp], [], [AC_CHECK_HEADERS([urcu-bp.h], @@ -1624,7 +1612,6 @@ echo "EC dynamic support : $EC_DYNAMIC_SUPPORT" echo "Use memory pools : $USE_MEMPOOL" echo "Nanosecond m/atimes : $BUILD_NANOSECOND_TIMESTAMPS" echo "Server components : $with_server" -echo "Legacy gNFS server : $BUILD_GNFS" echo "IPV6 default : $with_ipv6_default" echo "Use TIRPC : $with_libtirpc" echo "With Python : ${PYTHON_VERSION}" diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am index f028537..61fd6da 100644 --- a/extras/LinuxRPM/Makefile.am +++ b/extras/LinuxRPM/Makefile.am @@ -18,7 +18,7 @@ autogen: cd ../.. && \ rm -rf autom4te.cache && \ ./autogen.sh && \ - ./configure --enable-gnfs --with-previous-options + ./configure --with-previous-options prep: $(MAKE) -C ../.. dist; @@ -36,7 +36,7 @@ srcrpm: mv rpmbuild/SRPMS/* . rpms: - rpmbuild --define '_topdir $(shell pwd)/rpmbuild' --with gnfs -bb rpmbuild/SPECS/glusterfs.spec + rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bb rpmbuild/SPECS/glusterfs.spec mv rpmbuild/RPMS/*/* . # EPEL-5 does not like new versions of rpmbuild and requires some diff --git a/glusterfs.spec.in b/glusterfs.spec.in index f6b823d..cb17eaa 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -52,11 +52,6 @@ # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without georeplication %{?_without_georeplication:%global _without_georeplication --disable-georeplication} -# gnfs -# if you wish to compile an rpm with the legacy gNFS server xlator -# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with gnfs -%{?_with_gnfs:%global _with_gnfs --enable-gnfs} - # ipv6default # if you wish to compile an rpm with IPv6 default... # rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with ipv6default @@ -153,7 +148,6 @@ %if 0%{?_without_server:1} %global _without_events --disable-events %global _without_georeplication --disable-georeplication -%global _with_gnfs %{nil} %global _without_tiering --disable-tiering %global _without_ocf --without-ocf %endif @@ -525,25 +519,6 @@ is in userspace and easily manageable. This package provides support to geo-replication. %endif -%if ( 0%{?_with_gnfs:1} ) -%package gnfs -Summary: GlusterFS gNFS server -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: %{name}-client-xlators%{?_isa} = %{version}-%{release} -Requires: nfs-utils - -%description gnfs -GlusterFS is a distributed file-system capable of scaling to several -petabytes. It aggregates various storage bricks over Infiniband RDMA -or TCP/IP interconnect into one large parallel network file -system. GlusterFS is one of the most sophisticated file systems in -terms of features and extensibility. It borrows a powerful concept -called Translators from GNU Hurd kernel. Much of the code in GlusterFS -is in user space and easily manageable. - -This package provides the glusterfs legacy gNFS server xlator -%endif - %package libs Summary: GlusterFS common libraries @@ -659,6 +634,7 @@ Requires: %{name}-api%{?_isa} = %{version}-%{release} Requires: %{name}-client-xlators%{?_isa} = %{version}-%{release} # lvm2 for snapshot, and nfs-utils and rpcbind/portmap for gnfs server Requires: lvm2 +Requires: nfs-utils %if ( 0%{?_with_systemd:1} ) %{?systemd_requires} %else @@ -789,7 +765,6 @@ export LDFLAGS %{?_with_cmocka} \ %{?_with_debug} \ %{?_with_firewalld} \ - %{?_with_gnfs} \ %{?_with_tmpfilesdir} \ %{?_with_tsan} \ %{?_with_valgrind} \ @@ -1286,17 +1261,6 @@ exit 0 %{_bindir}/fusermount-glusterfs %endif -%if ( 0%{?_with_gnfs:1} && 0%{!?_without_server:1} ) -%files gnfs -%dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator -%dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs - %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs/server.so -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs -%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/nfs-server.vol -%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs/run -%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid -%endif - %files thin-arbiter %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features @@ -1409,11 +1373,6 @@ exit 0 %config(noreplace) %{_sysconfdir}/glusterfs %exclude %{_sysconfdir}/glusterfs/thin-arbiter.vol %exclude %{_sysconfdir}/glusterfs/eventsconfig.json -%exclude %{_sharedstatedir}/glusterd/nfs/nfs-server.vol -%exclude %{_sharedstatedir}/glusterd/nfs/run/nfs.pid -%if ( 0%{?_with_gnfs:1} ) -%exclude %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs/* -%endif %config(noreplace) %{_sysconfdir}/sysconfig/glusterd %if ( 0%{_for_fedora_koji_builds} ) %config(noreplace) %{_sysconfdir}/sysconfig/glusterfsd @@ -1461,6 +1420,7 @@ exit 0 %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/trash.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/upcall.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/leases.so + %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/nfs* %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mgmt %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/mgmt/glusterd.so %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/protocol @@ -1477,6 +1437,7 @@ exit 0 # /var/lib/glusterd, e.g. hookscripts, etc. %ghost %attr(0644,-,-) %config(noreplace) %{_sharedstatedir}/glusterd/glusterd.info +%ghost %attr(0600,-,-) %config(noreplace) %{_sharedstatedir}/glusterd/options %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/bitd %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/groups @@ -1529,7 +1490,11 @@ exit 0 %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre/S30samba-stop.sh %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh -%config(noreplace) %ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/options +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs +%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/nfs-server.vol +%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/nfs/run +%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/nfs/run/nfs.pid +%ghost %attr(0600,-,-) %{_sharedstatedir}/glusterd/options %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/peers %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/quotad %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/scrub @@ -1995,6 +1960,9 @@ fi %endif %changelog +* Sun Apr 7 2019 Jiffin Tony Thottan +- DOWNSTREAM ONLY - revert of 83abcb(gnfs in an optional subpackage) + * Sun Apr 7 2019 Soumya Koduri - As an interim fix add dependency on netstat(/net-tools) for glusterfs-ganesha package (#1395574) diff --git a/xlators/Makefile.am b/xlators/Makefile.am index ef20cbb..be54eb3 100644 --- a/xlators/Makefile.am +++ b/xlators/Makefile.am @@ -1,12 +1,9 @@ -if BUILD_GNFS - GNFS_DIR = nfs -endif DIST_SUBDIRS = cluster storage protocol performance debug features \ mount nfs mgmt system playground meta SUBDIRS = cluster storage protocol performance debug features \ - mount ${GNFS_DIR} mgmt system playground meta + mount nfs mgmt system playground meta EXTRA_DIST = xlator.sym diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c index 36e9052..3960031 100644 --- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c @@ -18,6 +18,8 @@ #include "glusterd-messages.h" #include "glusterd-svc-helper.h" +static char *nfs_svc_name = "nfs"; + static gf_boolean_t glusterd_nfssvc_need_start() { @@ -41,6 +43,12 @@ glusterd_nfssvc_need_start() return start; } +int +glusterd_nfssvc_init(glusterd_svc_t *svc) +{ + return glusterd_svc_init(svc, nfs_svc_name); +} + static int glusterd_nfssvc_create_volfile() { @@ -49,7 +57,7 @@ glusterd_nfssvc_create_volfile() }; glusterd_conf_t *conf = THIS->private; - glusterd_svc_build_volfile_path(conf->nfs_svc.name, conf->workdir, filepath, + glusterd_svc_build_volfile_path(nfs_svc_name, conf->workdir, filepath, sizeof(filepath)); return glusterd_create_global_volfile(build_nfs_graph, filepath, NULL); } @@ -60,7 +68,7 @@ glusterd_nfssvc_manager(glusterd_svc_t *svc, void *data, int flags) int ret = -1; if (!svc->inited) { - ret = glusterd_svc_init(svc, "nfs"); + ret = glusterd_nfssvc_init(svc); if (ret) { gf_msg(THIS->name, GF_LOG_ERROR, 0, GD_MSG_FAILED_INIT_NFSSVC, "Failed to init nfs service"); @@ -75,13 +83,6 @@ glusterd_nfssvc_manager(glusterd_svc_t *svc, void *data, int flags) if (ret) goto out; - /* not an error, or a (very) soft error at best */ - if (sys_access(XLATORDIR "/nfs/server.so", R_OK) != 0) { - gf_msg(THIS->name, GF_LOG_INFO, 0, GD_MSG_GNFS_XLATOR_NOT_INSTALLED, - "nfs/server.so xlator is not installed"); - goto out; - } - ret = glusterd_nfssvc_create_volfile(); if (ret) goto out; @@ -155,14 +156,6 @@ glusterd_nfssvc_reconfigure() priv = this->private; GF_VALIDATE_OR_GOTO(this->name, priv, out); - /* not an error, or a (very) soft error at best */ - if (sys_access(XLATORDIR "/nfs/server.so", R_OK) != 0) { - gf_msg(THIS->name, GF_LOG_INFO, 0, GD_MSG_GNFS_XLATOR_NOT_INSTALLED, - "nfs/server.so xlator is not installed"); - ret = 0; - goto out; - } - cds_list_for_each_entry(volinfo, &priv->volumes, vol_list) { if (GLUSTERD_STATUS_STARTED == volinfo->status) { -- 1.8.3.1