Accepting request 318022 from home:wanghaisu:branches:network:ha-clustering:Factory

drbd split into user space drbd-utils and kernel module package. Update drbd-utils to 8.9.2 for - Fate#317940, speed up first initial sync.

OBS-URL: https://build.opensuse.org/request/show/318022
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd-utils?expand=0&rev=8
This commit is contained in:
nick wang 2015-07-23 09:07:53 +00:00 committed by Git OBS Bridge
parent d84e43448d
commit ec5e7407e0
11 changed files with 114 additions and 228 deletions

View File

@ -1,18 +0,0 @@
<services>
<service name="tar_scm">
<param name="url">git://git.linbit.com/drbd-utils.git</param>
<param name="scm">git</param>
<param name="filename">drbd-utils</param>
<param name="versionformat">8.9.2-rc2+git.%h</param>
<param name="revision">master</param>
</service>
<service name="recompress">
<param name="file">*drbd-utils*.tar</param>
<param name="compression">bz2</param>
</service>
<service name="set_version">
<param name="basename">drbd-utils</param>
</service>
</services>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed409fe5500e478a9cf1cc600016403272ddabfd1ca3261f68d53c8cc3688f1e
size 433215

View File

@ -1,160 +0,0 @@
#
# spec file for package drbd
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: drbd-utils
Version: 8.9.2rc2+git.faeb645
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: http://www.drbd.org/
Source: %{name}-%{version}.tar.bz2
Source1: drbd_buildtag.c
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff
Patch2: fix-libdir-in-Makefile.patch
Patch3: disable-sh-b-pri.patch
Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version}
Provides: drbd-udev = %{version}
Obsoletes: drbd-bash-completion < %{version}
Obsoletes: drbd-pacemaker < %{version}
Obsoletes: drbd-udev < %{version}
# drbd-utils first splict from drbd-8.4.5(only driver)
# and suse let drbd driver goes in-kernel
Provides: drbd = 8.4.5
Obsoletes: drbd < 8.4.5
%ifarch %ix86 x86_64
Provides: drbd-xen = %{version}
Obsoletes: drbd-xen < %{version}
%endif
BuildRequires: gcc
BuildRequires: make
BuildRequires: glibc-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libxslt
BuildRequires: udev
BuildRequires: docbook-xsl-stylesheets
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: systemd
Provides: drbd-control
Provides: drbdsetup
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): %insserv_prereq %fillup_prereq
Requires(preun): %insserv_prereq %fillup_prereq
Requires(postun): %insserv_prereq fileutils
%description
Drbd is a distributed replicated block device. It mirrors a block
device over the network to another machine. Think of it as networked
raid 1. It is a building block for setting up clusters.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp $RPM_SOURCE_DIR/drbd_buildtag.c user/shared/
%build
./autogen.sh
PATH=/sbin:$PATH ./configure \
--with-udev \
--with-distro=suse \
--without-heartbeat \
--with-pacemaker \
--with-xen \
--with-bashcompletion \
--with-initscripttype=systemd \
--with-systemdunitdir=/usr/lib/systemd/system \
--prefix=/ \
--sbindir=/sbin \
--libdir=/usr/lib \
--mandir=%{_mandir} \
--sysconfdir=%{_sysconfdir} \
--datarootdir=/usr/share \
--datadir=/usr/share \
--libdir=/usr/lib \
--exec_prefix=/usr/lib
make OPTFLAGS="%{optflags}" %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_localstatedir}/lib/drbd
%ifnarch %ix86 x86_64
rm -rf %{buildroot}%{_sysconfdir}/xen
%endif
mkdir -p %{buildroot}/usr/lib/udev/rules.d
mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules
%post
%service_add_post drbd.service
%preun
%service_del_preun drbd.service
%postun
%service_del_postun drbd.service
%files -n drbd-utils
%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/drbd.conf
%config %{_sysconfdir}/bash_completion.d/drbdadm.sh
%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
%doc %{_mandir}/man5/drbd.*
%doc %{_mandir}/man8/drbd*
%doc COPYING
%doc README
%doc ChangeLog
%doc scripts/drbd.conf
%dir %{_sysconfdir}/drbd.d
/sbin/drbdadm
/sbin/drbdsetup
/sbin/drbdmeta
/sbin/drbd-overview
%ifarch %ix86 x86_64
%dir %attr(700,root,root) %{_sysconfdir}/xen
%dir %{_sysconfdir}/xen/scripts
%{_sysconfdir}/xen/scripts/block-drbd
%endif
%{_prefix}/lib/ocf/resource.d/linbit/drbd
%dir /usr/lib/udev
%dir /usr/lib/udev/rules.d
/usr/lib/udev/rules.d/65-drbd.rules
%{_unitdir}/drbd.service
/usr/lib/systemd/system/drbd.service
%defattr(-, root, root)
%{_localstatedir}/lib/drbd
/usr/lib/drbd
/lib/drbd
/lib/drbd/drbdadm*
/lib/drbd/drbdsetup*
%dir %{_prefix}/lib/ocf
%dir %{_prefix}/lib/ocf/resource.d
%dir %{_prefix}/lib/ocf/resource.d/linbit
%changelog

