aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-12-10 21:44:00 -0800
committerChris Lu <chris.lu@gmail.com>2019-12-10 22:09:29 -0800
commit5847c5afff765a14dbc0f89f09a27aedaa990dde (patch)
tree36c3a1627dd6bc4e348416401019cfa71a4fc3c7
parent3727d2488fac473bc49af8239c15f440e9552adb (diff)
downloadseaweedfs-5847c5afff765a14dbc0f89f09a27aedaa990dde.tar.xz
seaweedfs-5847c5afff765a14dbc0f89f09a27aedaa990dde.zip
return meaningful error log
-rw-r--r--weed/command/mount_std.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 9fde502d6..608e62332 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -12,14 +12,15 @@ import (
"strings"
"time"
+ "github.com/jacobsa/daemonize"
+ "github.com/spf13/viper"
+
"github.com/chrislusf/seaweedfs/weed/filesys"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/util"
- "github.com/jacobsa/daemonize"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
- "github.com/spf13/viper"
)
func runMount(cmd *Command, args []string) bool {
@@ -121,9 +122,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
c, err := fuse.Mount(dir, options...)
if err != nil {
- glog.Fatal(err)
+ glog.V(0).Infof("mount: %v", err)
daemonize.SignalOutcome(err)
- return false
+ return true
}
util.OnInterrupt(func() {
@@ -133,9 +134,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
filerGrpcAddress, err := parseFilerGrpcAddress(filer)
if err != nil {
- glog.Fatal(err)
+ glog.V(0).Infof("parseFilerGrpcAddress: %v", err)
daemonize.SignalOutcome(err)
- return false
+ return true
}
mountRoot := filerMountRootPath
@@ -170,8 +171,9 @@ func RunMount(filer, filerMountRootPath, dir, collection, replication, dataCente
// check if the mount process has an error to report
<-c.Ready
if err := c.MountError; err != nil {
- glog.Fatal(err)
+ glog.V(0).Infof("mount process: %v", err)
daemonize.SignalOutcome(err)
+ return true
}
return true