Skip to content

Commit 69335b1

Browse files
committed
fix some comment typo
1 parent 608b686 commit 69335b1

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pkg/controller/snapshot_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (ctrl *csiSnapshotController) syncSnapshot(snapshot *crdv1.VolumeSnapshot)
147147
}
148148
}
149149

150-
// syncReadySnapshot checks the snapshot which has been bound to snapshot content succesfully before.
150+
// syncReadySnapshot checks the snapshot which has been bound to snapshot content successfully before.
151151
// If there is any problem with the binding (e.g., snapshot points to a non-exist snapshot content), update the snapshot status and emit event.
152152
func (ctrl *csiSnapshotController) syncReadySnapshot(snapshot *crdv1.VolumeSnapshot) error {
153153
if snapshot.Spec.SnapshotContentName == "" {
@@ -268,7 +268,7 @@ func (ctrl *csiSnapshotController) getMatchSnapshotContent(snapshot *crdv1.Volum
268268
// deleteSnapshotContent starts delete action.
269269
func (ctrl *csiSnapshotController) deleteSnapshotContent(content *crdv1.VolumeSnapshotContent) {
270270
operationName := fmt.Sprintf("delete-%s[%s]", content.Name, string(content.UID))
271-
glog.V(5).Infof("Snapshotter is about to delete volume snapshot and the operation named %s", operationName)
271+
glog.V(5).Infof("Snapshotter is about to delete volume snapshot content and the operation named %s", operationName)
272272
ctrl.scheduleOperation(operationName, func() error {
273273
return ctrl.deleteSnapshotContentOperation(content)
274274
})
@@ -553,7 +553,7 @@ func (ctrl *csiSnapshotController) createSnapshotOperation(snapshot *crdv1.Volum
553553
}
554554

555555
if err != nil {
556-
// Save failed. Now we have a storage asset outside of Kubernetes,
556+
// Save failed. Now we have a snapshot asset outside of Kubernetes,
557557
// but we don't have appropriate volumesnapshot content object for it.
558558
// Emit some event here and controller should try to create the content in next sync period.
559559
strerr := fmt.Sprintf("Error creating volume snapshot content object for snapshot %s: %v.", snapshotKey(snapshot), err)
@@ -771,8 +771,8 @@ func (ctrl *csiSnapshotController) GetSnapshotClass(className string) (*crdv1.Vo
771771

772772
class, err := ctrl.classLister.Get(className)
773773
if err != nil {
774-
glog.Errorf("failed to retrieve snapshot class %s from the API server: %q", className, err)
775-
return nil, fmt.Errorf("failed to retrieve snapshot class %s from the API server: %q", className, err)
774+
glog.Errorf("failed to retrieve snapshot class %s from the informer: %q", className, err)
775+
return nil, fmt.Errorf("failed to retrieve snapshot class %s from the informer: %q", className, err)
776776
}
777777

778778
return class, nil

pkg/controller/snapshot_controller_base.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ func (ctrl *csiSnapshotController) contentWorker() {
293293
}
294294
if !found {
295295
// The controller has already processed the delete event and
296-
// deleted the volume from its cache
296+
// deleted the content from its cache
297297
glog.V(2).Infof("deletion of content %q was already processed", key)
298298
return false
299299
}
@@ -435,7 +435,7 @@ func (ctrl *csiSnapshotController) deleteSnapshot(snapshot *crdv1.VolumeSnapshot
435435
ctrl.contentQueue.Add(snapshotContentName)
436436
}
437437

438-
// deleteContent runs in worker thread and handles "snapshot deleted" event.
438+
// deleteContent runs in worker thread and handles "content deleted" event.
439439
func (ctrl *csiSnapshotController) deleteContent(content *crdv1.VolumeSnapshotContent) {
440440
_ = ctrl.contentStore.Delete(content)
441441
glog.V(4).Infof("content %q deleted", content.Name)

pkg/controller/snapshot_create_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func TestCreateSnapshotSync(t *testing.T) {
234234
initialContents: nocontents,
235235
expectedContents: nocontents,
236236
initialSnapshots: newSnapshotArray("snap7-1", classNonExisting, "", "snapuid7-1", "claim7-1", false, nil, nil, nil),
237-
expectedSnapshots: newSnapshotArray("snap7-1", classNonExisting, "", "snapuid7-1", "claim7-1", false, newVolumeError("Failed to create snapshot: failed to retrieve snapshot class non-existing from the API server: \"volumesnapshotclass.snapshot.storage.k8s.io \\\"non-existing\\\" not found\""), nil, nil),
237+
expectedSnapshots: newSnapshotArray("snap7-1", classNonExisting, "", "snapuid7-1", "claim7-1", false, newVolumeError("Failed to create snapshot: failed to retrieve snapshot class non-existing from the informer: \"volumesnapshotclass.snapshot.storage.k8s.io \\\"non-existing\\\" not found\""), nil, nil),
238238
initialClaims: newClaimArray("claim7-1", "pvc-uid7-1", "1Gi", "volume7-1", v1.ClaimBound, &classEmpty),
239239
initialVolumes: newVolumeArray("volume7-1", "pv-uid7-1", "pv-handle7-1", "1Gi", "pvc-uid7-1", "claim7-1", v1.VolumeBound, v1.PersistentVolumeReclaimDelete, classEmpty),
240240
expectedEvents: []string{"Warning SnapshotCreationFailed"},
@@ -258,7 +258,7 @@ func TestCreateSnapshotSync(t *testing.T) {
258258
initialContents: nocontents,
259259
expectedContents: nocontents,
260260
initialSnapshots: newSnapshotArray("snap7-3", "", "", "snapuid7-3", "claim7-3", false, nil, nil, nil),
261-
expectedSnapshots: newSnapshotArray("snap7-3", "", "", "snapuid7-3", "claim7-3", false, newVolumeError("Failed to create snapshot: failed to retrieve snapshot class from the API server: \"volumesnapshotclass.snapshot.storage.k8s.io \\\"\\\" not found\""), nil, nil),
261+
expectedSnapshots: newSnapshotArray("snap7-3", "", "", "snapuid7-3", "claim7-3", false, newVolumeError("Failed to create snapshot: failed to retrieve snapshot class from the informer: \"volumesnapshotclass.snapshot.storage.k8s.io \\\"\\\" not found\""), nil, nil),
262262
initialClaims: newClaimArray("claim7-3", "pvc-uid7-3", "1Gi", "volume7-3", v1.ClaimBound, &classEmpty),
263263
initialVolumes: newVolumeArray("volume7-3", "pv-uid7-3", "pv-handle7-3", "1Gi", "pvc-uid7-3", "claim7-3", v1.VolumeBound, v1.PersistentVolumeReclaimDelete, classEmpty),
264264
initialStorageClasses: []*storage.StorageClass{diffDriverStorageClass},

0 commit comments

Comments
 (0)