File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ func (s *service) ControllerPublishVolume(
228228 s .vols [i ] = v
229229
230230 if volInfo , ok := MockVolumes [req .VolumeId ]; ok {
231- volInfo .ISPublished = true
231+ volInfo .ISControllerPublished = true
232232 MockVolumes [req .VolumeId ] = volInfo
233233 }
234234
@@ -628,8 +628,8 @@ func (s *service) ControllerExpandVolume(
628628 return nil , status .Error (codes .NotFound , req .VolumeId )
629629 }
630630
631- if s .config .DisableOnlineExpansion && MockVolumes [v .GetVolumeId ()].ISPublished {
632- return nil , status .Error (codes .Aborted , "volume is published and online volume expansion is not supported" )
631+ if s .config .DisableOnlineExpansion && MockVolumes [v .GetVolumeId ()].ISControllerPublished {
632+ return nil , status .Error (codes .FailedPrecondition , "volume is published and online volume expansion is not supported" )
633633 }
634634
635635 requestBytes := req .CapacityRange .RequiredBytes
Original file line number Diff line number Diff line change @@ -109,13 +109,14 @@ type service struct {
109109}
110110
111111type Volume struct {
112- VolumeCSI csi.Volume
113- NodeID string
114- ISStaged bool
115- ISPublished bool
116- ISEphemeral bool
117- StageTargetPath string
118- TargetPath string
112+ VolumeCSI csi.Volume
113+ NodeID string
114+ ISStaged bool
115+ ISPublished bool
116+ ISEphemeral bool
117+ ISControllerPublished bool
118+ StageTargetPath string
119+ TargetPath string
119120}
120121
121122var MockVolumes map [string ]Volume
You can’t perform that action at this time.
0 commit comments