From f0988b95e7ae6b89ab19b32cac2314d6e84bb245 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Mon, 3 Oct 2016 11:29:50 +0200 Subject: [PATCH] Typos and englishify pkg/volume --- pkg/volume/azure_dd/attacher.go | 2 +- pkg/volume/cinder/cinder_test.go | 2 +- pkg/volume/cinder/cinder_util.go | 2 +- pkg/volume/empty_dir/empty_dir_test.go | 2 +- pkg/volume/fc/fc.go | 2 +- pkg/volume/gce_pd/gce_util.go | 2 +- pkg/volume/glusterfs/glusterfs.go | 4 ++-- pkg/volume/host_path/host_path_test.go | 2 +- pkg/volume/iscsi/iscsi.go | 2 +- pkg/volume/nfs/nfs_test.go | 2 +- pkg/volume/quobyte/quobyte.go | 6 +++--- pkg/volume/rbd/rbd_util.go | 2 +- pkg/volume/util/atomic_writer.go | 2 +- pkg/volume/util/operationexecutor/operation_executor.go | 4 ++-- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/volume/azure_dd/attacher.go b/pkg/volume/azure_dd/attacher.go index 6ff6d24e0ca..dfb12b9f0c4 100644 --- a/pkg/volume/azure_dd/attacher.go +++ b/pkg/volume/azure_dd/attacher.go @@ -66,7 +66,7 @@ func (plugin *azureDataDiskPlugin) NewAttacher() (volume.Attacher, error) { }, nil } -// Attach attaches a volume.Spec to a Azure VM referenced by NodeName, returning the disk's LUN +// Attach attaches a volume.Spec to an Azure VM referenced by NodeName, returning the disk's LUN func (attacher *azureDiskAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string, error) { volumeSource, err := getVolumeSource(spec) if err != nil { diff --git a/pkg/volume/cinder/cinder_test.go b/pkg/volume/cinder/cinder_test.go index 66217ac2059..1c9ff246337 100644 --- a/pkg/volume/cinder/cinder_test.go +++ b/pkg/volume/cinder/cinder_test.go @@ -67,7 +67,7 @@ func getFakeDeviceName(host volume.VolumeHost, pdName string) string { } // Real Cinder AttachDisk attaches a cinder volume. If it is not yet mounted, -// it mounts it it to globalPDPath. +// it mounts it to globalPDPath. // We create a dummy directory (="device") and bind-mount it to globalPDPath func (fake *fakePDManager) AttachDisk(b *cinderVolumeMounter, globalPDPath string) error { globalPath := makeGlobalPDName(b.plugin.host, b.pdName) diff --git a/pkg/volume/cinder/cinder_util.go b/pkg/volume/cinder/cinder_util.go index dfa2b4f7312..0b776754caf 100644 --- a/pkg/volume/cinder/cinder_util.go +++ b/pkg/volume/cinder/cinder_util.go @@ -31,7 +31,7 @@ import ( type CinderDiskUtil struct{} // Attaches a disk specified by a volume.CinderPersistenDisk to the current kubelet. -// Mounts the disk to it's global path. +// Mounts the disk to its global path. func (util *CinderDiskUtil) AttachDisk(b *cinderVolumeMounter, globalPDPath string) error { options := []string{} if b.readOnly { diff --git a/pkg/volume/empty_dir/empty_dir_test.go b/pkg/volume/empty_dir/empty_dir_test.go index 1d56465b265..ea5c7da80c5 100644 --- a/pkg/volume/empty_dir/empty_dir_test.go +++ b/pkg/volume/empty_dir/empty_dir_test.go @@ -218,7 +218,7 @@ func doTestPlugin(t *testing.T, config pluginTestConfig) { } physicalMounter.ResetLog() - // Make a unmounter for the volume + // Make an unmounter for the volume teardownMedium := mediumUnknown if config.medium == api.StorageMediumMemory { teardownMedium = mediumMemory diff --git a/pkg/volume/fc/fc.go b/pkg/volume/fc/fc.go index 98abdc8dd03..03f2b59a6d8 100644 --- a/pkg/volume/fc/fc.go +++ b/pkg/volume/fc/fc.go @@ -61,7 +61,7 @@ func (plugin *fcPlugin) GetVolumeName(spec *volume.Spec) (string, error) { return "", err } - // TargetWWNs are the FibreChannel target world wide names + // TargetWWNs are the FibreChannel target worldwide names return fmt.Sprintf("%v", volumeSource.TargetWWNs), nil } diff --git a/pkg/volume/gce_pd/gce_util.go b/pkg/volume/gce_pd/gce_util.go index 59616022bcb..b3bc3b40d86 100644 --- a/pkg/volume/gce_pd/gce_util.go +++ b/pkg/volume/gce_pd/gce_util.go @@ -218,7 +218,7 @@ func udevadmChangeToNewDrives(sdBeforeSet sets.String) error { } // Calls "udevadm trigger --action=change" on the specified drive. -// drivePath must be the the block device path to trigger on, in the format "/dev/sd*", or a symlink to it. +// drivePath must be the block device path to trigger on, in the format "/dev/sd*", or a symlink to it. // This is workaround for Issue #7972. Once the underlying issue has been resolved, this may be removed. func udevadmChangeToDrive(drivePath string) error { glog.V(5).Infof("udevadmChangeToDrive: drive=%q", drivePath) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 41bbc894518..afe8f72b57f 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -290,7 +290,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { // adding log-level ERROR to remove noise // and more specific log path so each pod has - // it's own log based on PV + Pod + // its own log based on PV + Pod log := path.Join(p, b.pod.Name+"-glusterfs.log") options = append(options, "log-level=ERROR") options = append(options, "log-file="+log) @@ -313,7 +313,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { } // Failed mount scenario. - // Since gluster does not return eror text + // Since gluster does not return error text // it all goes in a log file, we will read the log file logerror := readGlusterLog(log, b.pod.Name) if logerror != nil { diff --git a/pkg/volume/host_path/host_path_test.go b/pkg/volume/host_path/host_path_test.go index cf352829df2..413b82bfcea 100644 --- a/pkg/volume/host_path/host_path_test.go +++ b/pkg/volume/host_path/host_path_test.go @@ -80,7 +80,7 @@ func TestRecycler(t *testing.T) { } recycler, err := plug.NewRecycler("pv-name", spec, nil) if err != nil { - t.Errorf("Failed to make a new Recyler: %v", err) + t.Errorf("Failed to make a new Recycler: %v", err) } if recycler.GetPath() != spec.PersistentVolume.Spec.HostPath.Path { t.Errorf("Expected %s but got %s", spec.PersistentVolume.Spec.HostPath.Path, recycler.GetPath()) diff --git a/pkg/volume/iscsi/iscsi.go b/pkg/volume/iscsi/iscsi.go index 248605dc875..8821b4e861f 100644 --- a/pkg/volume/iscsi/iscsi.go +++ b/pkg/volume/iscsi/iscsi.go @@ -241,5 +241,5 @@ func getVolumeSource(spec *volume.Spec) (*api.ISCSIVolumeSource, bool, error) { return spec.PersistentVolume.Spec.ISCSI, spec.ReadOnly, nil } - return nil, false, fmt.Errorf("Spec does not reference a ISCSI volume type") + return nil, false, fmt.Errorf("Spec does not reference an ISCSI volume type") } diff --git a/pkg/volume/nfs/nfs_test.go b/pkg/volume/nfs/nfs_test.go index 204b9920c8c..0ecc8a567f8 100644 --- a/pkg/volume/nfs/nfs_test.go +++ b/pkg/volume/nfs/nfs_test.go @@ -93,7 +93,7 @@ func TestRecycler(t *testing.T) { } recycler, err := plug.NewRecycler("pv-name", spec, nil) if err != nil { - t.Errorf("Failed to make a new Recyler: %v", err) + t.Errorf("Failed to make a new Recycler: %v", err) } if recycler.GetPath() != spec.PersistentVolume.Spec.NFS.Path { t.Errorf("Expected %s but got %s", spec.PersistentVolume.Spec.NFS.Path, recycler.GetPath()) diff --git a/pkg/volume/quobyte/quobyte.go b/pkg/volume/quobyte/quobyte.go index 86db28aac98..0db72c926a0 100644 --- a/pkg/volume/quobyte/quobyte.go +++ b/pkg/volume/quobyte/quobyte.go @@ -240,7 +240,7 @@ func (mounter *quobyteMounter) SetUpAt(dir string, fsGroup *int64) error { options = append(options, "ro") } - //if a trailling slash is missing we add it here + //if a trailing slash is missing we add it here if err := mounter.mounter.Mount(mounter.correctTraillingSlash(mounter.registry), dir, "quobyte", options); err != nil { return fmt.Errorf("quobyte: mount failed: %v", err) } @@ -390,11 +390,11 @@ func (provisioner *quobyteVolumeProvisioner) Provision() (*api.PersistentVolume, } if !validateRegistry(provisioner.registry) { - return nil, fmt.Errorf("Quoybte registry missing or malformed: must be a host:port pair or multiple pairs seperated by commas") + return nil, fmt.Errorf("Quoybte registry missing or malformed: must be a host:port pair or multiple pairs separated by commas") } if len(apiServer) == 0 { - return nil, fmt.Errorf("Quoybte API server missing or malformed: must be a http(s)://host:port pair or multiple pairs seperated by commas") + return nil, fmt.Errorf("Quoybte API server missing or malformed: must be a http(s)://host:port pair or multiple pairs separated by commas") } // create random image name diff --git a/pkg/volume/rbd/rbd_util.go b/pkg/volume/rbd/rbd_util.go index 866c12c8027..e59d04babce 100644 --- a/pkg/volume/rbd/rbd_util.go +++ b/pkg/volume/rbd/rbd_util.go @@ -371,7 +371,7 @@ func (util *RBDUtil) DeleteImage(p *rbdVolumeDeleter) error { if err == nil { return nil } else { - glog.Errorf("failed to delete rbd image, error %v ouput %v", err, string(output)) + glog.Errorf("failed to delete rbd image, error %v output %v", err, string(output)) } } return err diff --git a/pkg/volume/util/atomic_writer.go b/pkg/volume/util/atomic_writer.go index 05bcdd40753..8e2dad20eab 100644 --- a/pkg/volume/util/atomic_writer.go +++ b/pkg/volume/util/atomic_writer.go @@ -96,7 +96,7 @@ const ( // 5. The payload is written to the new timestamped directory // 6.  Symlinks and directory for new user-visible files are created (if needed). // -// For example consider the files: +// For example, consider the files: // /podName // /user/labels // /k8s/annotations diff --git a/pkg/volume/util/operationexecutor/operation_executor.go b/pkg/volume/util/operationexecutor/operation_executor.go index 36c927b95f8..9f127462f2a 100644 --- a/pkg/volume/util/operationexecutor/operation_executor.go +++ b/pkg/volume/util/operationexecutor/operation_executor.go @@ -97,7 +97,7 @@ type OperationExecutor interface { // If the volume is found, the actual state of the world is updated to mark // the volume as attached. // If the volume does not implement the attacher interface, it is assumed to - // be attached and the the actual state of the world is updated accordingly. + // be attached and the actual state of the world is updated accordingly. // If the volume is not found or there is an error (fetching the node // object, for example) then an error is returned which triggers exponential // back off on retries. @@ -1006,7 +1006,7 @@ func (oe *operationExecutor) generateVerifyControllerAttachedVolumeFunc( return func() error { if !volumeToMount.PluginIsAttachable { // If the volume does not implement the attacher interface, it is - // assumed to be attached and the the actual state of the world is + // assumed to be attached and the actual state of the world is // updated accordingly. addVolumeNodeErr := actualStateOfWorld.MarkVolumeAsAttached(