Skip to content

Commit 37687e0

Browse files
committed
[core] Only query for active ODC partitions, and immediately Shutdown
1 parent ff7512b commit 37687e0

2 files changed

Lines changed: 4 additions & 21 deletions

File tree

core/integration/odc/handlers.go

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ func handleCleanup(ctx context.Context, odcClient *RpcClient, arguments map[stri
284284
defer utils.TimeTrackFunction(time.Now(), log.WithPrefix("odcclient"))
285285

286286
// First we query ODC for the full list of active partitions
287-
req := &odcpb.StatusRequest{}
287+
req := &odcpb.StatusRequest{Running: true}
288288

289289
var err error = nil
290290
var rep *odcpb.StatusReply
@@ -353,25 +353,8 @@ func handleCleanup(ctx context.Context, odcClient *RpcClient, arguments map[stri
353353

354354
// Then the actual cleanup calls begin, one partition at a time...
355355
for odcPartitionId, _ := range partitionsToClean {
356-
// This block tries to perform the regular teardown sequence.
357-
// Since Shutdown is supposed to work in any state, we don't bail on error.
358-
err := doReset(ctx, odcClient, arguments, odcPartitionId)
359-
if err != nil {
360-
log.WithError(printGrpcError(err)).
361-
WithField("level", infologger.IL_Devel).
362-
WithField("partition", odcPartitionId).
363-
Warn("ODC Reset call failed")
364-
}
365-
366-
err = doTerminate(ctx, odcClient, arguments, odcPartitionId)
367-
if err != nil {
368-
log.WithError(printGrpcError(err)).
369-
WithField("level", infologger.IL_Devel).
370-
WithField("partition", odcPartitionId).
371-
Warn("ODC Terminate call failed")
372-
}
373356

374-
err = doShutdown(ctx, odcClient, arguments, odcPartitionId)
357+
err = doShutdown(ctx, odcClient, arguments, odcPartitionId) // FIXME make this parallel
375358
if err != nil {
376359
log.WithError(printGrpcError(err)).
377360
WithField("level", infologger.IL_Devel).

core/integration/odc/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func (p *Plugin) ObjectStack(data interface{}) (stack map[string]interface{}) {
303303
return
304304
}
305305
stack["EnsureCleanup"] = func() (out string) {
306-
// ODC Reset + Terminate + Shutdown for currend env + all orphans
306+
// ODC Shutdown for current env + all orphans
307307

308308
timeout := callable.AcquireTimeout(ODC_GENERAL_OP_TIMEOUT, varStack, "EnsureCleanup", envId)
309309

@@ -324,7 +324,7 @@ func (p *Plugin) ObjectStack(data interface{}) (stack map[string]interface{}) {
324324
return
325325
}
326326
stack["PreDeploymentCleanup"] = func() (out string) {
327-
// ODC Reset + Terminate + Shutdown for all orphans
327+
// ODC Shutdown for all orphans
328328

329329
timeout := callable.AcquireTimeout(ODC_GENERAL_OP_TIMEOUT, varStack, "PreDeploymentCleanup", envId)
330330

0 commit comments

Comments
 (0)