Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] [PATCH] drbdadm: Fix handler called from kernel always invalid for stacking resource
@ 2017-07-18  3:16 Nick Wang
  2017-07-18  8:22 ` Lars Ellenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Wang @ 2017-07-18  3:16 UTC (permalink / raw)
  To: drbd-dev; +Cc: Lars Ellenberg

Handler like "before-resync-target" called from kernel
space does not have "-S" option for stacking resource, it
always return as invalid usage for stacking resource in
normal mode, then the connection will be dropped. Add "-S"
option for stacking resource automatically if the handler
is called from kernel.

Signed-off-by: Nick Wang <nwang@suse.com>
CC: Lars Ellenberg <lars.ellenberg@linbit.com>
CC: drbd-dev@lists.linbit.com

---
 user/v9/drbdadm_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
index 3c6e2263..f6cd8b74 100644
--- a/user/v9/drbdadm_main.c
+++ b/user/v9/drbdadm_main.c
@@ -3472,6 +3472,9 @@ int main(int argc, char **argv)
 					       rv = E_USAGE;
 					continue;
 				}
+				if (3 == cmd->show_in_usage && ctx.res->stacked) {
+					is_drbd_top = 1;
+				}
 				if (is_drbd_top != ctx.res->stacked && !is_dump) {
 					err("'%s' is a %s resource, and not available in %s mode.\n",
 					    ctx.res->name,
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Drbd-dev] [PATCH] drbdadm: Fix handler called from kernel always invalid for stacking resource
  2017-07-18  3:16 [Drbd-dev] [PATCH] drbdadm: Fix handler called from kernel always invalid for stacking resource Nick Wang
@ 2017-07-18  8:22 ` Lars Ellenberg
  2017-07-18  9:35   ` Nick Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ellenberg @ 2017-07-18  8:22 UTC (permalink / raw)
  To: drbd-dev

On Tue, Jul 18, 2017 at 11:16:15AM +0800, Nick Wang wrote:
>Handler like "before-resync-target" called from kernel
>space does not have "-S" option for stacking resource, it
>always return as invalid usage for stacking resource in
>normal mode, then the connection will be dropped. Add "-S"
>option for stacking resource automatically if the handler
>is called from kernel.

I think the intention was to no longer have stacked with 9,
stacked was a kludge anyways, because that was the only way
to add additional nodes with a two-node only replication.

That we did not patch it out was probably just being lazy.


-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Drbd-dev] [PATCH] drbdadm: Fix handler called from kernel always invalid for stacking resource
  2017-07-18  8:22 ` Lars Ellenberg
@ 2017-07-18  9:35   ` Nick Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Wang @ 2017-07-18  9:35 UTC (permalink / raw)
  To: Lars Ellenberg, drbd-dev

>>> On 2017-7-18 at 16:22, in message <20170718082217.GD4122@soda.linbit>, Lars
Ellenberg <lars.ellenberg@linbit.com> wrote:
> On Tue, Jul 18, 2017 at 11:16:15AM +0800, Nick Wang wrote:
> >Handler like "before-resync-target" called from kernel
> >space does not have "-S" option for stacking resource, it
> >always return as invalid usage for stacking resource in
> >normal mode, then the connection will be dropped. Add "-S"
> >option for stacking resource automatically if the handler
> >is called from kernel.
> 
> I think the intention was to no longer have stacked with 9,
> stacked was a kludge anyways, because that was the only way
> to add additional nodes with a two-node only replication.
> 
Agree, it is more useful and effective in 8 stage:) Stack still can be 
used in some simple migration without changing any configuration,
for sure the meta data must be converted/replaced to 9 format.
But for two clusters (2 nodes per site) in long distance(cities), only 
need to replicate the same data once to the DR, which is more 
efficiency configure in a plain multiple nodes when the bandwidth 
hit the bottleneck.

And stack is worked with 9. It should not fail/drop connection due to 
an internal call for snapshot of resync target from kernel space.

> That we did not patch it out was probably just being lazy.

:)

Best regards,
Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-18  9:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18  3:16 [Drbd-dev] [PATCH] drbdadm: Fix handler called from kernel always invalid for stacking resource Nick Wang
2017-07-18  8:22 ` Lars Ellenberg
2017-07-18  9:35   ` Nick Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox