15370: Merge branch 'main' into 15370-loopback-dispatchcloud
[arvados.git] / lib / boot / supervisor.go
index 5ec1b22448b68a4c50dd97545cba4c46ca9e6f80..7e641c62dd4407a69f6fbf7b3eeb6ff2cd97e002 100644 (file)
@@ -365,7 +365,7 @@ func (super *Supervisor) runCluster() error {
                runNginx{},
                runServiceCommand{name: "controller", svc: super.cluster.Services.Controller, depends: []supervisedTask{seedDatabase{}}},
                runServiceCommand{name: "git-httpd", svc: super.cluster.Services.GitHTTP},
-               runGoProgram{src: "services/health", svc: super.cluster.Services.Health},
+               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},
                runServiceCommand{name: "keep-web", svc: super.cluster.Services.WebDAV},
@@ -387,10 +387,14 @@ func (super *Supervisor) runCluster() error {
        }
        if super.ClusterType != "test" {
                tasks = append(tasks,
-                       runServiceCommand{name: "dispatch-cloud", svc: super.cluster.Services.DispatchCloud},
                        runServiceCommand{name: "keep-balance", svc: super.cluster.Services.Keepbalance},
                )
        }
+       if super.cluster.Containers.CloudVMs.Enable {
+               tasks = append(tasks,
+                       runServiceCommand{name: "dispatch-cloud", svc: super.cluster.Services.DispatchCloud},
+               )
+       }
        super.tasksReady = map[string]chan bool{}
        for _, task := range tasks {
                super.tasksReady[task.String()] = make(chan bool)
@@ -824,9 +828,6 @@ func (super *Supervisor) autofillConfig() error {
                &super.cluster.Services.Workbench1,
                &super.cluster.Services.Workbench2,
        } {
-               if svc == &super.cluster.Services.DispatchCloud && super.ClusterType == "test" {
-                       continue
-               }
                if svc.ExternalURL.Host == "" {
                        port, err := nextPort(defaultExtHost)
                        if err != nil {