Bug 1535511 - Gluster CLI shouldn't stop if log file couldn't be opened
Summary: Gluster CLI shouldn't stop if log file couldn't be opened
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Amar Tumballi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-17 14:36 UTC by M. Scherer
Modified: 2019-06-17 03:55 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-06-17 03:55:39 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 22865 0 None Merged cli: don't fail if logging initialize fails 2019-06-17 03:55:38 UTC

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


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