mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
Add klog.InitFlags to main.go
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
3ec0f04c49
commit
49d0c23812
@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"github.com/ceph/ceph-csi/pkg/cephfs"
|
"github.com/ceph/ceph-csi/pkg/cephfs"
|
||||||
"github.com/ceph/ceph-csi/pkg/util"
|
"github.com/ceph/ceph-csi/pkg/util"
|
||||||
"github.com/golang/glog"
|
"k8s.io/klog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -42,21 +42,22 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
klog.InitFlags(nil)
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if err := createPersistentStorage(path.Join(cephfs.PluginFolder, "controller")); err != nil {
|
if err := createPersistentStorage(path.Join(cephfs.PluginFolder, "controller")); err != nil {
|
||||||
glog.Errorf("failed to create persistent storage for controller: %v", err)
|
klog.Errorf("failed to create persistent storage for controller: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := createPersistentStorage(path.Join(cephfs.PluginFolder, "node")); err != nil {
|
if err := createPersistentStorage(path.Join(cephfs.PluginFolder, "node")); err != nil {
|
||||||
glog.Errorf("failed to create persistent storage for node: %v", err)
|
klog.Errorf("failed to create persistent storage for node: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
cp, err := util.NewCachePersister(*metadataStorage, *driverName)
|
cp, err := util.NewCachePersister(*metadataStorage, *driverName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("failed to define cache persistence method: %v", err)
|
klog.Errorf("failed to define cache persistence method: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"github.com/ceph/ceph-csi/pkg/rbd"
|
"github.com/ceph/ceph-csi/pkg/rbd"
|
||||||
"github.com/ceph/ceph-csi/pkg/util"
|
"github.com/ceph/ceph-csi/pkg/util"
|
||||||
"github.com/golang/glog"
|
"k8s.io/klog"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -42,20 +42,21 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
klog.InitFlags(nil)
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if err := createPersistentStorage(path.Join(rbd.PluginFolder, "controller")); err != nil {
|
if err := createPersistentStorage(path.Join(rbd.PluginFolder, "controller")); err != nil {
|
||||||
glog.Errorf("failed to create persistent storage for controller %v", err)
|
klog.Errorf("failed to create persistent storage for controller %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if err := createPersistentStorage(path.Join(rbd.PluginFolder, "node")); err != nil {
|
if err := createPersistentStorage(path.Join(rbd.PluginFolder, "node")); err != nil {
|
||||||
glog.Errorf("failed to create persistent storage for node %v", err)
|
klog.Errorf("failed to create persistent storage for node %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
cp, err := util.NewCachePersister(*metadataStorage, *driverName)
|
cp, err := util.NewCachePersister(*metadataStorage, *driverName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("failed to define cache persistence method: %v", err)
|
klog.Errorf("failed to define cache persistence method: %v", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user