Merge branch 'master' into 14716-webdav-cluster-config
[arvados.git] / lib / config / export.go
index cdc8539f108db2109fbf189e76e14547f13bf734..f6b19db252f8292eb4cace79cdf55f88d56f5701 100644 (file)
@@ -26,6 +26,10 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error {
        if err != nil {
                return err
        }
+
+       // ClusterID is not marshalled by default (see `json:"-"`).
+       // Add it back here so it is included in the exported config.
+       m["ClusterID"] = cluster.ClusterID
        err = redactUnsafe(m, "", "")
        if err != nil {
                return err
@@ -55,6 +59,7 @@ func ExportJSON(w io.Writer, cluster *arvados.Cluster) error {
 // exists.
 var whitelist = map[string]bool{
        // | sort -t'"' -k2,2
+       "ClusterID":                                    true,
        "API":                                          true,
        "API.AsyncPermissionsUpdateInterval":           false,
        "API.DisabledAPIs":                             false,