Skip to content

Commit

Permalink
Safer check for dummy volume (#1189)
Browse files Browse the repository at this point in the history
  • Loading branch information
0sewa0 authored Sep 28, 2022
1 parent ffda506 commit 99a1efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/csi/driver/volumes/app/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (publisher *AppVolumePublisher) UnpublishVolume(ctx context.Context, volume
}
log.Info("loaded volume info", "id", volume.VolumeID, "pod name", volume.PodName, "version", volume.Version, "dynakube", volume.TenantUUID)

if volume.MountAttempts > 0 {
if volume.Version == "" {
log.Info("requester has a dummy volume, no node-level unmount is needed")
return &csi.NodeUnpublishVolumeResponse{}, publisher.db.DeleteVolume(ctx, volume.VolumeID)
}
Expand Down

0 comments on commit 99a1efb

Please sign in to comment.