X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7db74f672f64b3e647a98c1d8e5978b50d79538d..950e76c1dc342ffe79080c9ef911e841675b7b0b:/lib/boot/supervisor.go diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go index 55fe9d2e37..67649e75de 100644 --- a/lib/boot/supervisor.go +++ b/lib/boot/supervisor.go @@ -61,8 +61,7 @@ type Supervisor struct { // explicitly configured in config file. If blank, use a // random port on ListenHost. ControllerAddr string - // Path to arvados-workbench2 source tree checkout. - Workbench2Source string + NoWorkbench1 bool NoWorkbench2 bool OwnTemporaryDatabase bool @@ -112,7 +111,7 @@ func (super *Supervisor) Start(ctx context.Context) { super.ctx, super.cancel = context.WithCancel(ctx) super.done = make(chan struct{}) - sigch := make(chan os.Signal) + sigch := make(chan os.Signal, 1) signal.Notify(sigch, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP) go func() { defer signal.Stop(sigch) @@ -205,15 +204,24 @@ func (super *Supervisor) Wait() error { func (super *Supervisor) startFederation(cfg *arvados.Config) { super.children = map[string]*Supervisor{} for id, cc := range cfg.Clusters { - super2 := *super yaml, err := json.Marshal(arvados.Config{Clusters: map[string]arvados.Cluster{id: cc}}) if err != nil { panic(fmt.Sprintf("json.Marshal partial config: %s", err)) } - super2.ConfigYAML = string(yaml) - super2.ConfigPath = "-" - super2.children = nil - + super2 := &Supervisor{ + ConfigPath: "-", + ConfigYAML: string(yaml), + SourcePath: super.SourcePath, + SourceVersion: super.SourceVersion, + ClusterType: super.ClusterType, + ListenHost: super.ListenHost, + ControllerAddr: super.ControllerAddr, + NoWorkbench1: super.NoWorkbench1, + NoWorkbench2: super.NoWorkbench2, + OwnTemporaryDatabase: super.OwnTemporaryDatabase, + Stdin: super.Stdin, + Stderr: super.Stderr, + } if super2.ClusterType == "test" { super2.Stderr = &service.LogPrefixer{ Writer: super.Stderr, @@ -221,7 +229,7 @@ func (super *Supervisor) startFederation(cfg *arvados.Config) { } } super2.Start(super.ctx) - super.children[id] = &super2 + super.children[id] = super2 } } @@ -358,7 +366,6 @@ func (super *Supervisor) runCluster() error { runNginx{}, railsDatabase{}, runServiceCommand{name: "controller", svc: super.cluster.Services.Controller, depends: []supervisedTask{railsDatabase{}}}, - runServiceCommand{name: "git-httpd", svc: super.cluster.Services.GitHTTP}, runServiceCommand{name: "health", svc: super.cluster.Services.Health}, runServiceCommand{name: "keepproxy", svc: super.cluster.Services.Keepproxy, depends: []supervisedTask{runPassenger{src: "services/api"}}}, runServiceCommand{name: "keepstore", svc: super.cluster.Services.Keepstore}, @@ -372,10 +379,7 @@ func (super *Supervisor) runCluster() error { }}, } if !super.NoWorkbench1 { - tasks = append(tasks, - installPassenger{src: "apps/workbench", varlibdir: "workbench1", depends: []supervisedTask{railsDatabase{}}}, // dependency ensures workbench doesn't delay api install/startup - runPassenger{src: "apps/workbench", varlibdir: "workbench1", svc: super.cluster.Services.Workbench1, depends: []supervisedTask{installPassenger{src: "apps/workbench", varlibdir: "workbench1"}}}, - ) + return errors.New("workbench1 is no longer supported") } if !super.NoWorkbench2 { tasks = append(tasks, @@ -816,7 +820,6 @@ func (super *Supervisor) autofillConfig() error { for _, svc := range []*arvados.Service{ &super.cluster.Services.Controller, &super.cluster.Services.DispatchCloud, - &super.cluster.Services.GitHTTP, &super.cluster.Services.Health, &super.cluster.Services.Keepproxy, &super.cluster.Services.Keepstore, @@ -834,7 +837,6 @@ func (super *Supervisor) autofillConfig() error { } host := net.JoinHostPort(defaultExtHost, port) if svc == &super.cluster.Services.Controller || - svc == &super.cluster.Services.GitHTTP || svc == &super.cluster.Services.Health || svc == &super.cluster.Services.Keepproxy || svc == &super.cluster.Services.WebDAV || @@ -849,7 +851,7 @@ func (super *Supervisor) autofillConfig() error { if super.NoWorkbench1 && svc == &super.cluster.Services.Workbench1 || super.NoWorkbench2 && svc == &super.cluster.Services.Workbench2 || !super.cluster.Containers.CloudVMs.Enable && svc == &super.cluster.Services.DispatchCloud { - // When workbench1 is disabled, it gets an + // When Workbench is disabled, it gets an // ExternalURL (so we have a valid listening // port to write in our Nginx config) but no // InternalURLs (so health checker doesn't