Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1198 missing volume #1212

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ func (s *CSINodeService) processFakeAttachInNodeStageVolume(ll *logrus.Entry, vo
ll.Errorf("unable to mount fake device in stage volume request with error: %v", err)
return status.Error(codes.Internal, fmt.Sprintf("failed to mount device in stage volume: %s", err.Error()))
}
if volumeCR.Spec.OperationalStatus != apiV1.OperationalStatusMissing {
volumeCR.Spec.OperationalStatus = apiV1.OperationalStatusMissing
}
}
} else if volumeCR.Annotations[fakeAttachVolumeAnnotation] == fakeAttachVolumeKey {
delete(volumeCR.Annotations, fakeAttachVolumeAnnotation)
Expand Down
1 change: 1 addition & 0 deletions pkg/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,7 @@ var _ = Describe("CSINodeService Fake-Attach", func() {
err = node.k8sClient.ReadCR(testCtx, testV1ID, "", vol1)
Expect(err).To(BeNil())
Expect(vol1.Spec.CSIStatus).To(Equal(apiV1.VolumeReady))
Expect(vol1.Spec.OperationalStatus).To(Equal(apiV1.OperationalStatusMissing))
Expect(vol1.Annotations[fakeDeviceVolumeAnnotation]).To(Equal(newFakeDevice))
})
It("Should publish unhealthy fs-mode volume with fake-attach annotation", func() {
Expand Down