View File

@ -1,13 +0,0 @@
Index: drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd.service
===================================================================
--- drbd-utils-8.9.2rc2+git.faeb645.orig/scripts/drbd.service
+++ drbd-utils-8.9.2rc2+git.faeb645/scripts/drbd.service
@@ -21,7 +21,7 @@ ExecStart=/sbin/drbdadm wait-connect all
# Switch resources to primary if applicable
# Better: disable this service unit, and use a cluster manger (pacemaker)
-ExecStart=/sbin/drbdadm sh-b-pri all
+# ExecStart=/sbin/drbdadm sh-b-pri all
# Deactivate all resources on stop
ExecStop=/sbin/drbdadm down all

3
drbd-utils-8.9.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ebbeed5f31cc27a7e10da889f60ff25ec67a3e4a2becf70ed06734e2678d38b2
size 761370

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f89e71344ffa5ce47ee09a7be7c38e28d173429eace3564065ec0f3456fba0c3
size 414613

View File

@ -1,3 +1,43 @@
-------------------------------------------------------------------
Thu Jul 23 02:28:37 UTC 2015 - nwang@suse.com
- Add Patch zap-devices-xml.patch for user space entrance
to zap-devices of new-current-uuid.
-------------------------------------------------------------------
Fri Apr 17 06:59:04 UTC 2015 - nwang@suse.com
- Upgrade to released v8.9.2 for Fate#317940
* change systemd unit file: basically just call the init script
* make some previously hardcoded timeouts configurable
* drbdadm: New command peer-device-options
* drbd 9: Move max_buffers to net_conf
* drbd 9: Log errors to syslog if stderr is not available
* init script: fixes for stacked resources
* fix regression corner cases in bitmap size calculation
* allow create-md to initialize peer-max-bio-size to 1M
* drbd 9: make transport selectable
* fix aggregating drbdsetup / drbdmeta exit statii
* some documentation fixes (content and build)
* added direct-connect command
* incompatible drbd-9 metadata format change. use: node_id as index for
peer_md instead of the bitmap_index
* drbdadm/meta/usage_cnt: ensure output is visible
* drbdsetup: fix arguments for all commands expecting a peer_device
* exit codes: redefine E_USAGE to 1 (not 3)
* some build changes
* init script: on start, first try to load the module
* drbdsetup events2: Improve how timestamps are assigned
* udev rules (symlinks in /dev/by-res and by-disk) got fixed
* Fixed upper limit for drbd-8.4 activity log entries
* many fixes to drbdadm adjust and proxy commands for drbd-9
* rhcs_fence: Do not invoke fence agents in parallel, rewrite in bash
* drbdsetup events2 is now also available in drbd-8.4 (backported from
drbd-9)
* reorganized the repository have common code for drbd-9, drbd-8.4
and drbd-8.3 only once
* Fix drbd.ocf for resources without volume 0
-------------------------------------------------------------------
Wed Feb 18 09:16:33 UTC 2015 - rgoldwyn@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package drbd
# spec file for package drbd-utils
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,20 +15,21 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: drbd-utils
Version: 8.9.2rc2+git.faeb645
Version: 8.9.2
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0+
Group: Productivity/Clustering/HA
Url: http://www.drbd.org/
Source: %{name}-%{version}.tar.bz2
Source1: drbd_buildtag.c
Source: http://oss.linbit.com/drbd/%{name}-%{version}.tar.gz
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: init-script-fixes.diff
Patch2: fix-libdir-in-Makefile.patch
Patch3: disable-sh-b-pri.patch
Patch2: fix-libdir-in-Makefile.patch
Patch3: zap-devices.patch
Patch4: zap-devices-xml.patch
Provides: drbd-bash-completion = %{version}
Provides: drbd-pacemaker = %{version}
@ -38,24 +39,24 @@ Obsoletes: drbd-pacemaker < %{version}
Obsoletes: drbd-udev < %{version}
# drbd-utils first splict from drbd-8.4.5(only driver)
# and suse let drbd driver goes in-kernel
Provides: drbd = 8.4.5
Obsoletes: drbd < 8.4.5
# Provides: drbd = 8.4.5
# Obsoletes: drbd < 8.4.5
%ifarch %ix86 x86_64
Provides: drbd-xen = %{version}
Obsoletes: drbd-xen < %{version}
%endif
BuildRequires: gcc
BuildRequires: make
BuildRequires: glibc-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libxslt
BuildRequires: udev
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: docbook-xsl-stylesheets
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: systemd
BuildRequires: flex
BuildRequires: gcc
BuildRequires: glibc-devel
BuildRequires: libxslt
BuildRequires: make
BuildRequires: systemd
BuildRequires: udev
Provides: drbd-control
Provides: drbdsetup
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -73,7 +74,7 @@ raid 1. It is a building block for setting up clusters.
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp $RPM_SOURCE_DIR/drbd_buildtag.c user/shared/
%patch4 -p1
%build
./autogen.sh
@ -94,11 +95,11 @@ PATH=/sbin:$PATH ./configure \
--datarootdir=/usr/share \
--datadir=/usr/share \
--libdir=/usr/lib \
--exec_prefix=/usr/lib
--exec_prefix=/usr/lib \
--with-tmpfilesdir=%{_tmpfilesdir}
make OPTFLAGS="%{optflags}" %{?_smp_mflags}
%install
%make_install
@ -110,6 +111,9 @@ rm -rf %{buildroot}%{_sysconfdir}/xen
mkdir -p %{buildroot}/usr/lib/udev/rules.d
mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.d/65-drbd.rules
%pre
%service_add_pre drbd.service
%post
%service_add_post drbd.service
@ -124,12 +128,13 @@ mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.
%config(noreplace) %{_sysconfdir}/drbd.conf
%config %{_sysconfdir}/bash_completion.d/drbdadm.sh
%config(noreplace) %{_sysconfdir}/drbd.d/global_common.conf
%{_tmpfilesdir}/drbd.conf
%doc %{_mandir}/man5/drbd.*
%doc %{_mandir}/man8/drbd*
%doc COPYING
%doc README
%doc ChangeLog
%doc scripts/drbd.conf
%doc scripts/drbd.conf.example
%dir %{_sysconfdir}/drbd.d
/sbin/drbdadm
/sbin/drbdsetup
@ -156,5 +161,4 @@ mv %{buildroot}/lib/udev/rules.d/65-drbd.rules* %{buildroot}/usr/lib/udev/rules.
%dir %{_prefix}/lib/ocf/resource.d
%dir %{_prefix}/lib/ocf/resource.d/linbit
%changelog

