[drbd-mc] Issues with LCMC v1.5.11

Lars Ellenberg lars.ellenberg at linbit.com
Tue Oct 15 14:37:58 CEST 2013


On Tue, Oct 15, 2013 at 01:22:52PM +0200, Rasto Levrinc wrote:
> On Tue, Oct 8, 2013 at 5:34 PM, Caspar Smit <c.smit at truebit.nl> wrote:
> > Hi Rasto,
> >
> > I have a relatively large list of issues with the latest LCMC
> >
> 
> Hi Caspar,
> 
> some of the issues I was able to fix for the next 1.5.12 release

Cool ;-)

> I've played with it a little bit. Eventually the drbdadm would have to
> be patched.
> Here's the patch, I think :)

Hm.
I see the issue, but I'm not yet sure I want it fixed,
or maybe just fixed in a different way...
I'll discuss this internally.

Thanks,

> From a38ed73550a2044805726e208e34a4f628301eed Mon Sep 17 00:00:00 2001
> From: Rasto Levrinc <rasto.levrinc at gmail.com>
> Date: Mon, 14 Oct 2013 23:32:04 +0200
> Subject: [PATCH] drbdadm: allow dump/-xml without configured resources
> 
> ---
>  user/drbdadm_main.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/user/drbdadm_main.c b/user/drbdadm_main.c
> index 170e71f..5f60d4e 100644
> --- a/user/drbdadm_main.c
> +++ b/user/drbdadm_main.c
> @@ -1012,6 +1012,9 @@ static int adm_dump(struct cfg_ctx *ctx)
>         struct d_host_info *host;
>         struct d_resource *res = ctx->res;
> 
> +       if (res == NULL)
> +               return 0;
> +
>         printI("# resource %s on %s: %s, %s\n",
>                esc(res->name), nodeinfo.nodename,
>                res->ignore ? "ignored" : "not ignored",
> @@ -1042,6 +1045,9 @@ static int adm_dump_xml(struct cfg_ctx *ctx)
>         struct d_host_info *host;
>         struct d_resource *res = ctx->res;
> 
> +       if (res == NULL)
> +               return 0;
> +
>         printI("<resource name=\"%s\" conf-file-line=\"%s:%u\">\n",
>                 esc_xml(res->name),
>                 esc_xml(res->config_file), res->start_line);
> @@ -4044,7 +4050,7 @@ int main(int argc, char **argv)
> 
>         ctx.arg = cmd->name;
>         if (cmd->res_name_required) {
> -               if (config == NULL) {
> +               if (config == NULL && !is_dump) {
>                         fprintf(stderr, "no resources defined!\n");
>                         exit(E_usage);
>                 }

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.


More information about the drbd-mc mailing list