Skip to content

Commit

Permalink
Use instance name when launching processes
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Weber <eric.weber@suse.com>
  • Loading branch information
ejweber committed May 11, 2023
1 parent 66d7f01 commit c79cbbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engineapi/instance_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit c79cbbb

Please sign in to comment.