[Drbd-dev] DRBD8: drbdadm can't stat drbdsetup/drbdmeta

Lars Ellenberg Lars.Ellenberg at linbit.com
Fri Dec 1 19:36:32 CET 2006


/ 2006-12-01 09:17:36 -0500
\ Montrose, Ernest:
> Hi all,
> Looks like a bug was introduced where unless drbdadm is invoqued with
> the full path, it complains this way:
> "stat() of drbdsetup/drbmeta failed: no such file or directory."
> I am not sure why we don't just let the exec fail instead of verifying
> ahead.
> See sanity_check_cmd() and sanity_check_perm() in user/drbdadm_main.c.

reason is: we want to verify the validity of the configuration.
if you configure an outdate peer handler (and use our heartbeat plugin
implementation dopd), you must have the permissions set like that,
otherwise the configuration won't work as expected.

we probably should add "--check-perms" to both drbdmeta and drbdsetup,
and let drbdadm _call_ them via exec, instead of iterating over $PATH
ourselves...

and I think it should not exit(10) if stat does not work, anyways,
since the other thing is a warning only, too.

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :


More information about the drbd-dev mailing list