[ARVADOS] updated: 1.3.0-2306-gec7126037

Git user git at public.arvados.org
Fri Feb 28 05:52:39 UTC 2020


Summary of changes:
 lib/boot/passenger.go                 | 7 ++++++-
 lib/boot/seed.go                      | 2 +-
 services/api/config/arvados_config.rb | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

       via  ec71260376a0cb9d49be32548e33cccb5934ebea (commit)
      from  bb3339bdbfff4f41c7b831b78aeb1288ba6431c2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ec71260376a0cb9d49be32548e33cccb5934ebea
Author: Tom Clegg <tom at tomclegg.ca>
Date:   Fri Feb 28 00:51:44 2020 -0500

    15954: Skip database.yml when running under arvados-server boot.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>

diff --git a/lib/boot/passenger.go b/lib/boot/passenger.go
index 33afb721d..6a2c4b61f 100644
--- a/lib/boot/passenger.go
+++ b/lib/boot/passenger.go
@@ -20,6 +20,11 @@ import (
 // concurrent installs.
 var passengerInstallMutex sync.Mutex
 
+var railsEnv = []string{
+	"ARVADOS_RAILS_LOG_TO_STDOUT=1",
+	"ARVADOS_CONFIG_NOLEGACY=1", // don't load database.yml from source tree
+}
+
 // Install a Rails application's dependencies, including phusion
 // passenger.
 type installPassenger struct {
@@ -111,7 +116,7 @@ func (runner runPassenger) Run(ctx context.Context, fail func(error), super *Sup
 	super.waitShutdown.Add(1)
 	go func() {
 		defer super.waitShutdown.Done()
-		err = super.RunProgram(ctx, runner.src, nil, []string{"ARVADOS_RAILS_LOG_TO_STDOUT=1"}, "bundle", "exec",
+		err = super.RunProgram(ctx, runner.src, nil, railsEnv, "bundle", "exec",
 			"passenger", "start",
 			"-p", port,
 			"--log-file", "/dev/stderr",
diff --git a/lib/boot/seed.go b/lib/boot/seed.go
index ce5d296bd..d1cf2a870 100644
--- a/lib/boot/seed.go
+++ b/lib/boot/seed.go
@@ -20,7 +20,7 @@ func (seedDatabase) Run(ctx context.Context, fail func(error), super *Supervisor
 	if err != nil {
 		return err
 	}
-	err = super.RunProgram(ctx, "services/api", nil, []string{"ARVADOS_RAILS_LOG_TO_STDOUT=1"}, "bundle", "exec", "rake", "db:setup")
+	err = super.RunProgram(ctx, "services/api", nil, railsEnv, "bundle", "exec", "rake", "db:setup")
 	if err != nil {
 		return err
 	}
diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb
index 07d8834b9..8d2544dde 100644
--- a/services/api/config/arvados_config.rb
+++ b/services/api/config/arvados_config.rb
@@ -203,7 +203,7 @@ end
 
 db_config = {}
 path = "#{::Rails.root.to_s}/config/database.yml"
-if File.exist? path
+if !ENV['ARVADOS_CONFIG_NOLEGACY'] && File.exist?(path)
   db_config = ConfigLoader.load(path, erb: true)
 end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list