[ClusterLabs] Antw: [EXT] Re: cibadmin response unexpected

Reid Wahl nwahl at redhat.com
Wed Jan 18 03:15:57 EST 2023


On Tue, Jan 17, 2023 at 11:03 PM Ulrich Windl
<Ulrich.Windl at rz.uni-regensburg.de> wrote:
>
> >>> Reid Wahl <nwahl at redhat.com> schrieb am 18.01.2023 um 05:46 in Nachricht
> <CAPiuu99cmW9deg8=QmZkqB7fgtpotCYdFhxASDXoqOmi=n7S4A at mail.gmail.com>:
> > On Tue, Jan 17, 2023 at 7:17 PM d tbsky <tbskyd at gmail.com> wrote:
> >>
> >> Hi:
> >>    I am using RHEL 9.1 with pacemaker-cli-2.1.4-5. I tried command below:
> >>
> >> > cibadmin -Q -o xxx
> >>
> >> I expect the result tell me that "xxx" scope is not exist, but the
> >> command return the whole configuration. is this the normal behavior?
>
> It seems to be bad design: There should not have been output and there should
> have been an exit code != 0.

I'm inclined to agree.

> However as wrong usages seem to be out in the wild, so it cannot be fixed
> even. Very unfortunate.

There *may* be. Generally speaking, if something works (even if it
shouldn't work), we try not to break it until a designated backward
compatibility break.

> Building on such parts to make a reliable system is really a challenge!
> So for the future it's best to avoid releasing "quick & dirty" solutions IMHO
> 😉

Haha, that is certainly the goal. Bugs and poor designs will happen
(and more importantly *have* happened in the past), but we try to put
a fair amount of thought into new code. Of course, sometimes a hack is
the only way to get around choices that were made in the past, until a
compatibility break.

>
> >>
> >> thanks a lot for help.
> >
> > Yes -- we recently added a warning for invalid scope, but we can't
> > throw an error until a compatibility break. We have to preserve the
> > existing behavior until then.
> >
> > New warning:
> > Low: tools: Validate scope in cibadmin.c
> > (https://github.com/ClusterLabs/pacemaker/commit/0b5f8a24)
>
> IMHO trying to retrieve something that does not exist should output nothing
> AND prefrably an error exit code, too (see above).

That seems reasonable, but it has to wait.

There may be an occasionally valid use case for overriding an invalid
scope with --force (we can think about it more at a compatibility
break). There might not be though... any CIB op that ends up calling
pcmk_find_cib_element() will try (and fail) to look up the section in
the cib.c:cib_sections array.

>
> Regards,
> Ulrich
>
>
> >
> >>
> >> Regards,
> >> tbskyd
> >> _______________________________________________
> >> Manage your subscription:
> >> https://lists.clusterlabs.org/mailman/listinfo/users
> >>
> >> ClusterLabs home: https://www.clusterlabs.org/
> >>
> >
> >
> > --
> > Regards,
> >
> > Reid Wahl (He/Him)
> > Senior Software Engineer, Red Hat
> > RHEL High Availability - Pacemaker
> >
> > _______________________________________________
> > Manage your subscription:
> > https://lists.clusterlabs.org/mailman/listinfo/users
> >
> > ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



-- 
Regards,

Reid Wahl (He/Him)
Senior Software Engineer, Red Hat
RHEL High Availability - Pacemaker



More information about the Users mailing list