Hello community,

here is the log from the commit of package drbd-utils for openSUSE:Factory 
checked in at 2018-02-06 16:47:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd-utils (Old)
 and      /work/SRC/openSUSE:Factory/.drbd-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drbd-utils"

Tue Feb  6 16:47:28 2018 rev:21 rq:572491 version:9.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd-utils/drbd-utils.changes    2018-01-22 
16:21:09.546523360 +0100
+++ /work/SRC/openSUSE:Factory/.drbd-utils.new/drbd-utils.changes       
2018-02-06 16:47:29.776722898 +0100
@@ -1,0 +2,9 @@
+Mon Feb  5 07:09:33 UTC 2018 - [email protected]
+
+- bsc#1077176, pass the string to backend. 
+- bsc#1058770, fix kernel trace while starting
+  sync stacked drbd
+- Add patch Fix-no-bitmap-allocate-for-stacked-res.patch
+- Add patch Support-pass-force-to-dump-md.patch
+
+-------------------------------------------------------------------

New:
----
  Fix-no-bitmap-allocate-for-stacked-res.patch
  Support-pass-force-to-dump-md.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ drbd-utils.spec ++++++
--- /var/tmp/diff_new_pack.Tqaxy5/_old  2018-02-06 16:47:30.456691081 +0100
+++ /var/tmp/diff_new_pack.Tqaxy5/_new  2018-02-06 16:47:30.460690893 +0100
@@ -37,6 +37,8 @@
 Patch6:         fix_call_khelper_with_stack.patch
 Patch7:         move_fencing_from_disk_to_net_in_example.patch
 Patch8:         skip_sh-b-pri_in_v9.patch
+Patch9:         Fix-no-bitmap-allocate-for-stacked-res.patch
+Patch10:        Support-pass-force-to-dump-md.patch
 
 Provides:       drbd-bash-completion = %{version}
 Provides:       drbd-pacemaker = %{version}
@@ -87,6 +89,8 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
+%patch10 -p1
 
 %build
 export WANT_DRBD_REPRODUCIBLE_BUILD=1

++++++ Fix-no-bitmap-allocate-for-stacked-res.patch ++++++
>From b5eab810ded459792c24a4bc5db5ce272ea1ee15 Mon Sep 17 00:00:00 2001
From: Philipp Reisner <[email protected]>
Date: Fri, 26 Jan 2018 16:09:01 +0100
Subject: [PATCH] v9,drbdadm,stacking: Fix setting the disk in stacked host
sections

This got broken on the long way from drbd-8.4 to 9.
---

diff --git a/user/v9/drbdadm_postparse.c b/user/v9/drbdadm_postparse.c
index 1cefd5c2..b9e90de8 100644
--- a/user/v9/drbdadm_postparse.c
+++ b/user/v9/drbdadm_postparse.c
@@ -493,9 +493,9 @@ void set_peer_in_resource(struct d_resource* res, int 
peer_required)
                add_no_bitmap_opt(res);
 }
 
