fix(upgrade): Reverting back to old way of checking the volume status

few customers are using old version of the driver where
Status field is not present. So mount will fail after the
upgrade to the 0.9 or later version.

Reverting back to the checking if finalizer is set to check if
volume is ready to be mounted.

Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
Pawan 2020-08-26 20:37:28 +05:30 committed by Kiran Mova
parent b0bb8aa059
commit 9ef7d35d81
2 changed files with 2 additions and 1 deletions

View file

@ -0,0 +1 @@
Reverting back to old way of checking the volume status

View file

@ -139,7 +139,7 @@ func verifyMountRequest(vol *apis.ZFSVolume, mountpath string) error {
vol.Spec.OwnerNodeID != NodeID {
return status.Error(codes.Internal, "verifyMount: volume is owned by different node")
}
if vol.Status.State != ZFSStatusReady {
if vol.Finalizers == nil {
return status.Error(codes.Internal, "verifyMount: volume is not ready to be mounted")
}