13647: Check ARVADOS_* env vars when loading config.
[arvados.git] / lib / config / load.go
index db4bc9f597e443d5554b6f422df35aa31d673598..61d80a3c58f535733ad65b9053b55283c9d08510 100644 (file)
@@ -28,6 +28,7 @@ type Loader struct {
        Logger         logrus.FieldLogger
        SkipDeprecated bool // Don't load deprecated config keys
        SkipLegacy     bool // Don't load legacy config files
+       SkipAPICalls   bool // Don't do checks that call RailsAPI/controller
 
        Path                    string
        KeepstorePath           string
@@ -244,6 +245,7 @@ func (ldr *Loader) Load() (*arvados.Config, error) {
                // * no primary config was loaded, and this is the
                // legacy config file for the current component
                for _, err := range []error{
+                       ldr.loadOldEnvironmentVariables(&cfg),
                        ldr.loadOldKeepstoreConfig(&cfg),
                        ldr.loadOldKeepWebConfig(&cfg),
                        ldr.loadOldCrunchDispatchSlurmConfig(&cfg),
@@ -261,7 +263,6 @@ func (ldr *Loader) Load() (*arvados.Config, error) {
        for id, cc := range cfg.Clusters {
                for _, err = range []error{
                        checkKeyConflict(fmt.Sprintf("Clusters.%s.PostgreSQL.Connection", id), cc.PostgreSQL.Connection),
-                       ldr.checkPendingKeepstoreMigrations(cc),
                        ldr.checkEmptyKeepstores(cc),
                        ldr.checkUnlistedKeepstores(cc),
                } {