-void set_disk_in_res(struct d_resource *res)
+void set_stacked_disk_in_res(struct d_resource *res)
 {
-       struct d_host_info *host;
+       struct d_host_info *host, *lower_host;
        struct d_volume *a, *b;
 
        if (res->ignore)
@@ -505,41 +505,39 @@ void set_disk_in_res(struct d_resource *res)
                if (!host->lower)
                        continue;
 
-               if (host->lower->ignore)
-                       continue;
-
-               check_volume_sets_equal(res, host, host->lower->me);
-               if (!config_valid)
-                       /* don't even bother for broken config. */
-                       continue;
+               for_each_host(lower_host, &host->lower->all_hosts) {
+                       check_volume_sets_equal(res, host, lower_host);
+                       if (!config_valid)
+                               /* don't even bother for broken config. */
+                               continue;
 
-               /* volume lists are sorted on vnr */
-               a = STAILQ_FIRST(&host->volumes);
-               b = STAILQ_FIRST(&host->lower->me->volumes);
-               while (a) {
-                       while (b && a->vnr > b->vnr) {
-                               /* Lower resource has more volumes.
-                                * Probably unusual, but we decided
-                                * that it should be legal.
-                                * Skip those that do not match */
-                               b = STAILQ_NEXT(b, link);
-                       }
-                       if (a && b && a->vnr == b->vnr) {
-                               if (b->device)
-                                       m_asprintf(&a->disk, "%s", b->device);
-                               else
-                                       m_asprintf(&a->disk, "/dev/drbd%u", 
b->device_minor);
-                               /* stacked implicit volumes need internal meta 
data, too */
-                               if (!a->meta_disk)
-                                       m_asprintf(&a->meta_disk, "internal");
-                               if (!a->meta_index)
-                                       m_asprintf(&a->meta_index, "internal");
-                               a = STAILQ_NEXT(a, link);
-                               b = STAILQ_NEXT(b, link);
-                       } else {
-                               /* config_invalid should have been set
-                                * by check_volume_sets_equal */
-                               assert(0);
+                       a = STAILQ_FIRST(&host->volumes);
+                       b = STAILQ_FIRST(&lower_host->volumes);
+                       while (a) {
+                               while (b && a->vnr > b->vnr) {
+                                       /* Lower resource has more volumes.
+                                        * Probably unusual, but we decided
+                                        * that it should be legal.
+                                        * Skip those that do not match */
+                                       b = STAILQ_NEXT(b, link);
+                               }
+                               if (a && b && a->vnr == b->vnr) {
+                                       if (b->device)
+                                               m_asprintf(&a->disk, "%s", 
b->device);
+                                       else
+                                               m_asprintf(&a->disk, 
"/dev/drbd%u", b->device_minor);
+                                       /* stacked implicit volumes need 
internal meta data, too */
+                                       if (!a->meta_disk)
+                                               m_asprintf(&a->meta_disk, 
"internal");
+                                       if (!a->meta_index)
+                                               m_asprintf(&a->meta_index, 
"internal");
+                                       a = STAILQ_NEXT(a, link);
+                                       b = STAILQ_NEXT(b, link);
+                               } else {
+                                       /* config_invalid should have been set
+                                        * by check_volume_sets_equal */
+                                       assert(0);
+                               }
                        }
                }
        }
@@ -1140,7 +1138,7 @@ void post_parse(struct resources *resources, enum 
pp_flags flags)
        // Needs "me" set already
        for_each_resource(res, resources)
                if (res->stacked_on_one)
-                       set_disk_in_res(res);
+                       set_stacked_disk_in_res(res);
 
        for_each_resource(res, resources)
                fixup_peer_devices(res);
++++++ Support-pass-force-to-dump-md.patch ++++++
drbdadm : Support pass force option to dump md

At least till v8.9.6, drbdadm dump-md support
"--force" option to dump the metadata (might
stale) while the device still running.

drbdmeta still able to dump but drbdadm 
will show "unrecognized option" 

diff -Naur drbd-utils-9.0.0.orig/user/v9/config_flags.c 
drbd-utils-9.0.0/user/v9/config_flags.c
--- drbd-utils-9.0.0.orig/user/v9/config_flags.c        2018-01-25 
10:49:04.419550855 +0800
+++ drbd-utils-9.0.0/user/v9/config_flags.c     2018-01-25 10:51:53.412986007 
+0800
@@ -1081,6 +1081,12 @@
                { } },
 };
 
+struct context_def dump_md_ctx = {
+       .fields = {
+               { .name = "force", .argument_is_optional = true },
+               { } },
+};
+
 struct context_def adjust_ctx = {
        .fields = {
                { "skip-disk", .argument_is_optional = true },
diff -Naur drbd-utils-9.0.0.orig/user/v9/config_flags.h 
drbd-utils-9.0.0/user/v9/config_flags.h
--- drbd-utils-9.0.0.orig/user/v9/config_flags.h        2018-01-25 
10:49:04.419550855 +0800
+++ drbd-utils-9.0.0/user/v9/config_flags.h     2018-01-25 10:51:37.420850181 
+0800
@@ -100,6 +100,7 @@
 extern struct context_def device_options_ctx;
 extern struct context_def invalidate_ctx;
 extern struct context_def create_md_ctx;
+extern struct context_def dump_md_ctx;
 extern struct context_def adjust_ctx;
 extern struct context_def peer_device_options_ctx;
 extern struct context_def handlers_ctx;
diff -Naur drbd-utils-9.0.0.orig/user/v9/drbdadm_main.c 
drbd-utils-9.0.0/user/v9/drbdadm_main.c
--- drbd-utils-9.0.0.orig/user/v9/drbdadm_main.c        2018-01-25 
10:49:04.419550855 +0800
+++ drbd-utils-9.0.0/user/v9/drbdadm_main.c     2018-01-25 10:49:44.659892592 
+0800
@@ -357,7 +357,7 @@
 static struct adm_cmd create_md_cmd = {"create-md", adm_create_md, 
&create_md_ctx, ACF1_MINOR_ONLY };
 static struct adm_cmd show_gi_cmd = {"show-gi", adm_setup_and_meta, 
ACF1_PEER_DEVICE .disk_required = 1};
 static struct adm_cmd get_gi_cmd = {"get-gi", adm_setup_and_meta, 
ACF1_PEER_DEVICE .disk_required = 1};
-static struct adm_cmd dump_md_cmd = {"dump-md", adm_drbdmeta, ACF1_MINOR_ONLY 
};
+static struct adm_cmd dump_md_cmd = {"dump-md", adm_drbdmeta, &dump_md_ctx, 
ACF1_MINOR_ONLY };
 static struct adm_cmd wipe_md_cmd = {"wipe-md", adm_drbdmeta, ACF1_MINOR_ONLY 
};
 static struct adm_cmd apply_al_cmd = {"apply-al", adm_drbdmeta, 
ACF1_MINOR_ONLY };
 static struct adm_cmd forget_peer_cmd = {"forget-peer", adm_forget_peer, 
ACF1_DISCONNECT };

Reply via email to