From 8e7cd4d6606f187119883ad1fa86f1200d4cdec8 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Thu, 31 May 2018 13:56:02 -0400 Subject: [PATCH 1/2] roachtest: default --wipe to true for roachtest bench We had made this default to false, but that made it too easy to leak clusters. Let's not do that. Release note: None --- pkg/cmd/roachtest/main.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkg/cmd/roachtest/main.go b/pkg/cmd/roachtest/main.go index efa4d705b5a6..1e479a11a188 100644 --- a/pkg/cmd/roachtest/main.go +++ b/pkg/cmd/roachtest/main.go @@ -58,9 +58,6 @@ func main() { rootCmd.PersistentFlags().BoolVarP( &encrypt, "encrypt", "", encrypt, "start cluster with encryption at rest turned on") - clusterWipeRun := true - clusterWipeBench := false - var runCmd = &cobra.Command{ Use: "run [tests]", Short: "run automated tests on cockroach cluster", @@ -81,7 +78,6 @@ Use 'roachtest run -n' to see a list of all tests. r.loadBuildVersion() } registerTests(r) - clusterWipe = clusterWipeRun os.Exit(r.Run(args)) return nil }, @@ -107,15 +103,13 @@ Use 'roachtest bench -n' to see a list of all benchmarks. } r := newRegistry() registerBenchmarks(r) - clusterWipe = clusterWipeBench os.Exit(r.Run(args)) return nil }, } // Register flags shared between `run` and `bench`. - wipe := []*bool{&clusterWipeRun, &clusterWipeBench} - for i, cmd := range []*cobra.Command{runCmd, benchCmd} { + for _, cmd := range []*cobra.Command{runCmd, benchCmd} { cmd.Flags().StringVar( &artifacts, "artifacts", "artifacts", "path to artifacts directory") cmd.Flags().StringVar( @@ -131,7 +125,7 @@ Use 'roachtest bench -n' to see a list of all benchmarks. cmd.Flags().StringVar( &roachprod, "roachprod", "", "path to roachprod binary to use") cmd.Flags().BoolVar( - wipe[i], "wipe", *wipe[i], + &clusterWipe, "wipe", true, "wipe existing cluster before starting test (for use with --cluster)") cmd.Flags().StringVar( &zonesF, "zones", "", "Zones for the cluster (use roachprod defaults if empty)") @@ -147,7 +141,6 @@ Cockroach cluster with existing data. RunE: func(_ *cobra.Command, args []string) error { r := newRegistry() registerStoreGen(r, args) - clusterWipe = true // We've only registered one store generation "test" that does its own // argument processing, so no need to provide any arguments to r.Run. os.Exit(r.Run(nil /* filter */)) From eb3d44a752ea439f121c96d30e860fa64ee5fc2f Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Thu, 31 May 2018 13:57:02 -0400 Subject: [PATCH 2/2] tpccbench: fix a few usability issues - Fix store dir loading - Log load gen errors - Increase 18 node cluster to 30 node cluster Release note: None --- pkg/cmd/roachtest/tpcc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/roachtest/tpcc.go b/pkg/cmd/roachtest/tpcc.go index 3d8ebd3f7be7..0d2d8c8175da 100644 --- a/pkg/cmd/roachtest/tpcc.go +++ b/pkg/cmd/roachtest/tpcc.go @@ -173,7 +173,7 @@ func loadTPCCBench( if b.StoreDirVersion != "" { c.l.printf("ingesting existing tpcc store dump\n") - urlBase, err := c.RunWithBuffer(ctx, c.l, c.Node(1), + urlBase, err := c.RunWithBuffer(ctx, c.l, loadNode, fmt.Sprintf(`./workload fixtures url tpcc --warehouses=%d`, b.LoadWarehouses)) if err != nil { return err @@ -299,7 +299,7 @@ func runTPCCBench(ctx context.Context, t *test, c *cluster, b tpccBenchSpec) { out, err := c.RunWithBuffer(ctx, c.l, loadNode, cmd) loadDone <- timeutil.Now() if err != nil { - return false, err + return false, errors.Wrapf(err, "error running tpcc load generator:\n\n%s\n", out) } // Parse the stats header and stats lines from the output. @@ -380,7 +380,7 @@ func registerTPCCBench(r *registry) { }, // objective 1, key result 1 & 2. { - Nodes: 18, + Nodes: 30, CPUs: 16, LoadWarehouses: 10000,