Skip to content

Commit f964186

Browse files
committed
roachprod: insecure cluster warn log
As of #151230, roachprod's default behavior is to provision secure clusters unless provisioning is in the cockroach-ephemeral GCP project. To warn the user about the fact that the cluster is insecure in this configuration, a log was added to stdout. The addition of this log message broke some K/V performance scripts, so this patch moves the warning to stderr instead. Epic: none Release note: None
1 parent 2eb84bc commit f964186

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/roachprod/install/cluster_settings.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package install
77

88
import (
99
"fmt"
10+
"os"
1011

1112
"github.com/cockroachdb/cockroach/pkg/roachprod/config"
1213
"github.com/cockroachdb/cockroach/pkg/roachprod/vm/gce"
@@ -109,7 +110,7 @@ func (o ComplexSecureOption) overrideBasedOnClusterSettings(c *SyncedCluster) er
109110
// we make it insecure by default. This is to avoid dealing with certificates
110111
// for ephemeral engineering test clusters.
111112
if len(c.Clouds()) == 1 && c.Clouds()[0] == fmt.Sprintf("%s:%s", gce.ProviderName, gce.DefaultProjectID) {
112-
fmt.Printf("WARN: cluster %s defaults to insecure, because it is in project %s\n",
113+
fmt.Fprintf(os.Stderr, "WARN: cluster %s defaults to insecure, because it is in project %s\n",
113114
c.Name,
114115
gce.DefaultProjectID,
115116
)

0 commit comments

Comments
 (0)