engine, integration, setup: Seeds should be called properly
This commit is contained in:
@@ -574,8 +574,14 @@ func (obj *VirtBuilderRes) CheckApply(ctx context.Context, apply bool) (bool, er
|
||||
"--enable", // start on first boot!
|
||||
fmt.Sprintf("--binary-path=%s", m),
|
||||
"--no-server", // TODO: hardcode this for now
|
||||
fmt.Sprintf("--seeds=%s", strings.Join(obj.Seeds, ",")),
|
||||
//fmt.Sprintf("--seeds=%s", strings.Join(obj.Seeds, ",")),
|
||||
}
|
||||
for _, seed := range obj.Seeds {
|
||||
// TODO: validate each seed?
|
||||
s := fmt.Sprintf("--seeds=%s", seed)
|
||||
setupSvc = append(setupSvc, s)
|
||||
}
|
||||
|
||||
setupSvcCmd := strings.Join(setupSvc, " ")
|
||||
args := []string{"--run-command", setupSvcCmd} // cmd must be a single string
|
||||
cmdArgs = append(cmdArgs, args...)
|
||||
|
||||
@@ -261,12 +261,11 @@ func (obj *Instance) Run(seeds []*Instance) error {
|
||||
return fmt.Errorf("instance `%s` has not started yet", instance.Hostname)
|
||||
}
|
||||
urls = append(urls, instance.clientURL)
|
||||
}
|
||||
s := fmt.Sprintf("--seeds=%s", urls[0])
|
||||
// TODO: we could just add all the seeds instead...
|
||||
//s := fmt.Sprintf("--seeds=%s", strings.Join(urls, ","))
|
||||
|
||||
s := fmt.Sprintf("--seeds=%s", instance.clientURL)
|
||||
cmdArgs = append(cmdArgs, s)
|
||||
}
|
||||
}
|
||||
if obj.EtcdServer {
|
||||
cmdArgs = append(cmdArgs, "--no-server")
|
||||
cmdArgs = append(cmdArgs, "--ideal-cluster-size=1")
|
||||
|
||||
@@ -115,9 +115,9 @@ func (obj *Svc) Run(ctx context.Context) error {
|
||||
argv = append(argv, fmt.Sprintf("--ssh-url=%s", s))
|
||||
}
|
||||
|
||||
if seeds := obj.SetupSvcArgs.Seeds; len(seeds) > 0 {
|
||||
for _, seed := range obj.SetupSvcArgs.Seeds {
|
||||
// TODO: validate each seed?
|
||||
s := fmt.Sprintf("--seeds=%s", strings.Join(seeds, ","))
|
||||
s := fmt.Sprintf("--seeds=%s", seed)
|
||||
argv = append(argv, s)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user