Skip to content

Commit 2d0b300

Browse files
PhanLe1010David Ko
authored andcommitted
Fix bug: volume is stuck in live engine upgrading
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)
1 parent c566098 commit 2d0b300

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/process/process_manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,11 @@ func (pm *Manager) ProcessReplace(ctx context.Context, req *rpc.ProcessReplaceRe
457457
return nil, err
458458
}
459459

460+
if processToReplace.Binary == p.Binary {
461+
logrus.Infof("Process Manager: the existing process already has the updated engine image %v", p.Binary)
462+
return processToReplace.RPCResponse(), nil
463+
}
464+
460465
cleanupReplacementProcess := func() {
461466
// TODO process ports should be tied to process UUID's right now only the port ranges is used
462467
// so if one is not careful with allocation/release it's possible that different processes nuke each

0 commit comments

Comments
 (0)