Accepting request 405383 from network:ha-clustering:Factory
1 OBS-URL: https://build.opensuse.org/request/show/405383 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/drbd-utils?expand=0&rev=9
This commit is contained in:
commit
eaa9088ac0
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 29 01:54:54 UTC 2016 - nwang@suse.com
|
||||||
|
|
||||||
|
- bsc#986215, fix segfault of up a DRBD9 stacked resource.
|
||||||
|
- Add patch fix-segfault-up-stacked-resource.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 29 01:53:49 UTC 2016 - nwang@suse.com
|
||||||
|
|
||||||
|
- bsc#986784, fix DRBD9 stacked resource could not started by RA.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 8 13:04:00 UTC 2016 - lchiquitto@suse.de
|
Fri Apr 8 13:04:00 UTC 2016 - lchiquitto@suse.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package drbd-utils
|
# spec file for package drbd-utils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -32,6 +32,7 @@ Patch3: zeroout-discard-devices.patch
|
|||||||
Patch4: service-mod.patch
|
Patch4: service-mod.patch
|
||||||
Patch5: fence-after-pacemaker-down.patch
|
Patch5: fence-after-pacemaker-down.patch
|
||||||
Patch6: support-drbd9-ra.patch
|
Patch6: support-drbd9-ra.patch
|
||||||
|
Patch7: fix-segfault-up-stacked-resource.patch
|
||||||
|
|
||||||
Provides: drbd-bash-completion = %{version}
|
Provides: drbd-bash-completion = %{version}
|
||||||
Provides: drbd-pacemaker = %{version}
|
Provides: drbd-pacemaker = %{version}
|
||||||
@ -80,6 +81,7 @@ raid 1. It is a building block for setting up clusters.
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
49
fix-segfault-up-stacked-resource.patch
Normal file
49
fix-segfault-up-stacked-resource.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
diff -Naur drbd-utils-8.9.6.orig/user/v9/drbdadm.h drbd-utils-8.9.6/user/v9/drbdadm.h
|
||||||
|
--- drbd-utils-8.9.6.orig/user/v9/drbdadm.h 2016-06-23 18:20:40.608796513 +0800
|
||||||
|
+++ drbd-utils-8.9.6/user/v9/drbdadm.h 2016-06-23 18:21:18.828684887 +0800
|
||||||
|
@@ -388,6 +388,7 @@
|
||||||
|
extern void global_validate_maybe_expand_die_if_invalid(int expand, enum pp_flags flags);
|
||||||
|
extern struct d_option *new_opt(char *name, char *value);
|
||||||
|
extern int hostname_in_list(const char *name, struct names *names);
|
||||||
|
+extern bool hostnames_equal(const char *a, const char *b);
|
||||||
|
extern char *_names_to_str(char* buffer, struct names *names);
|
||||||
|
extern char *_names_to_str_c(char* buffer, struct names *names, char c);
|
||||||
|
#define NAMES_STR_SIZE 255
|
||||||
|
diff -Naur drbd-utils-8.9.6.orig/user/v9/drbdadm_postparse.c drbd-utils-8.9.6/user/v9/drbdadm_postparse.c
|
||||||
|
--- drbd-utils-8.9.6.orig/user/v9/drbdadm_postparse.c 2016-06-23 18:20:40.608796513 +0800
|
||||||
|
+++ drbd-utils-8.9.6/user/v9/drbdadm_postparse.c 2016-06-23 18:21:13.644700061 +0800
|
||||||
|
@@ -98,6 +98,21 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+struct d_host_info *find_host_info_by_fakename(struct d_resource* res, char *name)
|
||||||
|
+{
|
||||||
|
+ struct d_host_info *host;
|
||||||
|
+ char *concat_name;
|
||||||
|
+
|
||||||
|
+ for_each_host(host, &res->all_hosts) {
|
||||||
|
+ concat_name = strdup(names_to_str_c(&host->on_hosts, '_'));
|
||||||
|
+ if (hostnames_equal(name, concat_name))
|
||||||
|
+ return host;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
struct d_host_info *find_host_info_by_name(struct d_resource* res, char *name)
|
||||||
|
{
|
||||||
|
struct d_host_info *host;
|
||||||
|
@@ -403,7 +418,11 @@
|
||||||
|
if (conn->peer) {
|
||||||
|
host_info = conn->peer;
|
||||||
|
} else {
|
||||||
|
- host_info = find_host_info_by_name(res, candidate->name);
|
||||||
|
+ if (candidate->faked_hostname) {
|
||||||
|
+ host_info = find_host_info_by_fakename(res, candidate->name);
|
||||||
|
+ } else {
|
||||||
|
+ host_info = find_host_info_by_name(res, candidate->name);
|
||||||
|
+ }
|
||||||
|
conn->peer = host_info;
|
||||||
|
}
|
||||||
|
path->peer_address = candidate->address.addr ? &candidate->address : &host_info->address;
|
Loading…
x
Reference in New Issue
Block a user