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