@@ -177,19 +177,26 @@ func runMultitenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster)
177
177
// parallel. The returned channel is closed once the workload
178
178
// finishes running on every tenant.
179
179
runTPCC := func (
180
- ctx context.Context , c cluster. Cluster , binaryPath string , h * mixedversion. Helper ,
180
+ ctx context.Context , h * mixedversion. Helper , version * clusterupgrade. Version ,
181
181
) chan struct {} {
182
182
return forEachTenant (
183
183
"run tpcc" ,
184
184
ctx ,
185
185
h ,
186
186
func (ctx context.Context , l * logger.Logger , tenant * tenantUpgradeStatus ) error {
187
+ nodes := c .Node (tenant .nodes [0 ])
188
+ // We may attempt to runTPCC using a cockroach binary version
189
+ // that was never uploaded. See #142807.
190
+ binaryPath , err := clusterupgrade .UploadCockroach (ctx , t , l , c , nodes , version )
191
+ if err != nil {
192
+ return errors .Wrapf (err , "uploading cockroach %s" , version )
193
+ }
187
194
cmd := fmt .Sprintf (
188
195
"%s workload run tpcc --warehouses %d --duration %s %s" ,
189
196
binaryPath , numWarehouses , tpccDuration , tenant .pgurl (),
190
197
)
191
198
192
- return c .RunE (ctx , option .WithNodes (c . Node ( tenant . nodes [ 0 ]) ), cmd )
199
+ return c .RunE (ctx , option .WithNodes (nodes ), cmd )
193
200
},
194
201
)
195
202
}
@@ -239,9 +246,8 @@ func runMultitenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster)
239
246
}
240
247
}
241
248
242
- binaryPath := clusterupgrade .BinaryPathForVersion (t , h .Context ().FromVersion , "cockroach" )
243
249
l .Printf ("waiting for tpcc to run on tenants..." )
244
- <- runTPCC (ctx , c , binaryPath , h )
250
+ <- runTPCC (ctx , h , h . Context (). FromVersion )
245
251
return nil
246
252
},
247
253
)
@@ -262,8 +268,7 @@ func runMultitenantUpgrade(ctx context.Context, t test.Test, c cluster.Cluster)
262
268
}
263
269
}
264
270
265
- binaryPath := clusterupgrade .BinaryPathForVersion (t , h .Context ().ToVersion , "cockroach" )
266
- tpccFinished := runTPCC (ctx , c , binaryPath , h )
271
+ tpccFinished := runTPCC (ctx , h , h .Context ().ToVersion )
267
272
268
273
upgradeFinished := forEachTenant (
269
274
"finalize upgrade" ,
0 commit comments