Skip to content

Commit

Permalink
Merge pull request #270 from leakingtapan/log-level
Browse files Browse the repository at this point in the history
Update log verbosity and log message
  • Loading branch information
k8s-ci-robot committed Apr 5, 2019
2 parents ff7e5ab + 989a5a3 commit 5ac22b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/cloud/devicemanager/manager.go
Expand Up @@ -205,7 +205,7 @@ func (d *deviceManager) release(device *Device) error {
return fmt.Errorf("release on device %q assigned to different volume: %q vs %q", device.Path, device.VolumeID, existingVolumeID)
}

klog.V(5).Infof("Releasing in-process attachment entry: %v -> volume %s", device, device.VolumeID)
klog.V(5).Infof("Releasing in-process attachment entry: %v -> volume %s", device.Path, device.VolumeID)
d.inFlight.Del(nodeID, name)

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/controller.go
Expand Up @@ -342,7 +342,7 @@ func (d *controllerService) CreateSnapshot(ctx context.Context, req *csi.CreateS
if snapshot.SourceVolumeID != volumeID {
return nil, status.Errorf(codes.AlreadyExists, "Snapshot %s already exists for different volume (%s)", snapshotName, snapshot.SourceVolumeID)
} else {
klog.Infof("Snapshot %s of volume %s already exists; nothing to do", snapshotName, volumeID)
klog.V(4).Infof("Snapshot %s of volume %s already exists; nothing to do", snapshotName, volumeID)
return newCreateSnapshotResponse(snapshot)
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/driver/identity.go
Expand Up @@ -24,7 +24,7 @@ import (
)

func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) {
klog.V(4).Infof("GetPluginInfo: called with args %+v", *req)
klog.V(6).Infof("GetPluginInfo: called with args %+v", *req)
resp := &csi.GetPluginInfoResponse{
Name: DriverName,
VendorVersion: driverVersion,
Expand All @@ -34,7 +34,7 @@ func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoReques
}

func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error) {
klog.V(4).Infof("GetPluginCapabilities: called with args %+v", *req)
klog.V(6).Infof("GetPluginCapabilities: called with args %+v", *req)
resp := &csi.GetPluginCapabilitiesResponse{
Capabilities: []*csi.PluginCapability{
{
Expand Down
10 changes: 5 additions & 5 deletions pkg/driver/node.go
Expand Up @@ -112,7 +112,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
return nil, status.Error(codes.Internal, msg)
}
defer func() {
klog.Infof("NodeStageVolume: volume=%q operation finished", req.GetVolumeId())
klog.V(4).Infof("NodeStageVolume: volume=%q operation finished", req.GetVolumeId())
d.inFlight.Delete(req)
}()

Expand All @@ -126,7 +126,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
return nil, status.Errorf(codes.Internal, "Failed to find device path %s. %v", devicePath, err)
}

klog.Infof("NodeStageVolume: find device path %s -> %s", devicePath, source)
klog.V(4).Infof("NodeStageVolume: find device path %s -> %s", devicePath, source)

exists, err := d.mounter.ExistsPath(target)
if err != nil {
Expand All @@ -138,7 +138,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
// Otherwise we need to create the target directory.
if !exists {
// If target path does not exist we need to create the directory where volume will be staged
klog.Infof("NodeStageVolume: creating target dir %q", target)
klog.V(4).Infof("NodeStageVolume: creating target dir %q", target)
if err = d.mounter.MakeDir(target); err != nil {
msg := fmt.Sprintf("could not create target dir %q: %v", target, err)
return nil, status.Error(codes.Internal, msg)
Expand All @@ -156,7 +156,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
// If the volume corresponding to the volume_id is already staged to the staging_target_path,
// and is identical to the specified volume_capability the Plugin MUST reply 0 OK.
if device == source {
klog.Infof("NodeStageVolume: volume=%q already staged", volumeID)
klog.V(4).Infof("NodeStageVolume: volume=%q already staged", volumeID)
return &csi.NodeStageVolumeResponse{}, nil
}

Expand Down Expand Up @@ -337,7 +337,7 @@ func (d *nodeService) nodePublishVolumeForBlock(req *csi.NodePublishVolumeReques
return status.Errorf(codes.Internal, "Failed to find device path %s. %v", devicePath, err)
}

klog.Infof("NodePublishVolume [block]: find device path %s -> %s", devicePath, source)
klog.V(4).Infof("NodePublishVolume [block]: find device path %s -> %s", devicePath, source)

globalMountPath := filepath.Dir(target)

Expand Down

0 comments on commit 5ac22b7

Please sign in to comment.