From 9272602d332b667b1a5fa373b339dd9f31414c6e Mon Sep 17 00:00:00 2001 From: Renato Costa Date: Wed, 6 Jul 2022 14:32:05 -0400 Subject: [PATCH] roachprod: fix target path when getting cluster artifacts. A bug was introduced in the computation of the local path where cluster artifacts are downloaded: instead of prefixing the path with the node ID, the list of nodes would be used instead. This results in (other than weird looking paths, such as `[1 2 3 4].logs`) only the logs for the last node being downloaded. This commit fixes the issue by using the node ID correctly. Release note: None. --- pkg/roachprod/install/cluster_synced.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/roachprod/install/cluster_synced.go b/pkg/roachprod/install/cluster_synced.go index 3f09950faed7..9535bfe87ddf 100644 --- a/pkg/roachprod/install/cluster_synced.go +++ b/pkg/roachprod/install/cluster_synced.go @@ -1846,7 +1846,7 @@ func (c *SyncedCluster) Get(l *logger.Logger, nodes Nodes, src, dest string) err src := src dest := dest if len(nodes) > 1 { - base := fmt.Sprintf("%d.%s", nodes, filepath.Base(dest)) + base := fmt.Sprintf("%d.%s", nodes[i], filepath.Base(dest)) dest = filepath.Join(filepath.Dir(dest), base) }