diff --git a/cmd/ndm_daemonset/controller/controller.go b/cmd/ndm_daemonset/controller/controller.go index 0dd98acf8..dab9d7142 100644 --- a/cmd/ndm_daemonset/controller/controller.go +++ b/cmd/ndm_daemonset/controller/controller.go @@ -57,7 +57,7 @@ const ( KubernetesHostNameLabel = kubernetesLabelPrefix + HostNameKey // NDMVersion is the CR version. NDMVersion = openEBSLabelPrefix + "v1alpha1" - // reconcileKey is the key used for enable/disable of reconcilation + // reconcileKey is the key used for enable/disable of reconciliation reconcileKey = "reconcile" // OpenEBSReconcile is used in annotation to check whether CR is to be reconciled or not OpenEBSReconcile = openEBSLabelPrefix + reconcileKey @@ -69,7 +69,7 @@ const ( NDMActive = "Active" // NDMInactive is constant for inactive resource status. NDMInactive = "Inactive" - // NDMUnknown is constant for resource unknown satus. + // NDMUnknown is constant for resource unknown status. NDMUnknown = "Unknown" // NDMDiskTypeKey specifies the type of disk. NDMDiskTypeKey = "ndm.io/disk-type" diff --git a/cmd/ndm_daemonset/controller/disk.go b/cmd/ndm_daemonset/controller/disk.go index 5ace71749..ef4fe0e11 100644 --- a/cmd/ndm_daemonset/controller/disk.go +++ b/cmd/ndm_daemonset/controller/disk.go @@ -124,7 +124,7 @@ func (di *DiskInfo) ToDisk() apis.Disk { } // ToPartition convert the PartitionData struct inside DiskInfo to apis.Partition -// which will be used to include the parition information in the Disk CR +// which will be used to include the partition information in the Disk CR func (di *DiskInfo) ToPartition() []apis.Partition { partition := make([]apis.Partition, 0) for _, partitionData := range di.PartitionData { diff --git a/cmd/ndm_daemonset/controller/filter.go b/cmd/ndm_daemonset/controller/filter.go index cc4f07bd6..c22d4bdb1 100644 --- a/cmd/ndm_daemonset/controller/filter.go +++ b/cmd/ndm_daemonset/controller/filter.go @@ -53,7 +53,7 @@ type FilterInterface interface { // does not match with exclude value then it returns false type Filters interface { Include(*DiskInfo) bool // Include returns True if passing DiskInfo matches with include value - Exclude(*DiskInfo) bool // exclude returns True if passing DiskInfo does not matche with exclude value + Exclude(*DiskInfo) bool // exclude returns True if passing DiskInfo does not match with exclude value } // AddNewFilter adds new filter to controller object diff --git a/cmd/ndm_daemonset/controller/filter_test.go b/cmd/ndm_daemonset/controller/filter_test.go index 297be6fe2..3e7ba5754 100644 --- a/cmd/ndm_daemonset/controller/filter_test.go +++ b/cmd/ndm_daemonset/controller/filter_test.go @@ -107,7 +107,7 @@ func TestListFilter(t *testing.T) { } } -func TestSrartFilter(t *testing.T) { +func TestStartFilter(t *testing.T) { var msg1 string filter := &fakeFilter{} filter1 := &Filter{ diff --git a/cmd/ndm_daemonset/controller/ndmconfig.go b/cmd/ndm_daemonset/controller/ndmconfig.go index f269cbaf1..80a9ba90d 100644 --- a/cmd/ndm_daemonset/controller/ndmconfig.go +++ b/cmd/ndm_daemonset/controller/ndmconfig.go @@ -27,7 +27,7 @@ import ( // ConfigFilePath contains configmap file path var ConfigFilePath = "/host/node-disk-manager.config" -// NodeDiskManagerConfig contains congigs of probes and filters +// NodeDiskManagerConfig contains configs of probes and filters type NodeDiskManagerConfig struct { ProbeConfigs []ProbeConfig `json:"probeconfigs"` // ProbeConfigs contains configs of Probes FilterConfigs []FilterConfig `json:"filterconfigs"` // FilterConfigs contains configs of Filters diff --git a/cmd/ndm_daemonset/controller/probe_test.go b/cmd/ndm_daemonset/controller/probe_test.go index 9c23aa29d..ce4c75bd4 100644 --- a/cmd/ndm_daemonset/controller/probe_test.go +++ b/cmd/ndm_daemonset/controller/probe_test.go @@ -199,7 +199,7 @@ func TestFillDetails(t *testing.T) { actualDisk *DiskInfo expectedDisk *DiskInfo }{ - "push resouce with 'fake-disk-uid' uuid for create resource": {actualDisk: actualDr, expectedDisk: expectedDr}, + "push resource with 'fake-disk-uid' uuid for create resource": {actualDisk: actualDr, expectedDisk: expectedDr}, } for name, test := range tests { t.Run(name, func(t *testing.T) { diff --git a/cmd/ndm_daemonset/filter/osdiskexcludefilter.go b/cmd/ndm_daemonset/filter/osdiskexcludefilter.go index a482dc977..852ab49a6 100644 --- a/cmd/ndm_daemonset/filter/osdiskexcludefilter.go +++ b/cmd/ndm_daemonset/filter/osdiskexcludefilter.go @@ -127,6 +127,6 @@ func (odf *oSDiskExcludeFilter) Exclude(d *controller.DiskInfo) bool { partitionRegex = "[0-9]*$" } regex := "^" + odf.excludeDevPath + partitionRegex - klog.Infof("applying os-fiter regex %s on %s", regex, d.Path) + klog.Infof("applying os-filter regex %s on %s", regex, d.Path) return !util.IsMatchRegex(regex, d.Path) } diff --git a/cmd/ndm_daemonset/filter/pathfilter.go b/cmd/ndm_daemonset/filter/pathfilter.go index 720924203..969674668 100644 --- a/cmd/ndm_daemonset/filter/pathfilter.go +++ b/cmd/ndm_daemonset/filter/pathfilter.go @@ -96,7 +96,7 @@ func (pf *pathFilter) Include(d *controller.DiskInfo) bool { return util.MatchIgnoredCase(pf.includePaths, d.Path) } -// Exclude returns true if the disk path does not matche any given +// Exclude returns true if the disk path does not match any given // keywords func (pf *pathFilter) Exclude(d *controller.DiskInfo) bool { if len(pf.excludePaths) == 0 { diff --git a/cmd/ndm_daemonset/filter/vendorfilter.go b/cmd/ndm_daemonset/filter/vendorfilter.go index 20539fb71..b4cbbb4a0 100644 --- a/cmd/ndm_daemonset/filter/vendorfilter.go +++ b/cmd/ndm_daemonset/filter/vendorfilter.go @@ -96,7 +96,7 @@ func (vf *vendorFilter) Include(d *controller.DiskInfo) bool { return util.ContainsIgnoredCase(vf.includeVendors, d.Vendor) } -// Exclude returns true if vendor of the disk does not matche with given +// Exclude returns true if vendor of the disk does not match with given // list or the list of the length is 0 func (vf *vendorFilter) Exclude(d *controller.DiskInfo) bool { if len(vf.excludeVendors) == 0 { diff --git a/cmd/ndm_daemonset/probe/eventhandler.go b/cmd/ndm_daemonset/probe/eventhandler.go index 584d1bc2c..fda6671c6 100644 --- a/cmd/ndm_daemonset/probe/eventhandler.go +++ b/cmd/ndm_daemonset/probe/eventhandler.go @@ -54,7 +54,7 @@ func (pe *ProbeEvent) addDiskEvent(msg controller.EventMessage) { } klog.Info("Processed details for ", diskDetails.ProbeIdentifiers.Uuid) oldDr := pe.Controller.GetExistingDiskResource(diskList, diskDetails.ProbeIdentifiers.Uuid) - // if old DiskCR doesn't exist and parition is found, it is ignored since we don't need info + // if old DiskCR doesn't exist and partition is found, it is ignored since we don't need info // of partition if disk as a whole is ignored if oldDr == nil && len(diskDetails.PartitionData) != 0 { klog.Info("Skipping partition of already excluded disk ", diskDetails.ProbeIdentifiers.Uuid) diff --git a/cmd/ndm_daemonset/probe/udevprobe.go b/cmd/ndm_daemonset/probe/udevprobe.go index 9dee19c03..3639e7f60 100644 --- a/cmd/ndm_daemonset/probe/udevprobe.go +++ b/cmd/ndm_daemonset/probe/udevprobe.go @@ -171,7 +171,7 @@ func (up *udevProbe) scan() error { return nil } -// fillDiskDetails filles details in diskInfo struct using probe information +// fillDiskDetails fills details in diskInfo struct using probe information func (up *udevProbe) FillDiskDetails(d *controller.DiskInfo) { udevDevice, err := newUdevProbeForFillDiskDetails(d.ProbeIdentifiers.UdevIdentifier) if err != nil { diff --git a/deploy/node-disk-manager-config.yaml b/deploy/node-disk-manager-config.yaml index 1f05f9314..df661bc79 100644 --- a/deploy/node-disk-manager-config.yaml +++ b/deploy/node-disk-manager-config.yaml @@ -8,7 +8,7 @@ metadata: namespace: default data: # udev-probe is default or primary probe it should be enabled to run ndm - # filterconfigs contails configs of filters. To provide a group of include + # filterconfigs contains configs of filters. To provide a group of include # and exclude values add it as , separated string node-disk-manager.config: | probeconfigs: diff --git a/docs/design.md b/docs/design.md index 5941b5745..6bf79535b 100644 --- a/docs/design.md +++ b/docs/design.md @@ -1,6 +1,6 @@ # Introduction -This document presents use-cases, high level design and workflow changes required for using disks attached to the Kubernetes Nodes by Container Attached Storages(CAS) like OpenEBS, Longhorn, etc. This design includes introducing new add-on component called - **_node-disk-manager(ndm)_**, as well as extending some existing components where applicable like *node-problem-detector*, *node-feature-discovery*, etc. +This document presents use-cases, high level design and workflow changes required for using disks attached to the Kubernetes Nodes by Container Attached Storage(CAS) like OpenEBS, Longhorn, etc. This design includes introducing new add-on component called - **_node-disk-manager(ndm)_**, as well as extending some existing components where applicable like *node-problem-detector*, *node-feature-discovery*, etc. ## Prerequisites diff --git a/integration_tests/k8s/k8sapi.go b/integration_tests/k8s/k8sapi.go index 3ec3d101e..8fc14fa57 100644 --- a/integration_tests/k8s/k8sapi.go +++ b/integration_tests/k8s/k8sapi.go @@ -36,7 +36,7 @@ import ( // The wait time for all k8s API related operations const k8sWaitTime = 40 * time.Second -// The wait time for reconcilation loop to run +// The wait time for reconciliation loop to run const k8sReconcileTime = 10 * time.Second // ListPodStatus returns the list of all pods in the given Namespace along diff --git a/integration_tests/k8s/utils.go b/integration_tests/k8s/utils.go index f405eda7f..b2d924cc0 100644 --- a/integration_tests/k8s/utils.go +++ b/integration_tests/k8s/utils.go @@ -27,8 +27,8 @@ func WaitForStateChange() { time.Sleep(k8sWaitTime) } -// WaitForReconcilation sleeps the process for a fixed duration so +// WaitForReconciliation sleeps the process for a fixed duration so // that the reconcile loop can run and fetch the required changes -func WaitForReconcilation() { +func WaitForReconciliation() { time.Sleep(k8sReconcileTime) } diff --git a/integration_tests/sanity/customresources_test.go b/integration_tests/sanity/customresources_test.go index d7ba1760b..3558b8543 100644 --- a/integration_tests/sanity/customresources_test.go +++ b/integration_tests/sanity/customresources_test.go @@ -117,7 +117,7 @@ var _ = Describe("Device Discovery Tests", func() { By("detaching the disk") err = physicalDisk.DetachDisk() - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() By("listing all the blockdevices") bdList, err := k8sClient.ListBlockDevices() @@ -153,7 +153,7 @@ var _ = Describe("Device Discovery Tests", func() { By("attaching the disk") err = physicalDisk.AttachDisk() Expect(err).NotTo(HaveOccurred()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() By("listing the blockdevices again") bdList, err = k8sClient.ListBlockDevices() diff --git a/integration_tests/sanity/deviceclaim_test.go b/integration_tests/sanity/deviceclaim_test.go index 6ef95b32d..2a6725605 100644 --- a/integration_tests/sanity/deviceclaim_test.go +++ b/integration_tests/sanity/deviceclaim_test.go @@ -58,7 +58,7 @@ var _ = Describe("BlockDevice Claim tests", func() { ok := WaitForPodToBeRunningEventually(DaemonSetPodPrefix) Expect(ok).To(BeTrue()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() }) AfterEach(func() { By("deleting the NDM deamonset") @@ -91,7 +91,7 @@ var _ = Describe("BlockDevice Claim tests", func() { By("creating BDC object") err = k8sClient.CreateBlockDeviceClaim(blockDeviceClaim) Expect(err).NotTo(HaveOccurred()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() By("listing all BDCs") bdcList, err := k8sClient.ListBlockDeviceClaims() @@ -114,7 +114,7 @@ var _ = Describe("BlockDevice Claim tests", func() { By("creating BDC object with unavailable capacity") err = k8sClient.CreateBlockDeviceClaim(blockDeviceClaim) Expect(err).NotTo(HaveOccurred()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() By("listing all BDCs") bdcList, err := k8sClient.ListBlockDeviceClaims() @@ -162,7 +162,7 @@ var _ = Describe("BlockDevice Claim tests", func() { By("creating BDC with matching node") err = k8sClient.CreateBlockDeviceClaim(blockDeviceClaim) Expect(err).NotTo(HaveOccurred()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() By("listing all BDCs") bdcList, err := k8sClient.ListBlockDeviceClaims() @@ -193,7 +193,7 @@ var _ = Describe("BlockDevice Claim tests", func() { }) }) - Context("Unclamining a block device ", func() { + Context("Unclaiming a block device ", func() { var bdcName string var blockDeviceClaim *apis.BlockDeviceClaim BeforeEach(func() { @@ -201,7 +201,7 @@ var _ = Describe("BlockDevice Claim tests", func() { bdcName = "test-bdc-1" blockDeviceClaim = k8s.NewBDC(bdcName) }) - It("unclaimes a BD when BDC is deleted", func() { + It("unclaims a BD when BDC is deleted", func() { blockDeviceClaim.Spec.HostName = HostName blockDeviceClaim.Namespace = k8s.Namespace blockDeviceClaim.Spec.Resources.Requests[apis.ResourceStorage] = BDCAvailableCapacity @@ -209,7 +209,7 @@ var _ = Describe("BlockDevice Claim tests", func() { By("creating BDC object") err := k8sClient.CreateBlockDeviceClaim(blockDeviceClaim) Expect(err).NotTo(HaveOccurred()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() By("listing all BDCs") bdcList, err := k8sClient.ListBlockDeviceClaims() @@ -241,7 +241,7 @@ var _ = Describe("BlockDevice Claim tests", func() { By("deleting the BDC") err = k8sClient.DeleteBlockDeviceClaim(blockDeviceClaim) Expect(err).NotTo(HaveOccurred()) - k8s.WaitForReconcilation() + k8s.WaitForReconciliation() // check status of BD again to check it has been released bdList, err = k8sClient.ListBlockDevices() diff --git a/integration_tests/yamls/configmap.yaml b/integration_tests/yamls/configmap.yaml index 123b90fe6..0b0bb9a74 100644 --- a/integration_tests/yamls/configmap.yaml +++ b/integration_tests/yamls/configmap.yaml @@ -9,7 +9,7 @@ data: # filter or probe are not present in configmap # udev-probe is default or primary probe it should be enabled to run ndm - # filterconfigs contails configs of filters. To provide a group of include + # filterconfigs contains configs of filters. To provide a group of include # and exclude values add it as , separated string node-disk-manager.config: | probeconfigs: diff --git a/ndm-operator.yaml b/ndm-operator.yaml index 505ea69a0..ebd27fb53 100644 --- a/ndm-operator.yaml +++ b/ndm-operator.yaml @@ -15,7 +15,7 @@ data: # filter or probe are not present in configmap # udev-probe is default or primary probe it should be enabled to run ndm - # filterconfigs contails configs of filters. To provide a group of include + # filterconfigs contains configs of filters. To provide a group of include # and exclude values add it as , separated string node-disk-manager.config: | probeconfigs: diff --git a/pkg/apis/openebs/v1alpha1/blockdevice_types.go b/pkg/apis/openebs/v1alpha1/blockdevice_types.go index e1a842ae4..f5dec71a2 100644 --- a/pkg/apis/openebs/v1alpha1/blockdevice_types.go +++ b/pkg/apis/openebs/v1alpha1/blockdevice_types.go @@ -152,7 +152,7 @@ type FileSystemInfo struct { Mountpoint string `json:"mountPoint,omitempty"` } -// DeviceDevLink holds the maping between type and links like by-id type or by-path type link +// DeviceDevLink holds the mapping between type and links like by-id type or by-path type link type DeviceDevLink struct { // Kind is the type of link like by-id or by-path. Kind string `json:"kind,omitempty"` diff --git a/pkg/apis/openebs/v1alpha1/disk_types.go b/pkg/apis/openebs/v1alpha1/disk_types.go index e44536077..2bfef8058 100644 --- a/pkg/apis/openebs/v1alpha1/disk_types.go +++ b/pkg/apis/openebs/v1alpha1/disk_types.go @@ -115,7 +115,7 @@ type Partition struct { // 1. For DOS partition table, two hexadecimal digits will be // used for partition type // 2. For GPT partition table, a GUID will be present which corresponds to - // paratition type in the format of `00000000-0000-0000-0000-000000000000` + // partition type in the format of `00000000-0000-0000-0000-000000000000` PartitionType string `json:"partitionType"` // FileSystem contains mountpoint and filesystem type diff --git a/pkg/cleaner/cleaner.go b/pkg/cleaner/cleaner.go index d1f35f2d1..916b740e1 100644 --- a/pkg/cleaner/cleaner.go +++ b/pkg/cleaner/cleaner.go @@ -143,7 +143,7 @@ func (c *CleanupStatusTracker) CancelJob(bdName string) error { // runJob creates a new cleanup job in the namespace func (c *Cleaner) runJob(bd *v1alpha1.BlockDevice, volumeMode VolumeMode) error { - //retreive node Object to pass tolerations to the Job + // retrieve node Object to pass tolerations to the Job nodeName := GetNodeName(bd) selectedNode, err := c.getNodeObjectByNodeName(nodeName) if err != nil { diff --git a/pkg/controller/blockdevice/blockdevice_controller.go b/pkg/controller/blockdevice/blockdevice_controller.go index 5767acacb..3d361a4a9 100644 --- a/pkg/controller/blockdevice/blockdevice_controller.go +++ b/pkg/controller/blockdevice/blockdevice_controller.go @@ -207,7 +207,7 @@ func (r *ReconcileBlockDevice) updateBDStatus(state openebsv1alpha1.DeviceClaimS return nil } -// IsReconcileDisabled is used to check if reconcilation is disabled for +// IsReconcileDisabled is used to check if reconciliation is disabled for // BlockDevice func IsReconcileDisabled(bd *openebsv1alpha1.BlockDevice) bool { return bd.Annotations[ndm.OpenEBSReconcile] == "false" diff --git a/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller.go b/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller.go index b43ef0f2c..7ba9707ef 100644 --- a/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller.go +++ b/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller.go @@ -110,7 +110,7 @@ func (r *ReconcileBlockDeviceClaim) Reconcile(request reconcile.Request) (reconc return reconcile.Result{}, err } - // check if reconcilation is disabled for this resource + // check if reconciliation is disabled for this resource if IsReconcileDisabled(instance) { return reconcile.Result{}, nil } @@ -144,7 +144,7 @@ func (r *ReconcileBlockDeviceClaim) Reconcile(request reconcile.Request) (reconc return reconcile.Result{}, nil } -// claimDeviceForBlockDeviceClaim is created, try to findout blockdevice which is +// claimDeviceForBlockDeviceClaim is created, try to determine blockdevice which is // free and has size equal/greater than BlockDeviceClaim request. func (r *ReconcileBlockDeviceClaim) claimDeviceForBlockDeviceClaim( instance *apis.BlockDeviceClaim, reqLogger logr.Logger) error { @@ -368,7 +368,7 @@ func (r *ReconcileBlockDeviceClaim) getListofDevices(filters ...string) (*apis.B return listBlockDevice, nil } -// IsReconcileDisabled is used to check if reconcilation is disabled for +// IsReconcileDisabled is used to check if reconciliation is disabled for // BlockDeviceClaim func IsReconcileDisabled(bdc *apis.BlockDeviceClaim) bool { return bdc.Annotations[ndm.OpenEBSReconcile] == "false" diff --git a/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller_test.go b/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller_test.go index 74b9301ae..6853fbc8d 100644 --- a/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller_test.go +++ b/pkg/controller/blockdeviceclaim/blockdeviceclaim_controller_test.go @@ -79,7 +79,7 @@ func TestBlockDeviceClaimController(t *testing.T) { r.InvalidCapacityTest(t, req) // Create new BlockDeviceClaim CR with right capacity, - // trigger reconcilation event. This time, it should + // trigger reconciliation event. This time, it should // bound. deviceClaim := &openebsv1alpha1.BlockDeviceClaim{} err := r.client.Get(context.TODO(), req.NamespacedName, deviceClaim) diff --git a/pkg/controller/disk/disk_controller.go b/pkg/controller/disk/disk_controller.go index a6036f66a..05c617357 100644 --- a/pkg/controller/disk/disk_controller.go +++ b/pkg/controller/disk/disk_controller.go @@ -113,7 +113,7 @@ func (r *ReconcileDisk) Reconcile(request reconcile.Request) (reconcile.Result, return reconcile.Result{}, nil } -// IsReconcileDisabled is used to check if reconcilation is disabled for +// IsReconcileDisabled is used to check if reconciliation is disabled for // Disk resource func IsReconcileDisabled(disk *openebsv1alpha1.Disk) bool { return disk.Annotations[ndm.OpenEBSReconcile] == "false" diff --git a/pkg/hierarchy/device.go b/pkg/hierarchy/device.go index f54b6e509..d42ca6666 100644 --- a/pkg/hierarchy/device.go +++ b/pkg/hierarchy/device.go @@ -18,7 +18,7 @@ package hierarchy var sysFSDirectoryPath = "/sys/" -// Device represents a blockdevice. This struct is used by hierachy pkg which is used to +// Device represents a blockdevice. This struct is used by hierarchy pkg which is used to // get the necessary blockdevice hierarchy information type Device struct { // Path of the blockdevice. eg: /dev/sda, /dev/dm-0 diff --git a/pkg/metrics/static/metrics.go b/pkg/metrics/static/metrics.go index a37d8db78..5b4e355df 100644 --- a/pkg/metrics/static/metrics.go +++ b/pkg/metrics/static/metrics.go @@ -105,7 +105,7 @@ func (m *Metrics) withErrorRequest() *Metrics { return m } -// SetMetrics is used to set the prometheus metrics to resepective fields +// SetMetrics is used to set the prometheus metrics to respective fields func (m *Metrics) SetMetrics(blockDevices []bd.BlockDevice) { for _, blockDevice := range blockDevices { // remove /dev from the device path so that the device path is similar to the diff --git a/pkg/mount/mountinfo.go b/pkg/mount/mountinfo.go index 2f4bda9fc..885fbf672 100644 --- a/pkg/mount/mountinfo.go +++ b/pkg/mount/mountinfo.go @@ -20,7 +20,7 @@ const ( hostMountFilePath = "/host/proc/1/mounts" // hostMountFilePath is the file path mounted inside container ) -// Identifier is an identifer for the mount probe. It will be a devpath like +// Identifier is an identifier for the mount probe. It will be a devpath like // /dev/sda, /dev/sda1 etc type Identifier struct { DevPath string diff --git a/pkg/seachest/seachest.go b/pkg/seachest/seachest.go index b6661b52b..1ec6a0f9c 100644 --- a/pkg/seachest/seachest.go +++ b/pkg/seachest/seachest.go @@ -50,8 +50,8 @@ func SeachestErrors(err int) string { "Bad Parameter", "Memory Allocation Failed", "Cmd Passthrough Failed", - "Library Mistmatch", - "Device Forzen", + "Library Mismatch", + "Device Frozen", "Permission Denied", "File Open Error", "Incomplete RFTRS", diff --git a/pkg/setup/create_crd.go b/pkg/setup/create_crd.go index 6b420badd..68f1b3b43 100644 --- a/pkg/setup/create_crd.go +++ b/pkg/setup/create_crd.go @@ -54,7 +54,7 @@ func (sc Config) createBlockDeviceClaimCRD() error { } // createCRD creates a CRD in the cluster and waits for it to get into active state -// It will return error, if the CRD creation failed, or the Name conficts with other CRD already +// It will return error, if the CRD creation failed, or the Name conflicts with other CRD already // in the group func (sc Config) createCRD(crd *apiext.CustomResourceDefinition) error { if _, err := sc.apiExtClient.ApiextensionsV1beta1().CustomResourceDefinitions().Create(crd); err != nil { diff --git a/pkg/smart/scsiinquirypage.go b/pkg/smart/scsiinquirypage.go index 24f039d3e..29b440662 100644 --- a/pkg/smart/scsiinquirypage.go +++ b/pkg/smart/scsiinquirypage.go @@ -21,7 +21,7 @@ import ( "fmt" ) -// commands used to fetch various informations of a disk from a set of defined +// commands used to fetch various information of a disk from a set of defined // scsi pages const ( SCSIInquiry = 0x12 // inquiry command diff --git a/pkg/smart/smartutil.go b/pkg/smart/smartutil.go index 4c44398f4..94a8eae48 100644 --- a/pkg/smart/smartutil.go +++ b/pkg/smart/smartutil.go @@ -36,10 +36,10 @@ func init() { i := 0x1 b := (*[intSize]byte)(unsafe.Pointer(&i)) if b[0] == 1 { - // LittleEndian is the little-endian implementation of ByteOrde + // LittleEndian is the little-endian implementation of ByteOrder NativeEndian = binary.LittleEndian } else { - // BigEndian is the Big-endian implementation of ByteOrde + // BigEndian is the Big-endian implementation of ByteOrder NativeEndian = binary.BigEndian } } diff --git a/pkg/udev/enumerate.go b/pkg/udev/enumerate.go index 6948b6827..6b494c851 100644 --- a/pkg/udev/enumerate.go +++ b/pkg/udev/enumerate.go @@ -38,7 +38,7 @@ func (ue *UdevEnumerate) AddSubsystemFilter(subSystem string) error { defer freeCharPtr(subsystem) ret := C.udev_enumerate_add_match_subsystem(ue.ueptr, subsystem) if ret < 0 { - return errors.New("unable to apply sybsystem filter") + return errors.New("unable to apply subsystem filter") } return nil } diff --git a/pkg/upgrade/v040_041/preupgrade.go b/pkg/upgrade/v040_041/preupgrade.go index 8a7d2f4b8..c90a8fdee 100644 --- a/pkg/upgrade/v040_041/preupgrade.go +++ b/pkg/upgrade/v040_041/preupgrade.go @@ -39,13 +39,13 @@ type UpgradeTask struct { err error } -// NewUpgradeTask creates a new preupgrade with given client +// NewUpgradeTask creates a new pre-upgrade with given client // and specified `from` and `to` version func NewUpgradeTask(from, to string, c client.Client) *UpgradeTask { return &UpgradeTask{from: from, to: to, client: c} } -// PreUpgrade runs the preupgrade tasks and returns whether it succeeded or not +// PreUpgrade runs the pre-upgrade tasks and returns whether it succeeded or not func (p *UpgradeTask) PreUpgrade() bool { var err error bdcList := &apis.BlockDeviceClaimList{} diff --git a/pkg/upgrade/v041_042/preupgrade.go b/pkg/upgrade/v041_042/preupgrade.go index 372920265..d9f11b16b 100644 --- a/pkg/upgrade/v041_042/preupgrade.go +++ b/pkg/upgrade/v041_042/preupgrade.go @@ -37,7 +37,7 @@ func NewUpgradeTask(from, to string, c client.Client) *UpgradeTask { return &UpgradeTask{from: from, to: to, client: c} } -// PreUpgrade runs the preupgrade tasks and returns whether it succeeded or not +// PreUpgrade runs the pre-upgrade tasks and returns whether it succeeded or not func (p *UpgradeTask) PreUpgrade() bool { var err error bdcList := &apis.BlockDeviceClaimList{}