diff options
author | Amar Tumballi <amarts@redhat.com> | 2019-03-13 08:51:31 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-03-29 07:24:50 +0000 |
commit | c3fb394137769429a296a41160be8284e10d1412 (patch) | |
tree | b1be40aa772da613ac87f8fbf045e143bfc6af5b /xlators/mount | |
parent | 4a03a71c6171f6e8382664d9d29857d06ef37741 (diff) |
mount.glusterfs: change the error message
In scenarios where a mount fails before creating log file, doesn't
make sense to give message to 'check log file'. See below:
```
ERROR: failed to create logfile "/var/log/glusterfs/mnt.log" (No space left on device)
ERROR: failed to open logfile /var/log/glusterfs/mnt.log
Mount failed. Please check the log file for more details.
```
Fixes: bz#1688068
Change-Id: I1d837caa4f9bc9f1a37780783e95007e01ae4e3f
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/mount')
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index 243c9c71af4..68804c400c9 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -365,7 +365,10 @@ start_glusterfs () cmd_line=$(echo "$cmd_line $mount_point"); $cmd_line; if [ $? -ne 0 ]; then - warn "Mount failed. Please check the log file for more details." + # If this is true, then glusterfs process returned error without + # getting daemonized. We have made sure the logs are posted to + # 'stderr', so no need to point them to logfile. + warn "Mounting glusterfs on $mount_point failed." exit 1; fi @@ -373,7 +376,9 @@ start_glusterfs () inode=$( ${getinode} $mount_point 2>/dev/null); # this is required if the stat returns error if [ $? -ne 0 ]; then - warn "Mount failed. Please check the log file for more details." + # At this time, glusterfs got daemonized, and then later exited. + # These failures are only logged in log file. + warn "Mount failed. Check the log file ${log_file} for more details." umount $mount_point > /dev/null 2>&1; exit 1; fi |