Skip to content

Commit

Permalink
Fix bug: volume is stuck in live engine upgrading
Browse files Browse the repository at this point in the history
The only usecase of ProcessReplace is for engine image live upgrade.
If the new engine process has the same binary as the existing engine
process, there is no reason to do the ProcessReplace

longhorn-5684

Signed-off-by: Phan Le <phan.le@suse.com>
(cherry picked from commit 16b8bf3)
  • Loading branch information
PhanLe1010 authored and David Ko committed Apr 7, 2023
1 parent c566098 commit 2d0b300
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/process/process_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ func (pm *Manager) ProcessReplace(ctx context.Context, req *rpc.ProcessReplaceRe
return nil, err
}

if processToReplace.Binary == p.Binary {
logrus.Infof("Process Manager: the existing process already has the updated engine image %v", p.Binary)
return processToReplace.RPCResponse(), nil
}

cleanupReplacementProcess := func() {
// TODO process ports should be tied to process UUID's right now only the port ranges is used
// so if one is not careful with allocation/release it's possible that different processes nuke each
Expand Down

0 comments on commit 2d0b300

Please sign in to comment.