Skip to content

Commit

Permalink
upgrade driver-ready set failure to warns
Browse files Browse the repository at this point in the history
  • Loading branch information
dysosmus committed May 4, 2021
1 parent 32c4754 commit 3a4bf25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewGCSDriver(name, node, endpoint string, version string, deleteOrphanedPod
func (d *GCSDriver) Run() error {
// set the driver-ready label to false at the beginning to handle edge-case where the controller didn't terminated gracefully
if err := util.SetDriverReadyLabel(d.nodeName, false); err != nil {
klog.V(4).Infof("Unable to set driver-ready=false label on the node, error: %v", err)
klog.Warningf("Unable to set driver-ready=false label on the node, error: %v", err)
}

if len(d.mountPoint) == 0 {
Expand Down Expand Up @@ -81,15 +81,15 @@ func (d *GCSDriver) Run() error {
csi.RegisterNodeServer(d.server, d)
csi.RegisterControllerServer(d.server, d)
if err = util.SetDriverReadyLabel(d.nodeName, true); err != nil {
klog.V(4).Infof("unable to set driver-ready=true label on the node, error: %v", err)
klog.Warningf("unable to set driver-ready=true label on the node, error: %v", err)
}
return d.server.Serve(listener)
}

func (d *GCSDriver) stop() {
d.server.Stop()
if err := util.SetDriverReadyLabel(d.nodeName, false); err != nil {
klog.V(4).Infof("Unable to set driver-ready=false label on the node, error: %v", err)
klog.Warningf("Unable to set driver-ready=false label on the node, error: %v", err)
}
klog.V(1).Info("CSI driver stopped")
}
Expand Down

0 comments on commit 3a4bf25

Please sign in to comment.