15370: Add dispatchcloud loopback driver.
[arvados.git] / lib / boot / supervisor.go
index 5ec1b22448b68a4c50dd97545cba4c46ca9e6f80..d69cc9f18c522449f5d5b3df1999cc1b270ed16c 100644 (file)
@@ -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 {