cleanup: fix mispell words

fixed mispell words in the repo.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2020-11-24 17:24:29 +05:30
committed by Madhu Rajanna
parent eee49a6e0a
commit 39b1f2b4d3
28 changed files with 51 additions and 51 deletions

View File

@ -69,7 +69,7 @@ func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volO
util.ErrorLog(ctx, "failed to delete volume %s: %v", cloneID, err)
}
if err = unprotectSnapshot(ctx, parentvolOpt, cr, snapshotID, volID); err != nil {
// Incase the snap is already unprotected we get ErrSnapProtectionExist error code
// In case the snap is already unprotected we get ErrSnapProtectionExist error code
// in that case we are safe and we could discard this error and we are good to go
// ahead with deletion
if !errors.Is(err, ErrSnapProtectionExist) {
@ -118,7 +118,7 @@ func createCloneFromSubvolume(ctx context.Context, volID, cloneID volumeID, volO
}
// As we completed clone, remove the intermediate snap
if err = unprotectSnapshot(ctx, parentvolOpt, cr, snapshotID, volID); err != nil {
// Incase the snap is already unprotected we get ErrSnapProtectionExist error code
// In case the snap is already unprotected we get ErrSnapProtectionExist error code
// in that case we are safe and we could discard this error and we are good to go
// ahead with deletion
if !errors.Is(err, ErrSnapProtectionExist) {

View File

@ -185,7 +185,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
// while cloning the volume the size is not populated properly to the new volume now.
// it will be fixed in cephfs soon with the parentvolume size. Till then by below
// resize we are making sure we return or satisfy the requested size by setting the size
// explictly
// explicitly
err = volOptions.resizeVolume(ctx, volumeID(vID.FsSubvolName), volOptions.Size)
if err != nil {
purgeErr := purgeVolume(ctx, volumeID(vID.FsSubvolName), cr, volOptions, false)

View File

@ -207,7 +207,7 @@ func unprotectSnapshot(ctx context.Context, volOptions *volumeOptions, cr *util.
"ceph",
args[:]...)
if err != nil {
// Incase the snap is already unprotected we get ErrSnapProtectionExist error code
// In case the snap is already unprotected we get ErrSnapProtectionExist error code
// in that case we are safe and we could discard this error.
if strings.Contains(err.Error(), snapProtectionExist) {
return nil

View File

@ -152,7 +152,7 @@ func genSnapFromOptions(ctx context.Context, req *csi.CreateSnapshotRequest) (sn
func parseTime(ctx context.Context, createTime string) (*timestamp.Timestamp, error) {
tm := &timestamp.Timestamp{}
layout := "2006-01-02 15:04:05.000000"
// TODO currently parsing of timestamp to time.ANSIC generate from ceph fs is failng
// TODO currently parsing of timestamp to time.ANSIC generate from ceph fs is failing
var t time.Time
t, err := time.Parse(layout, createTime)
if err != nil {

View File

@ -96,7 +96,7 @@ func (vo *volumeOptions) getSubVolumeInfo(ctx context.Context, volID volumeID) (
if strings.HasPrefix(err.Error(), volumeNotFound) {
return nil, ErrVolumeNotFound
}
// Incase the error is other than invalid command return error to the caller.
// In case the error is other than invalid command return error to the caller.
if !strings.Contains(err.Error(), invalidCommand) {
return nil, ErrInvalidCommand
}
@ -202,7 +202,7 @@ func (vo *volumeOptions) resizeVolume(ctx context.Context, volID volumeID, bytes
clusterAdditionalInfo[vo.ClusterID].resizeSupported = true
return nil
}
// Incase the error is other than invalid command return error to the caller.
// In case the error is other than invalid command return error to the caller.
if !strings.Contains(err.Error(), invalidCommand) {
util.ErrorLog(ctx, "failed to resize subvolume %s in fs %s: %s", string(volID), vo.FsName, err)
return err

View File

@ -66,7 +66,7 @@ func (ns *DefaultNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetIn
}, nil
}
// NodeGetCapabilities returns RPC unknow capability.
// NodeGetCapabilities returns RPC unknown capability.
func (ns *DefaultNodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error) {
util.TraceLog(ctx, "Using default NodeGetCapabilities")
@ -116,7 +116,7 @@ func (ns *DefaultNodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.No
if err != nil {
if os.IsNotExist(err) {
return nil, status.Errorf(codes.InvalidArgument, "targetpath %s doesnot exist", targetPath)
return nil, status.Errorf(codes.InvalidArgument, "targetpath %s does not exist", targetPath)
}
return nil, err
}

View File

@ -73,7 +73,7 @@ When a volume create request is received (or a snapshot create, the snapshot is
it is used to read its references to reach the UUID that backs this VolName, to check if the
UUID based volume can satisfy the requirements for the request
- If during the process of checking the same, it is found that some linking information is stale
or missing, the corresponding keys upto the key in the csiDirectory is cleaned up, to start afresh
or missing, the corresponding keys up to the key in the csiDirectory is cleaned up, to start afresh
- If the key with the CO VolName is not found, or was cleaned up, the request is treated as a
new create request, and an CephUUIDDirectory is created first with a generated uuid, this ensures

View File

@ -110,7 +110,7 @@ func (rv *rbdVolume) checkCloneImage(ctx context.Context, parentVol *rbdVolume)
}
return true, nil
}
// as the temp clone doesnot exists,check snapshot exists on parent volume
// as the temp clone does not exist,check snapshot exists on parent volume
// snapshot name is same as temporary clone image
snap.RbdImageName = tempClone.RbdImageName
err = parentVol.checkSnapExists(snap)

View File

@ -545,7 +545,7 @@ func checkContentSource(ctx context.Context, req *csi.CreateVolumeRequest, cr *u
if !errors.Is(err, ErrSnapNotFound) {
return nil, nil, status.Error(codes.Internal, err.Error())
}
return nil, nil, status.Errorf(codes.NotFound, "%s snapshot doesnot exists", snapshotID)
return nil, nil, status.Errorf(codes.NotFound, "%s snapshot does not exist", snapshotID)
}
return nil, rbdSnap, nil
case *csi.VolumeContentSource_Volume:
@ -564,7 +564,7 @@ func checkContentSource(ctx context.Context, req *csi.CreateVolumeRequest, cr *u
if !errors.Is(err, ErrImageNotFound) {
return nil, nil, status.Error(codes.Internal, err.Error())
}
return nil, nil, status.Errorf(codes.NotFound, "%s image doesnot exists", volID)
return nil, nil, status.Errorf(codes.NotFound, "%s image does not exist", volID)
}
return rbdvol, nil, nil
}

View File

@ -492,7 +492,7 @@ func (rv *rbdVolume) flattenRbdImage(ctx context.Context, cr *util.Credentials,
supported, err := addRbdManagerTask(ctx, rv, args)
if supported {
if err != nil {
// discard flattening error if the image doesnot have any parent
// discard flattening error if the image does not have any parent
rbdFlattenNoParent := fmt.Sprintf("Image %s/%s does not have a parent", rv.Pool, rv.RbdImageName)
if strings.Contains(err.Error(), rbdFlattenNoParent) {
return nil

View File

@ -55,7 +55,7 @@ func (e errorPair) Unwrap() error {
}
// JoinErrors combines two errors. Of the returned error, Is() follows the first
// branch, Unwrap() folllows the second branch.
// branch, Unwrap() follows the second branch.
func JoinErrors(e1, e2 error) error {
return errorPair{e1, e2}
}

View File

@ -34,7 +34,7 @@ import (
"k8s.io/utils/mount"
)
// RoundOffVolSize rounds up given quantity upto chunks of MiB/GiB.
// RoundOffVolSize rounds up given quantity up to chunks of MiB/GiB.
func RoundOffVolSize(size int64) int64 {
size = RoundOffBytes(size)
// convert size back to MiB for rbd CLI
@ -147,7 +147,7 @@ func GetKernelVersion() (string, error) {
return strings.TrimRight(string(utsname.Release[:]), "\x00"), nil
}
// KernelVersion holds kernel related informations.
// KernelVersion holds kernel related information.
type KernelVersion struct {
Version int
PatchLevel int

View File

@ -27,7 +27,7 @@ func ValidateNodeStageVolumeRequest(req *csi.NodeStageVolumeRequest) error {
// validate stagingpath exists
ok := checkDirExists(req.GetStagingTargetPath())
if !ok {
return status.Errorf(codes.InvalidArgument, "staging path %s does not exists on node", req.GetStagingTargetPath())
return status.Errorf(codes.InvalidArgument, "staging path %s does not exist on node", req.GetStagingTargetPath())
}
return nil
}

View File

@ -130,7 +130,7 @@ func (ci *CSIIdentifier) DecomposeCSIID(composedCSIID string) (err error) {
nextFieldStartIdx := (10 + clusterIDLength + 1)
// minLenToDecode is now 17 as composedCSIID should include
// atleast 16 for poolID encoding and 1 for '-' separator.
// at least 16 for poolID encoding and 1 for '-' separator.
const minLenToDecode = 17
if bytesToProcess < minLenToDecode {
return errors.New("failed to decode CSI identifier, string underflow")