Bug 1535511

Summary: Gluster CLI shouldn't stop if log file couldn't be opened
Product: [Community] GlusterFS Reporter: M. Scherer <mscherer>
Component: cliAssignee: Amar Tumballi <atumball>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: atumball, bugs, chewi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-17 03:55:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description M. Scherer 2018-01-17 14:36:49 UTC
Description of problem:

When trying to test gluster cli or just see the help, I can't run it without being root, because it try to open /var/log/gluster.gluster.log

This is quite annoying (since I can't read the online help), and surprising. A cli tool usually do not write log or anything.


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

glusterfs-3.12.5-1.fc27.x86_64

How reproducible:

each time

Steps to Reproduce:

# su - nobody -s /bin/bash  -c 'gluster'
ERROR: failed to create logfile "/var/log/glusterfs/cli.log" (Permission denied)
ERROR: failed to open logfile /var/log/glusterfs/cli.log


1. gluster (as non root)
2.
3.

Actual results:

ERROR: failed to create logfile "/var/log/glusterfs/cli.log" (Permission denied)
ERROR: failed to open logfile /var/log/glusterfs/cli.log


Expected results:

Something else, like a more gracious message. Maybe some help.

Additional info:

Comment 1 James Le Cuirot 2018-09-24 16:19:53 UTC
This is possibly related to the geo-replication issue reported on the mailing list? I've encountered it too.

https://lists.gluster.org/pipermail/gluster-users/2018-July/034389.html

Comment 2 Worker Ant 2019-06-14 09:34:16 UTC
REVIEW: https://review.gluster.org/22865 (cli: don't fail if logging initialize fails) posted (#1) for review on master by Amar Tumballi

Comment 3 Worker Ant 2019-06-17 03:55:39 UTC
REVIEW: https://review.gluster.org/22865 (cli: don't fail if logging initialize fails) merged (#2) on master by Atin Mukherjee