View File

@ -1,7 +0,0 @@
/* automatically generated. DO NOT EDIT. */
#include <linux/drbd.h>
const char *drbd_buildtag(void)
{
return "GIT-hash: faeb645ecbf334347e0512b4fa2d7549543b5b50"
" build by goldwyn@shrek.lan, 2015-02-18 01:51:25";
}

19
zap-devices-xml.patch Normal file
View File

@ -0,0 +1,19 @@
diff -Naur drbd-utils-8.9.2.orig/documentation/v84/drbdsetup.xml drbd-utils-8.9.2/documentation/v84/drbdsetup.xml
--- drbd-utils-8.9.2.orig/documentation/v84/drbdsetup.xml 2015-07-20 16:06:52.950294231 +0800
+++ drbd-utils-8.9.2/documentation/v84/drbdsetup.xml 2015-07-20 17:56:21.106826315 +0800
@@ -1694,6 +1694,15 @@
<para>Clears the sync bitmap in addition to generating a new current UUID.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>--zap-devices</option></term>
+
+ <listitem>
+ <para>Start to zeroing out the device on both side in addition to generating
+ a new current UUID .</para>
+ </listitem>
+ </varlistentry>
</variablelist></para>
<para>This can be used to skip the initial sync, if you want to start from scratch. This

24
zap-devices.patch Normal file
View File

@ -0,0 +1,24 @@
Index: drbd-utils-8.9.2/user/v84/config_flags.c
===================================================================
--- drbd-utils-8.9.2.orig/user/v84/config_flags.c
+++ drbd-utils-8.9.2/user/v84/config_flags.c
@@ -1019,6 +1019,7 @@ struct context_def new_current_uuid_cmd_
NLA_POLICY(new_c_uuid_parms),
.fields = {
{ "clear-bitmap", FLAG(clear_bm) },
+ { "zap-devices", FLAG(zap_devices) },
{ } },
};
Index: drbd-utils-8.9.2/user/v84/linux/drbd_genl.h
===================================================================
--- drbd-utils-8.9.2.orig/user/v84/linux/drbd_genl.h
+++ drbd-utils-8.9.2/user/v84/linux/drbd_genl.h
@@ -238,6 +238,7 @@ GENL_struct(DRBD_NLA_START_OV_PARMS, 9,
GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms,
__flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm)
+ __flg_field(2, DRBD_GENLA_F_MANDATORY, zap_devices)
)
GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms,