From c79cbbbcfd0fec87addb0145f8afa51a127becc5 Mon Sep 17 00:00:00 2001 From: Eric Weber Date: Wed, 10 May 2023 13:25:12 -0500 Subject: [PATCH] Use instance name when launching processes Signed-off-by: Eric Weber --- engineapi/instance_manager.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engineapi/instance_manager.go b/engineapi/instance_manager.go index 178eb09696..abef7fc547 100644 --- a/engineapi/instance_manager.go +++ b/engineapi/instance_manager.go @@ -195,6 +195,10 @@ func (c *InstanceManagerClient) EngineProcessCreate(e *longhorn.Engine, volumeFr } } + if engineCLIAPIVersion >= 9 { + args = append(args, "--instance-name", e.ObjectMeta.Name) + } + for _, addr := range e.Status.CurrentReplicaAddressMap { args = append(args, "--replica", GetBackendReplicaURL(addr)) } @@ -235,6 +239,10 @@ func (c *InstanceManagerClient) ReplicaProcessCreate(replica *longhorn.Replica, } } + if engineCLIAPIVersion >= 9 { + args = append(args, "--instance-name", replica.ObjectMeta.Name) + } + binary := filepath.Join(types.GetEngineBinaryDirectoryForReplicaManagerContainer(replica.Spec.EngineImage), types.EngineBinaryName) replicaProcess, err := c.grpcClient.ProcessCreate(