From bf7ec10fea37f590296f00e5211cacf9e3449708 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Fri, 8 Feb 2019 13:51:22 +0530 Subject: [PATCH] Remove glog from Gopkg.toml replace klog with glog Signed-off-by: Madhu Rajanna --- Gopkg.lock | 3 ++- Gopkg.toml | 4 ---- pkg/cephfs/cephconf.go | 4 ++-- pkg/cephfs/cephuser.go | 6 +++--- pkg/cephfs/volume.go | 6 +++--- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index d51ebb94f..f6322c559 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -531,7 +531,7 @@ analyzer-version = 1 input-imports = [ "github.com/container-storage-interface/spec/lib/go/csi", - "github.com/golang/glog", + "github.com/golang/protobuf/ptypes", "github.com/golang/protobuf/ptypes/timestamp", "github.com/kubernetes-csi/drivers/pkg/csi-common", "github.com/pborman/uuid", @@ -547,6 +547,7 @@ "k8s.io/client-go/kubernetes", "k8s.io/client-go/rest", "k8s.io/client-go/tools/clientcmd", + "k8s.io/klog", "k8s.io/kubernetes/pkg/util/keymutex", "k8s.io/kubernetes/pkg/util/mount", "k8s.io/kubernetes/pkg/util/nsenter", diff --git a/Gopkg.toml b/Gopkg.toml index 4523ec2c2..6a0a2d8c5 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -6,10 +6,6 @@ branch = "master" name = "github.com/kubernetes-csi/drivers" -[[constraint]] - branch = "master" - name = "github.com/golang/glog" - [[override]] revision = "5db89f0ca68677abc5eefce8f2a0a772c98ba52d" name = "github.com/docker/distribution" diff --git a/pkg/cephfs/cephconf.go b/pkg/cephfs/cephconf.go index d690d7eaa..bbba84f96 100644 --- a/pkg/cephfs/cephconf.go +++ b/pkg/cephfs/cephconf.go @@ -22,7 +22,7 @@ import ( "path" "text/template" - "github.com/golang/glog" + "k8s.io/klog" ) const cephConfig = `[global] @@ -91,7 +91,7 @@ func writeCephTemplate(fileName string, m os.FileMode, t *template.Template, dat defer func() { if err := f.Close(); err != nil { - glog.Errorf("failed to close file %s with error %s", f.Name(), err) + klog.Errorf("failed to close file %s with error %s", f.Name(), err) } }() diff --git a/pkg/cephfs/cephuser.go b/pkg/cephfs/cephuser.go index 9536b4483..65d83be9d 100644 --- a/pkg/cephfs/cephuser.go +++ b/pkg/cephfs/cephuser.go @@ -22,7 +22,7 @@ import ( "fmt" "os" - "github.com/golang/glog" + "k8s.io/klog" ) const ( @@ -120,12 +120,12 @@ func deleteCephUser(adminCr *credentials, volID volumeID) error { keyringPath := getCephKeyringPath(volID, userID) if err = os.Remove(keyringPath); err != nil { - glog.Errorf("failed to remove keyring file %s with error %s", keyringPath, err) + klog.Errorf("failed to remove keyring file %s with error %s", keyringPath, err) } secretPath := getCephSecretPath(volID, userID) if err = os.Remove(secretPath); err != nil { - glog.Errorf("failed to remove secret file %s with error %s", secretPath, err) + klog.Errorf("failed to remove secret file %s with error %s", secretPath, err) } return nil diff --git a/pkg/cephfs/volume.go b/pkg/cephfs/volume.go index 51d290dae..a2937965e 100644 --- a/pkg/cephfs/volume.go +++ b/pkg/cephfs/volume.go @@ -21,7 +21,7 @@ import ( "os" "path" - "github.com/golang/glog" + "k8s.io/klog" ) const ( @@ -141,10 +141,10 @@ func purgeVolume(volID volumeID, adminCr *credentials, volOptions *volumeOptions func umountAndRemove(mountPoint string) { var err error if err = unmountVolume(mountPoint); err != nil { - glog.Errorf("failed to unmount %s with error %s", mountPoint, err) + klog.Errorf("failed to unmount %s with error %s", mountPoint, err) } if err = os.Remove(mountPoint); err != nil { - glog.Errorf("failed to remove %s with error %s", mountPoint, err) + klog.Errorf("failed to remove %s with error %s", mountPoint, err) } }