[ARVADOS] created: 2.1.0-241-ge4a6240bf

Git user git at public.arvados.org
Mon Dec 28 20:38:52 UTC 2020


        at  e4a6240bf2ca163c36a4357ef0f80958c40bd39a (commit)


commit e4a6240bf2ca163c36a4357ef0f80958c40bd39a
Author: Tom Clegg <tom at curii.com>
Date:   Mon Dec 28 15:33:33 2020 -0500

    17175: Wait for seedDatabase before starting railsapi.
    
    If the rake task and the app start concurrently, they both try to set
    up the database seeds. The exclusive-locking mechanism in
    services/api/app/lib/current_api_client.rb doesn't cover this case
    because the rake task and app don't use the same cache. If the app
    commits the database seeds between the rake task's "check existing"
    and "commit" steps, commit fails and the rake task aborts.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go
index a85a699c3..0e96beabd 100644
--- a/lib/boot/supervisor.go
+++ b/lib/boot/supervisor.go
@@ -216,16 +216,16 @@ func (super *Supervisor) run(cfg *arvados.Config) error {
 		createCertificates{},
 		runPostgreSQL{},
 		runNginx{},
-		runServiceCommand{name: "controller", svc: super.cluster.Services.Controller, depends: []supervisedTask{runPostgreSQL{}}},
+		runServiceCommand{name: "controller", svc: super.cluster.Services.Controller, depends: []supervisedTask{seedDatabase{}}},
 		runGoProgram{src: "services/arv-git-httpd", svc: super.cluster.Services.GitHTTP},
 		runGoProgram{src: "services/health", svc: super.cluster.Services.Health},
 		runGoProgram{src: "services/keepproxy", svc: super.cluster.Services.Keepproxy, depends: []supervisedTask{runPassenger{src: "services/api"}}},
 		runGoProgram{src: "services/keepstore", svc: super.cluster.Services.Keepstore},
 		runGoProgram{src: "services/keep-web", svc: super.cluster.Services.WebDAV},
-		runServiceCommand{name: "ws", svc: super.cluster.Services.Websocket, depends: []supervisedTask{runPostgreSQL{}}},
+		runServiceCommand{name: "ws", svc: super.cluster.Services.Websocket, depends: []supervisedTask{seedDatabase{}}},
 		installPassenger{src: "services/api"},
-		runPassenger{src: "services/api", svc: super.cluster.Services.RailsAPI, depends: []supervisedTask{createCertificates{}, runPostgreSQL{}, installPassenger{src: "services/api"}}},
-		installPassenger{src: "apps/workbench", depends: []supervisedTask{installPassenger{src: "services/api"}}}, // dependency ensures workbench doesn't delay api startup
+		runPassenger{src: "services/api", svc: super.cluster.Services.RailsAPI, depends: []supervisedTask{createCertificates{}, seedDatabase{}, installPassenger{src: "services/api"}}},
+		installPassenger{src: "apps/workbench", depends: []supervisedTask{seedDatabase{}}}, // dependency ensures workbench doesn't delay api install/startup
 		runPassenger{src: "apps/workbench", svc: super.cluster.Services.Workbench1, depends: []supervisedTask{installPassenger{src: "apps/workbench"}}},
 		seedDatabase{},
 	}

commit 1917992733f0a467cd068bedfa236efd6f4c37bc
Author: Tom Clegg <tom at curii.com>
Date:   Mon Dec 28 15:21:04 2020 -0500

    17175: Fix logging label for setuidgid-wrapped procs.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go
index 1e8e83ff3..a85a699c3 100644
--- a/lib/boot/supervisor.go
+++ b/lib/boot/supervisor.go
@@ -451,8 +451,8 @@ func (super *Supervisor) RunProgram(ctx context.Context, dir string, output io.W
 	super.logger.WithField("command", cmdline).WithField("dir", dir).Info("executing")
 
 	logprefix := prog
-	if logprefix == "setuidgid" && len(args) >= 3 {
-		logprefix = args[2]
+	if logprefix == "setuidgid" && len(args) >= 2 {
+		logprefix = args[1]
 	}
 	logprefix = strings.TrimPrefix(logprefix, super.tempdir+"/bin/")
 	if logprefix == "bundle" && len(args) > 2 && args[0] == "exec" {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list