m/n/c/cluster: fix logic error in bootstrap
There was a missing condition in there, causing the code to erroneously
return with an error even though none occurred.
Change-Id: Ib36f3f1606508655ed5990aed624ef51c45a3b97
Reviewed-on: https://review.monogon.dev/c/monogon/+/1638
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/node/core/cluster/cluster_bootstrap.go b/metropolis/node/core/cluster/cluster_bootstrap.go
index 78dea0b..d86f995 100644
--- a/metropolis/node/core/cluster/cluster_bootstrap.go
+++ b/metropolis/node/core/cluster/cluster_bootstrap.go
@@ -42,7 +42,9 @@
} else {
var err error
cc, err = curator.ClusterConfigurationFromInitial(bootstrap.InitialClusterConfiguration)
- return fmt.Errorf("invalid initial cluster configuration: %w", err)
+ if err != nil {
+ return fmt.Errorf("invalid initial cluster configuration: %w", err)
+ }
}
tpmUsage, err := cc.NodeTPMUsage(m.haveTPM)