Skip to content

Commit

Permalink
remove remote task execution code (#24909)
Browse files Browse the repository at this point in the history
  • Loading branch information
mismithhisler authored Jan 29, 2025
1 parent dcf6201 commit 47c14dd
Show file tree
Hide file tree
Showing 25 changed files with 264 additions and 1,313 deletions.
3 changes: 3 additions & 0 deletions .changelog/24909.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:breaking-change
drivers: remove remote task support for task drivers
```
11 changes: 0 additions & 11 deletions api/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,17 +1112,6 @@ type TaskState struct {
StartedAt time.Time
FinishedAt time.Time
Events []*TaskEvent

// Experimental - TaskHandle is based on drivers.TaskHandle and used
// by remote task drivers to migrate task handles between allocations.
TaskHandle *TaskHandle
}

// Experimental - TaskHandle is based on drivers.TaskHandle and used by remote
// task drivers to migrate task handles between allocations.
type TaskHandle struct {
Version int
DriverState []byte
}

const (
Expand Down
128 changes: 0 additions & 128 deletions client/allocrunner/taskrunner/remotetask_hook.go

This file was deleted.

6 changes: 0 additions & 6 deletions client/allocrunner/taskrunner/task_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1364,12 +1364,6 @@ func (tr *TaskRunner) UpdateState(state string, event *structs.TaskEvent) {
tr.logger.Error("error persisting task state", "error", err, "event", event, "state", state)
}

// Store task handle for remote tasks
if tr.driverCapabilities != nil && tr.driverCapabilities.RemoteTasks {
tr.logger.Trace("storing remote task handle state")
tr.localState.TaskHandle.Store(tr.state)
}

// Notify the alloc runner of the transition
tr.stateUpdater.TaskStateUpdated()
}
Expand Down
6 changes: 0 additions & 6 deletions client/allocrunner/taskrunner/task_runner_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ func (tr *TaskRunner) initHooks() {
logger: hookLogger,
}))

// If this task driver has remote capabilities, add the remote task
// hook.
if tr.driverCapabilities.RemoteTasks {
tr.runnerHooks = append(tr.runnerHooks, newRemoteTaskHook(tr, hookLogger))
}

// If this task has a pause schedule, initialize the pause (Enterprise)
if task.Schedule != nil {
tr.runnerHooks = append(tr.runnerHooks, newPauseHook(tr, hookLogger))
Expand Down
3 changes: 0 additions & 3 deletions drivers/docker/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ func TestConfig_Capabilities(t *testing.T) {
NetIsolationModes: []drivers.NetIsolationMode{"host", "group", "task"},
MustInitiateNetwork: true,
MountConfigs: 0,
RemoteTasks: false,
DisableLogCollection: false,
},
},
Expand All @@ -660,7 +659,6 @@ func TestConfig_Capabilities(t *testing.T) {
NetIsolationModes: []drivers.NetIsolationMode{"host", "group", "task"},
MustInitiateNetwork: true,
MountConfigs: 0,
RemoteTasks: false,
DisableLogCollection: true,
},
},
Expand All @@ -674,7 +672,6 @@ func TestConfig_Capabilities(t *testing.T) {
NetIsolationModes: []drivers.NetIsolationMode{"host", "group", "task"},
MustInitiateNetwork: true,
MountConfigs: 0,
RemoteTasks: false,
DisableLogCollection: false,
},
},
Expand Down
1 change: 0 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
_ "github.com/hashicorp/nomad/e2e/parameterized"
_ "github.com/hashicorp/nomad/e2e/periodic"
_ "github.com/hashicorp/nomad/e2e/quotas"
_ "github.com/hashicorp/nomad/e2e/remotetasks"
_ "github.com/hashicorp/nomad/e2e/scaling"
_ "github.com/hashicorp/nomad/e2e/scalingpolicies"
_ "github.com/hashicorp/nomad/e2e/scheduler_sysbatch"
Expand Down
46 changes: 0 additions & 46 deletions e2e/remotetasks/input/ecs.nomad

This file was deleted.

Loading

0 comments on commit 47c14dd

Please sign in to comment.