Skip to content

Commit

Permalink
Merge pull request #6763 from hashicorp/b-handle-initialize-logger
Browse files Browse the repository at this point in the history
drivers: always initialize taskHandle.logger
  • Loading branch information
Mahmood Ali committed Nov 22, 2019
1 parent 39f485c commit 51b39b4
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
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

0 comments on commit 51b39b4

Please sign in to comment.