Bug 1449861 - glusterd-geo-rep.c doesn't log stderr on failure to execute subprocesses
Summary: glusterd-geo-rep.c doesn't log stderr on failure to execute subprocesses
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-11 00:53 UTC by nh2
Modified: 2018-06-20 18:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-20 18:29:22 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description nh2 2017-05-11 00:53:27 UTC
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.

Comment 1 Shyamsundar 2018-06-20 18:29:22 UTC
This bug reported is against a version of Gluster that is no longer maintained
(or has been EOL'd). See https://www.gluster.org/release-schedule/ for the
versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline
gluster repository, request that it be reopened and the Version field be marked
appropriately.


Note You need to log in before you can comment on or make changes to this bug.