Add ceph and etcd mutex helpers for CTDB

Guenther
This commit is contained in:
Günther Deschner 2021-08-25 13:24:34 +02:00
parent 6410d154eb
commit fe6291ff86
2 changed files with 97 additions and 2 deletions

View File

@ -0,0 +1,30 @@
From 939aed0498269df3c1e012f3b68c314b583f25bd Mon Sep 17 00:00:00 2001
From: Martin Schwenke <martin@meltin.net>
Date: Tue, 27 Apr 2021 15:46:14 +1000
Subject: [PATCH] utils: Use Python 3
Due to the number of flake8 and pylint warnings it is unclear if the
source has Python 3 incompatibilities. These will be cleaned up in
subsequent commits.
Signed-off-by: "L.P.H. van Belle" <belle@bazuin.nl>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
---
ctdb/utils/etcd/ctdb_etcd_lock | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ctdb/utils/etcd/ctdb_etcd_lock b/ctdb/utils/etcd/ctdb_etcd_lock
index 000c6bb7208..7f5194eff0a 100755
--- a/ctdb/utils/etcd/ctdb_etcd_lock
+++ b/ctdb/utils/etcd/ctdb_etcd_lock
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--
2.31.1

View File

@ -46,18 +46,21 @@
%bcond_without winexe %bcond_without winexe
%endif %endif
# Build vfs_ceph module by default on 64bit Fedora # Build vfs_ceph module and ctdb cepth mutex helper by default on 64bit Fedora
%if 0%{?fedora} %if 0%{?fedora}
%ifarch aarch64 ppc64le s390x x86_64 %ifarch aarch64 ppc64le s390x x86_64
%bcond_without vfs_cephfs %bcond_without vfs_cephfs
%bcond_without ceph_mutex
%else %else
%bcond_with vfs_cephfs %bcond_with vfs_cephfs
%bcond_with ceph_mutex
#endifarch #endifarch
%endif %endif
%else %else
%bcond_with vfs_cephfs %bcond_with vfs_cephfs
%bcond_with ceph_mutex
#endif fedora #endif fedora
%endif %endif
@ -117,9 +120,16 @@
%bcond_with pcp_pmda %bcond_with pcp_pmda
%endif %endif
# Build the etcd helpers by default on Fedora
%if 0%{?fedora}
%bcond_without etcd_mutex
%else
%bcond_with etcd_mutex
%endif
%define samba_requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") %define samba_requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
%global baserelease 6 %global baserelease 7
%global samba_version 4.15.0 %global samba_version 4.15.0
%global talloc_version 2.3.3 %global talloc_version 2.3.3
@ -189,6 +199,7 @@ Source14: samba.pamd
Source201: README.downgrade Source201: README.downgrade
Patch0: samba-s4u.patch Patch0: samba-s4u.patch
Patch1: samba-ctdb-etcd-reclock.patch
Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupadd
Requires(post): systemd Requires(post): systemd
@ -299,6 +310,12 @@ BuildRequires: liburing-devel >= 0.4
%if %{with pcp_pmda} %if %{with pcp_pmda}
BuildRequires: pcp-libs-devel BuildRequires: pcp-libs-devel
%endif %endif
%if %{with ceph_mutex}
BuildRequires: librados-devel
%endif
%if %{with etcd_mutex}
BuildRequires: python3-etcd
%endif
%if %{with dc} || %{with testsuite} %if %{with dc} || %{with testsuite}
# Add python3-iso8601 to avoid that the # Add python3-iso8601 to avoid that the
@ -998,6 +1015,31 @@ Performance Co-Pilot (PCP) support for CTDB
#endif with pcp_pmda #endif with pcp_pmda
%endif %endif
%if %{with etcd_mutex}
%package -n ctdb-etcd-mutex
Summary: CTDB ETCD mutex helper
Requires: ctdb = %{samba_depver}
Requires: python3-etcd
%description -n ctdb-etcd-mutex
Support for using an existing ETCD cluster as a mutex helper for CTDB
#endif with etcd_mutex
%endif
%if %{with ceph_mutex}
%package -n ctdb-ceph-mutex
Summary: CTDB ceph mutex helper
Requires: ctdb = %{samba_depver}
%description -n ctdb-ceph-mutex
Support for using an existing CEPH cluster as a mutex helper for CTDB
#endif with ceph_mutex
%endif
#endif with clustering #endif with clustering
%endif %endif
@ -1090,6 +1132,12 @@ export LDFLAGS="%{__global_ldflags} -fuse-ld=gold"
%endif %endif
%if %{with pcp_pmda} %if %{with pcp_pmda}
--enable-pmda \ --enable-pmda \
%endif
%if %{with ceph_mutex}
--enable-ceph-reclock \
%endif
%if %{with etcd_mutex}
--enable-etcd-reclock \
%endif %endif
--with-profiling-data \ --with-profiling-data \
--with-systemd \ --with-systemd \
@ -3995,6 +4043,20 @@ fi
#endif with pcp_pmda #endif with pcp_pmda
%endif %endif
%if %{with etcd_mutex}
%files -n ctdb-etcd-mutex
%{_libexecdir}/ctdb/ctdb_etcd_lock
%{_mandir}/man7/ctdb-etcd.7.gz
#endif with etcd_mutex
%endif
%if %{with ceph_mutex}
%files -n ctdb-ceph-mutex
%{_libexecdir}/ctdb/ctdb_mutex_ceph_rados_helper
%{_mandir}/man7/ctdb_mutex_ceph_rados_helper.7.gz
#endif with ceph_mutex
%endif
#endif with clustering #endif with clustering
%endif %endif
@ -4006,6 +4068,9 @@ fi
%endif %endif
%changelog %changelog
* Wed Aug 25 2021 Guenther Deschner <gdeschner@redhat.com> - 4.15.0-0.7.rc2
- Add ceph and etcd mutex helpers for CTDB
* Mon Aug 16 2021 Anoop C S <anoopcs@samba.org> - 4.15.0-0.6.rc2 * Mon Aug 16 2021 Anoop C S <anoopcs@samba.org> - 4.15.0-0.6.rc2
- Avoid removing PyDSDB library files from buildroot for non AD DC build - Avoid removing PyDSDB library files from buildroot for non AD DC build