Skip to content

Commit

Permalink
Minor changes to comments
Browse files Browse the repository at this point in the history
Longhorn 3401

Signed-off-by: Eric Weber <eric.weber@suse.com>
  • Loading branch information
ejweber authored and mergify[bot] committed Jul 8, 2024
1 parent 1b84a5e commit 8e37595
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions controller/volume_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3836,8 +3836,8 @@ func (c *VolumeController) processMigration(v *longhorn.Volume, es map[string]*l
// The volume attachment controller has stopped the migration (if one was ever started). We must clean up any
// extra engines/replicas and leave the volume in a "good" state.

// The only time there should be more then one engines is when we are migrating or upgrading. If there are more
// then one and we no longer have a MigrationNodeID set we can cleanup the extra engine.
// The only time there should be more then one engines is when we are migrating. If there are more then one and
// we no longer have a MigrationNodeID set we can cleanup the extra engine.
if len(es) < 2 && v.Status.CurrentMigrationNodeID == "" {
return nil // There is nothing to do.
}
Expand Down
2 changes: 1 addition & 1 deletion datastore/longhorn.go
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ func GetNewCurrentEngineAndExtras(v *longhorn.Volume, es map[string]*longhorn.En
// 1. Delete the active engine (guaranteed to succeed or we don't do anything else).
// 2. Switch the new current replicas to active (might fail, preventing everything below).
// 3. Set the new current engine to active (might fail, preventing everything below).
// 4. Set the volume.Spec.CurrentNodeID (might fail).
// 4. Set the volume.Status.CurrentNodeID (might fail).
// So we might delete the active engine, fail to set the new current engine to active, and fail to set the
// volume.Spec.CurrentNodeID. Then, the volume attachment controller might try to do a full detachment, setting
// volume.Spec.NodeID == "". At this point, there is no engine that can ever be considered active again by the rules
Expand Down

0 comments on commit 8e37595

Please sign in to comment.