mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
Ensure that error is returned on NodePublish
This commit is contained in:
parent
4b8e552a88
commit
ca532c6fb2
@ -24,7 +24,7 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/klog"
|
||||
@ -490,6 +490,7 @@ func (asw *actualStateOfWorld) AddPodToVolume(markVolumeOpts operationexecutor.M
|
||||
|
||||
// If pod exists, reset remountRequired value
|
||||
podObj.remountRequired = false
|
||||
podObj.volumeMountStateForPod = markVolumeOpts.VolumeMountState
|
||||
asw.attachedVolumes[volumeName].mountedPods[podName] = podObj
|
||||
return nil
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ func (c *csiDriverClient) NodePublishVolume(
|
||||
if err != nil && !isFinalError(err) {
|
||||
return volumetypes.NewUncertainProgressError(err.Error())
|
||||
}
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *csiDriverClient) NodeExpandVolume(ctx context.Context, volumeID, volumePath string, newSize resource.Quantity) (resource.Quantity, error) {
|
||||
|
@ -82,7 +82,7 @@ func NewUncertainProgressError(msg string) *UncertainProgressError {
|
||||
}
|
||||
|
||||
// IsOperationFinishedError checks if given error is of type that indicates
|
||||
// operation is finished with an error.
|
||||
// operation is finished with a FINAL error.
|
||||
func IsOperationFinishedError(err error) bool {
|
||||
if _, ok := err.(*UncertainProgressError); ok {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user