X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2924f222d9efdb1b8776225d2d51bc8771d7b077..bdb24aacd6be5584fefc202452402ff4162c69ef:/services/api/config/arvados_config.rb diff --git a/services/api/config/arvados_config.rb b/services/api/config/arvados_config.rb index c47eeb5514..f8b9ff8ecd 100644 --- a/services/api/config/arvados_config.rb +++ b/services/api/config/arvados_config.rb @@ -36,7 +36,7 @@ if !status.success? puts stderr raise "error loading config: #{status}" end -confs = YAML.load(defaultYAML, deserialize_symbols: false) +confs = YAML.safe_load(defaultYAML) clusterID, clusterConfig = confs["Clusters"].first $arvados_config_defaults = clusterConfig $arvados_config_defaults["ClusterID"] = clusterID @@ -50,7 +50,7 @@ if ENV["ARVADOS_CONFIG"] == "none" else # Load the global config file Open3.popen2("arvados-server", "config-dump", "-skip-legacy") do |stdin, stdout, status_thread| - confs = YAML.load(stdout, deserialize_symbols: false) + confs = YAML.safe_load(stdout) if confs && !confs.empty? # config-dump merges defaults with user configuration, so every # key should be set. @@ -132,7 +132,6 @@ arvcfg.declare_config "Containers.DefaultKeepCacheRAM", Integer, :container_defa arvcfg.declare_config "Containers.MaxDispatchAttempts", Integer, :max_container_dispatch_attempts arvcfg.declare_config "Containers.MaxRetryAttempts", Integer, :container_count_max arvcfg.declare_config "Containers.AlwaysUsePreemptibleInstances", Boolean, :preemptible_instances -arvcfg.declare_config "Containers.MaxComputeVMs", Integer, :max_compute_nodes arvcfg.declare_config "Containers.Logging.LogBytesPerEvent", Integer, :crunch_log_bytes_per_event arvcfg.declare_config "Containers.Logging.LogSecondsBetweenEvents", ActiveSupport::Duration, :crunch_log_seconds_between_events arvcfg.declare_config "Containers.Logging.LogThrottlePeriod", ActiveSupport::Duration, :crunch_log_throttle_period @@ -199,7 +198,7 @@ application_config = {} path = "#{::Rails.root.to_s}/config/#{cfgfile}.yml" confs = ConfigLoader.load(path, erb: true) # Ignore empty YAML file: - next if confs == false + next if confs == nil application_config.deep_merge!(confs['common'] || {}) application_config.deep_merge!(confs[::Rails.env.to_s] || {}) end