Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
王怀宗 authored and ShyamsundarR committed Apr 25, 2019
1 parent 08c1305 commit d05faf6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkg/cephfs/mountcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func mountOneCacheEntry(ce *controllerCacheEntry, me *volumeMountCacheEntry) err
klog.Errorf("mount-cache: failed to bind-mount volume %s: %s %s %v %v",
volID, me.StagingPath, targetPath, readOnly, err)
} else {
klog.Infof("mount-cache: successfully bind-mount volume %s: %s %s %v",
klog.Infof("mount-cache: successfully bind-mounted volume %s: %s %s %v",
volID, me.StagingPath, targetPath, readOnly)
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ func (mc *volumeMountCacheMap) nodeUnPublishVolume(volID string, targetPath stri
func (mc *volumeMountCacheMap) updateNodeCache(volID string) error {
me := volumeMountCache.volumes[volID]
if err := volumeMountCache.nodeCacheStore.Delete(genVolumeMountCacheFileName(volID)); err == nil {
klog.Infof("mount-cache: metadata notfound, delete mount cache failed for volume %s", volID)
klog.Infof("mount-cache: metadata not found, delete mount cache failed for volume %s", volID)
}
return mc.nodeCacheStore.Create(genVolumeMountCacheFileName(volID), me)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cephfs/mountcache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestEncodeDecodeCredentials(t *testing.T) {
deSecrets := decodeCredentials(enSecrets)
for key, value := range secrets {
if deSecrets[key] != value {
t.Errorf("key %s value %s not equal %s after encode decode", key, value, deSecrets[key])
t.Errorf("key %s of credentials's value %s change after decode %s ", key, value, deSecrets[key])
}
}
}
8 changes: 4 additions & 4 deletions pkg/cephfs/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (*NodeServer) mount(volOptions *volumeOptions, req *csi.NodeStageVolumeRequ
return status.Error(codes.Internal, err.Error())
}
if err := volumeMountCache.nodeStageVolume(req.GetVolumeId(), stagingTargetPath, req.GetSecrets()); err != nil {
klog.Warningf("mount-cache: failed stage volume %s %s: %v", volID, stagingTargetPath, err)
klog.Warningf("mount-cache: failed to stage volume %s %s: %v", volID, stagingTargetPath, err)
}
return nil
}
Expand Down Expand Up @@ -199,7 +199,7 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
}

if err := volumeMountCache.nodePublishVolume(volID, targetPath, req.GetReadonly()); err != nil {
klog.Warningf("mount-cache: failed publish volume %s %s: %v", volID, targetPath, err)
klog.Warningf("mount-cache: failed to publish volume %s %s: %v", volID, targetPath, err)
}

klog.Infof("cephfs: successfully bind-mounted volume %s to %s", volID, targetPath)
Expand All @@ -218,7 +218,7 @@ func (ns *NodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpu

volID := req.GetVolumeId()
if err = volumeMountCache.nodeUnPublishVolume(volID, targetPath); err != nil {
klog.Warningf("mount-cache: failed unpublish volume %s %s: %v", volID, targetPath, err)
klog.Warningf("mount-cache: failed to unpublish volume %s %s: %v", volID, targetPath, err)
}

// Unmount the bind-mount
Expand Down Expand Up @@ -246,7 +246,7 @@ func (ns *NodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag

volID := req.GetVolumeId()
if err = volumeMountCache.nodeUnStageVolume(volID); err != nil {
klog.Warningf("mount-cache: failed unstage volume %s %s: %v", volID, stagingTargetPath, err)
klog.Warningf("mount-cache: failed to unstage volume %s %s: %v", volID, stagingTargetPath, err)
}

// Unmount the volume
Expand Down

0 comments on commit d05faf6

Please sign in to comment.