From caed419892045a4dcb32a2cdab26c4b64579b9cb Mon Sep 17 00:00:00 2001 From: Victor Chen Date: Sun, 29 Apr 2018 13:19:00 -0400 Subject: [PATCH] roachtest: fix `unzip` command not found. Fixes `debug.go` roachtest that `unzip` command not found in gce. So install `unzip` before running command. Fixes #25152. Release note: None --- pkg/cmd/roachtest/debug.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/debug.go b/pkg/cmd/roachtest/debug.go index dc235fcdc99d..502184d4fc0e 100644 --- a/pkg/cmd/roachtest/debug.go +++ b/pkg/cmd/roachtest/debug.go @@ -37,6 +37,10 @@ func registerDebug(r *registry) { return err } + if err := c.RunE(ctx, c.Node(node), "sudo apt-get install unzip"); err != nil { + return err + } + if err := c.RunE(ctx, c.Node(node), "unzip "+file); err != nil { return err } @@ -45,7 +49,15 @@ func registerDebug(r *registry) { return err } - return c.RunE(ctx, c.Node(node), "grep 'server_version' ./debug/gossip/nodes") + if err := c.RunE(ctx, c.Node(node), "grep 'server_version' ./debug/gossip/nodes"); err != nil { + return err + } + + if err := c.RunE(ctx, c.Node(node), "rm -rf debug"); err != nil { + return err + } + + return c.RunE(ctx, c.Node(node), "rm "+file) } // Wait until each nodes has at least 3 replications.