mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Expect NodeUnpublish calls when NodePublish is called
While this is looser check than original check, I do not think we can quite expect NodePublish and NodeUnpublish call counts to match NodePublishvolume call count may not be same as NodeUnpublishVolume call count because reconciler may have a mount operation queued up while previous one is finishing. So, it is not unusual to have more than one NodePublishVolume call for same pod+volume combination, similarly unmount may also run more than once.
This commit is contained in:
parent
5cb1ec5fea
commit
d1fb0b57df
@ -793,8 +793,12 @@ func checkPodLogs(cs clientset.Interface, namespace, driverPodName, driverContai
|
||||
if foundAttributes.Len() != 0 {
|
||||
return fmt.Errorf("some unexpected volume attributes were found: %+v", foundAttributes.List())
|
||||
}
|
||||
if numNodePublishVolume != numNodeUnpublishVolume {
|
||||
return fmt.Errorf("number of NodePublishVolume %d != number of NodeUnpublishVolume %d", numNodePublishVolume, numNodeUnpublishVolume)
|
||||
if numNodePublishVolume == 0 {
|
||||
return fmt.Errorf("NodePublish was never called")
|
||||
}
|
||||
|
||||
if numNodeUnpublishVolume == 0 {
|
||||
return fmt.Errorf("NodeUnpublish was never called")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user