Bug 768005

Summary: gluster volume log filename commands creates directory instead of a file
Product: [Community] GlusterFS Reporter: Anush Shetty <ashetty>
Component: loggingAssignee: Amar Tumballi <amarts>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.2.5CC: gluster-bugs, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-07 11:03:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anush Shetty 2011-12-15 13:53:43 UTC
Description of problem: gluster volume log filename command is used to set the log file for corresponding volume/brick. When used, it creates a directory with the same name instead of a life.


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


How reproducible: gluster volume log filename volume-name brick-name /var/new-log.log


Steps to Reproduce:
1.  gluster volume log filename amitest ec2-174-129-105-24.compute-  1.amazonaws.com:/mnt/x4 /var/log/glusterfs/bricks/mnt-x4-testing.log

Actual results:

[root@ip-10-116-242-85 ~]# gluster volume log filename amitest ec2-174-129-105-24.compute-1.amazonaws.com:/mnt/x4 /var/log/glusterfs/bricks/mnt-x4-testing.log
log filename : successful
[root@ip-10-116-242-85 ~]# ls /var/log/glusterfs/bricks/mnt-x4-testing.log/

[root@ip-10-116-242-85 ~]# tail /var/log/glusterfs/bricks/mnt-x4-testing.log
tail: error reading `/var/log/glusterfs/bricks/mnt-x4-testing.log': Is a directory


Expected results:

/var/log/glusterfs/bricks/mnt-x4-testing.log should be the new logfile. 


Additional info:
help text for the command: volume log filename <VOLNAME> [BRICK] <PATH> - set the log file for corresponding volume/brick

Comment 1 Amar Tumballi 2011-12-19 06:22:24 UTC
Currently, this can be documented as a known issue. Because, the behavior of 'log filename' is to set the directory for the brick, and file name is always the brick's path...

In future (ie, 3.3.x onwards log-filename will not be available in CLI command set).

Comment 2 Amar Tumballi 2012-06-07 11:03:52 UTC
glusterfs-3.3.0 doesn't have 'gluster log filename'. Hence moving it as CLOSED UPSTREAM