Project

General

Profile

Actions

Bug #15642

closed

[config] Don't erase cluster config values just because their counterparts don't appear in legacy configs

Added by Tom Clegg over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release relationship:
Auto

Description

The legacy config loaders for arv-git-httpd and keep-web have code like this:

        cluster.ManagementToken = oc.ManagementToken

As a result, if the legacy arv-git-httpd config file exists, but does not mention ManagementToken, the active configuration uses a blank ManagementToken. The correct behavior in such cases is to use the value given in a different legacy config file, or the value given in the new cluster config file, or the default value (which happens to be blank in this specific case).

To fix this, the old config structs should have *string instead of string fields, and the overrides should be conditional on Field != nil, as in the crunch-dispatch-slurm loading code, which doesn't have this bug:

        if oc.PollPeriod != nil {
                cluster.Containers.CloudVMs.PollInterval = *oc.PollPeriod
        }

Subtasks 1 (0 open1 closed)

Task #15810: Review 15642-cluster-config-fixResolvedLucas Di Pentima11/12/2019Actions

Related issues 1 (0 open1 closed)

Blocks Arvados - Idea #13648: [Epic] Use one cluster configuration file for all componentsResolvedActions
Actions

Also available in: Atom PDF