From 7f17c0483f2e86575ed87aac35fb75154b16b7f4 Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 19 Jun 2018 18:23:57 +0200 Subject: [PATCH] pkg/serverinit: call readFields on GCE too Fixes #1193 Change-Id: Ic82af5ec94e010d5d0d4d63df814daf4ad9e0542 --- pkg/serverinit/env.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/serverinit/env.go b/pkg/serverinit/env.go index 076cafc66..8f305e6c2 100644 --- a/pkg/serverinit/env.go +++ b/pkg/serverinit/env.go @@ -119,5 +119,13 @@ func DefaultEnvConfig() (*Config, error) { return nil, fmt.Errorf("unexpected value for VM instance metadata key 'perkeep-config-version': %q", configVersion) } - return genLowLevelConfig(highConf) + conf, err := genLowLevelConfig(highConf) + if err != nil { + return nil, err + } + + if err := conf.readFields(); err != nil { + return nil, err + } + return conf, nil }