X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/37ab0eedec5eaf99c27b6b64fd04cc9248081713..HEAD:/lib/boot/service.go diff --git a/lib/boot/service.go b/lib/boot/service.go index 5afacfe716..506407f4e8 100644 --- a/lib/boot/service.go +++ b/lib/boot/service.go @@ -30,11 +30,12 @@ func (runner runServiceCommand) String() string { } func (runner runServiceCommand) Run(ctx context.Context, fail func(error), super *Supervisor) error { - binfile := filepath.Join(super.tempdir, "bin", "arvados-server") - err := super.RunProgram(ctx, super.tempdir, nil, nil, binfile, "-version") + binfile := filepath.Join(super.bindir, "arvados-server") + err := super.RunProgram(ctx, super.bindir, runOptions{}, binfile, "-version") if err != nil { return err } + super.wait(ctx, createCertificates{}) super.wait(ctx, runner.depends...) for u := range runner.svc.InternalURLs { u := u @@ -46,7 +47,15 @@ func (runner runServiceCommand) Run(ctx context.Context, fail func(error), super super.waitShutdown.Add(1) go func() { defer super.waitShutdown.Done() - fail(super.RunProgram(ctx, super.tempdir, nil, []string{"ARVADOS_SERVICE_INTERNAL_URL=" + u.String()}, binfile, runner.name, "-config", super.configfile)) + fail(super.RunProgram(ctx, super.tempdir, runOptions{ + env: []string{ + "ARVADOS_SERVICE_INTERNAL_URL=" + u.String(), + // Child process should not + // try to tell systemd that we + // are ready. + "NOTIFY_SOCKET=", + }, + }, binfile, runner.name, "-config", super.configfile)) }() } return nil @@ -77,11 +86,12 @@ func (runner runGoProgram) Run(ctx context.Context, fail func(error), super *Sup return ctx.Err() } - err = super.RunProgram(ctx, super.tempdir, nil, nil, binfile, "-version") + err = super.RunProgram(ctx, super.tempdir, runOptions{}, binfile, "-version") if err != nil { return err } + super.wait(ctx, createCertificates{}) super.wait(ctx, runner.depends...) for u := range runner.svc.InternalURLs { u := u @@ -93,7 +103,7 @@ func (runner runGoProgram) Run(ctx context.Context, fail func(error), super *Sup super.waitShutdown.Add(1) go func() { defer super.waitShutdown.Done() - fail(super.RunProgram(ctx, super.tempdir, nil, []string{"ARVADOS_SERVICE_INTERNAL_URL=" + u.String()}, binfile)) + fail(super.RunProgram(ctx, super.tempdir, runOptions{env: []string{"ARVADOS_SERVICE_INTERNAL_URL=" + u.String()}}, binfile)) }() } return nil