Skip to content

Commit

Permalink
Reject v2 volume automatic engine upgrade
Browse files Browse the repository at this point in the history
Longhorn 7095

Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit authored and David Ko committed Dec 28, 2023
1 parent b865e37 commit be08850
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions manager/volume.go
Expand Up @@ -778,6 +778,10 @@ func (m *VolumeManager) EngineUpgrade(volumeName, image string) (v *longhorn.Vol
return nil, err
}

if datastore.IsDataEngineV2(v.Spec.DataEngine) {
return nil, fmt.Errorf("cannot upgrade engine for volume %v using image %v because the volume is using data engine v2", volumeName, image)
}

if v.Spec.Image == image {
return nil, fmt.Errorf("upgrading in process for volume %v engine image from %v to %v already",
v.Name, v.Status.CurrentImage, v.Spec.Image)
Expand Down

0 comments on commit be08850

Please sign in to comment.