From 3bcf210a5a9b922ea78b31ef0de8eaf97ff4dcb4 Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Wed, 30 Jan 2019 14:24:14 +0530 Subject: rpm: add thin-arbiter package Discussion on thin arbiter volume - https://github.com/gluster/glusterfs/issues/352#issuecomment-350981148 Main idea of having this rpm package is to deploy thin-arbiter without glusterd and other commands on a node, and all we need on that tie-breaker node is to run a single glusterfs command. Also note that, no other glusterfs installation needs thin-arbiter.so. Make sure RPM contains sample vol file, which can work by default, and a script to configure that volfile, along with translator image. Change-Id: Ibace758373d8a991b6a19b2ecc60c93b2f8fc489 updates: bz#1672818 Signed-off-by: Amar Tumballi Signed-off-by: Ashish Pandey (cherry picked from commit ca9bef7f1538beb570fcb190ff94f86f0b8ba38a) --- glusterfs.spec.in | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'glusterfs.spec.in') diff --git a/glusterfs.spec.in b/glusterfs.spec.in index 20abd358be7..c655f16442e 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -177,6 +177,7 @@ # can't seem to make a generic macro that works %global glusterd_svcfile %{_unitdir}/glusterd.service %global glusterfsd_svcfile %{_unitdir}/glusterfsd.service +%global glusterta_svcfile %{_unitdir}/gluster-ta-volume.service %global glustereventsd_svcfile %{_unitdir}/glustereventsd.service %global glusterfssharedstorage_svcfile %{_unitdir}/glusterfssharedstorage.service %else @@ -639,6 +640,18 @@ is in user space and easily manageable. This package provides the glusterfs server daemon. %endif +%package thin-arbiter +Summary: GlusterFS thin-arbiter module +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-server%{?_isa} = %{version}-%{release} + +%description thin-arbiter +This package provides a tie-breaker functionality to GlusterFS +replicate volume. It includes translators required to provide the +functionality, and also few other scripts required for getting the setup done. + +This package provides the glusterfs thin-arbiter translator. + %package client-xlators Summary: GlusterFS client-side translators @@ -978,6 +991,14 @@ fi exit 0 %endif +%preun thin-arbiter +if [ $1 -eq 0 ]; then + if [ -f %glusterta_svcfile ]; then + %service_stop gluster-ta-volume + %systemd_preun gluster-ta-volume + fi +fi + ##----------------------------------------------------------------------------- ## All %%postun should be placed here and keep them sorted ## @@ -1134,6 +1155,19 @@ exit 0 %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 + %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/thin-arbiter.so +%dir %{_datadir}/glusterfs/scripts + %{_datadir}/glusterfs/scripts/setup-thin-arbiter.sh +%config %{_sysconfdir}/glusterfs/thin-arbiter.vol + +%if ( 0%{?_with_systemd:1} ) +%{_unitdir}/gluster-ta-volume.service +%endif + + %if ( 0%{!?_without_georeplication:1} ) %files geo-replication %config(noreplace) %{_sysconfdir}/logrotate.d/glusterfs-georep @@ -1212,6 +1246,7 @@ exit 0 %doc extras/clear_xattrs.sh # sysconf %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 @@ -1248,7 +1283,6 @@ exit 0 %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator %dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/arbiter.so - %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/thin-arbiter.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bit-rot.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/bitrot-stub.so %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/features/sdfs.so @@ -1389,6 +1423,9 @@ exit 0 * Mon Mar 4 2019 Kaleb S. KEITHLEY - s390x has RDMA, since around Fedora 27 and in RHEL7 since June 2016. +* Tue Feb 26 2019 Ashish Pandey +- Add thin-arbiter package + * Sun Feb 24 2019 Aravinda VK - Renamed events package to gfevents -- cgit