Skip to content

[REFACTOR] volume controller refactoring/split up, to simplify the control flow #2527

Closed
@joshimoo

Description

The behavior is changed so that attachment is handled solely based on
v.Spec.NodeID instead of handling attachment internally via setting
v.Status.CurrentNode or v.Status.PendingNodeID

This requires dedicated controllers for operations that previously relied
on the internal attachment, the required controllers are:

  • SalvageController for processing replica failures
  • ExpansionController for processing volume/engine/replica size changes
  • BackupController for processing DR volumes as well as restore operations

This also changes the behavior so that:

  • v.Status.CurrentNodeID is only set once we are fully attached
  • v.Status.CurrentNodeID is only unset once we are fully detached

This is so that the status represents a resting state (i.e. attached/detached)
since the transition states are based on the v.Spec.NodeID

Metadata

Labels

area/volume-attach-detachVolume attach & detach relatedcomponent/longhorn-managerLonghorn manager (control plane)kind/featureFeature request, new featurekind/refactoringRequest for refactoring (code)priority/0Must be implement or fixed in this release (managed by PO)

Type

No type

Projects

  • Status

    Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions