[Bugs] [Bug 1449861] New: glusterd-geo-rep.c doesn' t log stderr on failure to execute subprocesses

bugzilla at redhat.com bugzilla at redhat.com
Thu May 11 00:53:27 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1449861

            Bug ID: 1449861
           Summary: glusterd-geo-rep.c doesn't log stderr on failure to
                    execute subprocesses
           Product: GlusterFS
           Version: 3.10
         Component: core
          Assignee: bugs at gluster.org
          Reporter: nh2-redhatbugzilla at deditus.de
                CC: bugs at gluster.org



Description of problem:

glusterd-geo-rep, and potentially other code, doesn't log stderr on failure to
execute subprocesses.

This makes it hard to debug issues, especially when packaging gluster.

For example, if `glusterd` is started with a wrong PATH environment variable,
then when `glusterd_op_sys_exec()` runs `peer_georep-sshkey.py node-generate .`
which tries to `execute( ["gluster", "system::", "uuid", "get", "--xml"] )`,
then `gluster` can't be found.

In the above case, the only error message logged is the extremely unhelpful
`Unable to end. Error : Success`. This is simply because glusterd-geo-rep.c
simply doesn't do anything with the stderr of the invoked program, even on
failure. Had it read and logged the stderr, it would contain the very useful
"No such file or directory" that would have hinted immediately at what the
problem is.

I believe `glusterd_op_sys_exec()` (and all other code in gluster that uses
run.c) should log the stderr when an invoked command fails.

Version-Release number of selected component (if applicable):

3.10.1

Further information:

I found this issue here:
https://github.com/NixOS/nixpkgs/issues/25620#issuecomment-300648507

The topic is made even worse by
https://bugzilla.redhat.com/show_bug.cgi?id=1449416 -- that's why in my example
it incorrectly prints "Success" despite failing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list