From 38273f879f07942db3c727275259fb0fd5456568 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 17:25:20 +0530 Subject: [PATCH] cephfs: replace fatal with util.FatalLog in Run replace fatal with util.FatalLog in Run for context based logging. Signed-off-by: Madhu Rajanna --- internal/cephfs/driver.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/cephfs/driver.go b/internal/cephfs/driver.go index 3e6d56ad1..280a96ac1 100644 --- a/internal/cephfs/driver.go +++ b/internal/cephfs/driver.go @@ -95,11 +95,11 @@ func (fs *Driver) Run(conf *util.Config) { // Configuration if err = loadAvailableMounters(conf); err != nil { - klog.Fatalf("cephfs: failed to load ceph mounters: %v", err) + util.FatalLogMsg("cephfs: failed to load ceph mounters: %v", err) } if err = util.WriteCephConfig(); err != nil { - klog.Fatalf("failed to write ceph configuration file: %v", err) + util.FatalLogMsg("failed to write ceph configuration file: %v", err) } // Use passed in instance ID, if provided for omap suffix naming @@ -114,7 +114,7 @@ func (fs *Driver) Run(conf *util.Config) { fs.cd = csicommon.NewCSIDriver(conf.DriverName, util.DriverVersion, conf.NodeID) if fs.cd == nil { - klog.Fatalln("failed to initialize CSI driver") + util.FatalLogMsg("failed to initialize CSI driver") } if conf.IsControllerServer || !conf.IsNodeServer { @@ -136,7 +136,7 @@ func (fs *Driver) Run(conf *util.Config) { if conf.IsNodeServer { topology, err = util.GetTopologyFromDomainLabels(conf.DomainLabels, conf.NodeID, conf.DriverName) if err != nil { - klog.Fatalln(err) + util.FatalLogMsg(err.Error()) } fs.ns = NewNodeServer(fs.cd, conf.Vtype, topology) } @@ -147,7 +147,7 @@ func (fs *Driver) Run(conf *util.Config) { if !conf.IsControllerServer && !conf.IsNodeServer { topology, err = util.GetTopologyFromDomainLabels(conf.DomainLabels, conf.NodeID, conf.DriverName) if err != nil { - klog.Fatalln(err) + util.FatalLogMsg(err.Error()) } fs.ns = NewNodeServer(fs.cd, conf.Vtype, topology) fs.cs = NewControllerServer(fs.cd)