controller: engine: Don't change owner if the owner is down
Engine controller's owner is always the node it attached to, to prevent
the split of brain. Unless it's detaching, in which case, volume
controll will take care of the changing of the ownership.
@@ -231,19 +231,6 @@ func (ec *EngineController) syncEngine(key string) (err error) {
return err
}
- // Check if engine's managing node died
- if engine.Spec.OwnerID != "" {
- isDown, err := ec.ds.IsNodeDownOrDeleted(engine.Spec.OwnerID)
- if err != nil {
- return err
- }
- if isDown {
- engine.Spec.OwnerID = ec.controllerID
- if engine, err = ec.ds.UpdateEngine(engine); err != nil {
- return err
- }
- }
- }
// Not ours
if engine.Spec.OwnerID != ec.controllerID {
return nil
