Skip to content

Commit

Permalink
roachprod: fix node environment variable propagation
Browse files Browse the repository at this point in the history
In cockroachdb#67363, configured environment variables were no longer
propagated to nodes. In particular, the default node envvar
`COCKROACH_ENABLE_RPC_COMPRESSION=false` was not passed,
which caused a 5% performance regression on certain benchmarks.

This patch fixes propagation of environment variables.

Release note: None
  • Loading branch information
erikgrinaker committed Aug 14, 2021
1 parent ee3efd6 commit c7df691
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/roachprod/install/cluster_synced.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type SyncedCluster struct {
Nodes []int
Secure bool
CertsDir string
Env string
Env []string
Args []string
Tag string
Impl ClusterImpl
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/roachprod/install/cockroach.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ func (h *crdbInstallHelper) generateStartCmd(
LogDir: h.c.Impl.LogDir(h.c, nodes[nodeIdx]),
KeyCmd: h.generateKeyCmd(nodeIdx, extraArgs),
Tag: h.c.Tag,
EnvVars: append([]string{
EnvVars: append(append([]string{
"GOTRACEBACK=crash",
"COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING=1",
}, h.getEnvVars()...),
}, h.c.Env...), h.getEnvVars()...),
Binary: cockroachNodeBinary(h.c, nodes[nodeIdx]),
StartCmd: startCmd,
Args: args,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/roachprod/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Available clusters:
c.Nodes = nodes
c.Secure = secure
c.CertsDir = certsDir
c.Env = strings.Join(nodeEnv, " ")
c.Env = nodeEnv
c.Args = nodeArgs
if tag != "" {
c.Tag = "/" + tag
Expand Down

0 comments on commit c7df691

Please sign in to comment.