From b651e8855230d9750c94d87711d078dbd7830a28 Mon Sep 17 00:00:00 2001 From: Phan Le Date: Wed, 28 Aug 2024 15:40:15 -0700 Subject: [PATCH] fix(live upgrade): newly live upgraded engine doesn't respect the disableRevCounter setting We forget to set disableRevCounter for the newly live upgraded engine. As a result, the newly live upgraded engine always has disableRevCounter as `false` even if the volume has disableRevCounter as `true`. This mismatch prevents the volume from successfully rebuilding a new replica. longhorn-9331 Signed-off-by: Phan Le (cherry picked from commit abb8f260796dcc5ee1ab84c5a20385217aeb7243) --- engineapi/instance_manager.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engineapi/instance_manager.go b/engineapi/instance_manager.go index 9a4bd9b753..dab0a0a685 100644 --- a/engineapi/instance_manager.go +++ b/engineapi/instance_manager.go @@ -718,6 +718,10 @@ func (c *InstanceManagerClient) engineInstanceUpgrade(req *EngineInstanceUpgrade args = append(args, "--replica", GetBackendReplicaURL(addr)) } + if req.Engine.Spec.RevisionCounterDisabled { + args = append(args, "--disableRevCounter") + } + if req.EngineCLIAPIVersion >= 6 { args = append(args, "--size", strconv.FormatInt(req.Engine.Spec.VolumeSize, 10),