Accepting request 221909 from home:goldwynr:branches:network:ha-clustering:Factory

bnc#862758

OBS-URL: https://build.opensuse.org/request/show/221909
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=79
This commit is contained in:
Tomáš Chvátal 2014-02-28 09:59:17 +00:00 committed by Git OBS Bridge
parent 3707eb58f0
commit f5ba048002
4 changed files with 61 additions and 6 deletions

View File

@ -3,7 +3,6 @@ From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Sat, 21 Dec 2013 18:41:04 -0600
Subject: [PATCH] Use cmap for getting cluster name
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
debugfs.ocfs2/Makefile | 2 +-
libo2cb/o2cb_abi.c | 79 +++++++++++++++++++++++++++-----------------------

View File

@ -0,0 +1,41 @@
From 1e041fdfb09bfc39aa37bea7d491bcf56794fa1c Mon Sep 17 00:00:00 2001
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
Date: Tue, 11 Feb 2014 10:54:23 -0600
Subject: [PATCH] Auto setup pcmk stack as default if no stack is setup
Note: This changes the default behavior from classic stack to pcmk
---
libo2cb/o2cb_abi.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index 5e0c4fb..26ea03e 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -172,7 +172,9 @@ static errcode_t determine_stack(void)
ssize_t len;
char line[100];
errcode_t err = O2CB_ET_SERVICE_UNAVAILABLE;
+ int setup_performed = 0;
+redo:
len = read_stack_file(line, sizeof(line));
if (len > 0) {
if (line[len - 1] == '\n') {
@@ -192,8 +194,11 @@ static errcode_t determine_stack(void)
err = 0;
}
} else if (len == -ENOENT) {
- current_stack = &classic_stack;
- err = 0;
+ if (!setup_performed) {
+ o2cb_setup_stack(OCFS2_PCMK_CLUSTER_STACK);
+ setup_performed = 1;
+ goto redo;
+ }
}
return err;
--
1.8.4

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Feb 11 16:57:54 UTC 2014 - rgoldwyn@suse.com
- Recommend ocfs2-kmp
- Autosetup pcmk if no cluster stack found (bnc#862758)
+ 0006-Auto-setup-pcmk-stack-as-default-if-no-stack-is-setu.patch
- Err if cannot write to cluster_stack (cluster mismatch)
+ 0003-Auto-setup-cluster_stack-based-on-what-is-on-disk.patch
-------------------------------------------------------------------
Mon Feb 10 12:32:37 UTC 2014 - rgoldwyn@suse.com
- Update summary and description for the -o2cb package (bnc#862761)
-------------------------------------------------------------------
Fri Jan 31 22:21:11 UTC 2014 - rgoldwyn@suse.com

View File

@ -52,6 +52,7 @@ Patch223: 0002-Remove-controld-dependency-in-group_join-leave.patch
Patch224: 0003-Auto-setup-cluster_stack-based-on-what-is-on-disk.patch
Patch225: 0004-mkfs.ocfs2-Abort-if-cluster-information-is-not-detec.patch
Patch226: 0005-mkfs-Setup-cluster_stack-if-not-setup-based-on-what-.patch
Patch227: 0006-Auto-setup-pcmk-stack-as-default-if-no-stack-is-setu.patch
BuildRequires: autoconf
BuildRequires: e2fsprogs-devel
@ -75,8 +76,7 @@ Requires: glib2 >= 2.2.3
Requires: modutils
Requires: net-tools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} < 1120
# There's no separate kmp for openSUSE 11.2
%if 0%{?suse_version} < 1320
Recommends: ocfs2-kmp
%endif
@ -130,15 +130,15 @@ This package contains the static libraries for developing low-level
OCFS2-aware applications.
%package o2cb
Summary: Oracle Cluster File System 2 Core Tools
Summary: Oracle Cluster File System 2 tools for the native o2cb stack
Group: System/Filesystems
Requires: ocfs2-tools = %{version}
%description o2cb
OCFS is the Oracle Cluster File System.
This package contains the core user-space tools needed for creating and
managing the file system.
This package contains the tools to manage the native o2cb stack for the
OCFS2 filesystem.
%prep
%setup -q -a 2
@ -168,6 +168,7 @@ managing the file system.
%patch224 -p1
%patch225 -p1
%patch226 -p1
%patch227 -p1
%build
export PROJECT="ocfs2-tools"