Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: always initialize taskHandle.logger #6763

Merged
merged 2 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ BUG FIXES:
* cli: Fixed a bug where a cli user may fail to query FS/Allocation API endpoints if they lack `node:read` capability [[GH-6423](https://github.com/hashicorp/nomad/issues/6423)]
* client: client: Return empty values when host stats fail [[GH-6349](https://github.com/hashicorp/nomad/issues/6349)]
* client: Fixed a bug where a client may not restart dead internal processes upon client's restart on Windows [[GH-6426](https://github.com/hashicorp/nomad/issues/6426)]
* drivers: Fixed a bug where client may panic if a restored task failed to shutdown cleanly [[GH-6763](https://github.com/hashicorp/nomad/issues/6763)]
* driver/exec: Fixed a bug where exec tasks can spawn processes that live beyond task lifecycle [[GH-6722](https://github.com/hashicorp/nomad/issues/6722)]
* driver/docker: Added mechanism for detecting running unexpectedly running docker containers [[GH-6325](https://github.com/hashicorp/nomad/issues/6325)]
* nomad: Fixed registering multiple connect enabled services in the same task group [[GH-6646](https://github.com/hashicorp/nomad/issues/6646)]
Expand Down
1 change: 1 addition & 0 deletions drivers/exec/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: taskState.StartedAt,
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(taskState.TaskConfig.ID, h)
Expand Down
1 change: 1 addition & 0 deletions drivers/exec/driver_pre09.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (d *Driver) recoverPre09Task(h *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: time.Now(),
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(h.Config.ID, th)
Expand Down
1 change: 1 addition & 0 deletions drivers/java/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: taskState.StartedAt,
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(taskState.TaskConfig.ID, h)
Expand Down
1 change: 1 addition & 0 deletions drivers/java/driver_pre09.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (d *Driver) recoverPre09Task(h *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: time.Now(),
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(h.Config.ID, th)
Expand Down
1 change: 1 addition & 0 deletions drivers/qemu/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: taskState.StartedAt,
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(taskState.TaskConfig.ID, h)
Expand Down
1 change: 1 addition & 0 deletions drivers/qemu/driver_pre09.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (d *Driver) recoverPre09Task(h *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: time.Now(),
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(h.Config.ID, th)
Expand Down
1 change: 1 addition & 0 deletions drivers/rkt/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ func (d *Driver) RecoverTask(handle *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: taskState.StartedAt,
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(taskState.TaskConfig.ID, h)
Expand Down
1 change: 1 addition & 0 deletions drivers/rkt/driver_pre09.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func (d *Driver) recoverPre09Task(h *drivers.TaskHandle) error {
procState: drivers.TaskStateRunning,
startedAt: time.Now(),
exitResult: &drivers.ExitResult{},
logger: d.logger,
}

d.tasks.Set(h.Config.ID, th)
Expand Down