Skip to content

Commit

Permalink
Merge pull request #3798 from simar7/qemu-graceful-shutdown-bug
Browse files Browse the repository at this point in the history
[QEMU] Fixing an unintentional variable shadowing
  • Loading branch information
schmichael authored Jan 31, 2018
2 parents d5d719e + 19e1a7f commit 7b9b8b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/driver/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (d *QemuDriver) Start(ctx *ExecContext, task *structs.Task) (*StartResponse
}
// This socket will be used to manage the virtual machine (for example,
// to perform graceful shutdowns)
monitorPath, err := d.getMonitorPath(ctx.TaskDir.Dir)
monitorPath, err = d.getMonitorPath(ctx.TaskDir.Dir)
if err != nil {
d.logger.Printf("[ERR] driver.qemu: could not get qemu monitor path: %s", err)
return nil, err
Expand Down Expand Up @@ -464,6 +464,7 @@ func (h *qemuHandle) Kill() error {
// If Nomad did not send a graceful shutdown signal, issue an interrupt to
// the qemu process as a last resort
if gracefulShutdownSent == false {
h.logger.Printf("[DEBUG] driver.qemu: graceful shutdown is not enabled, sending an interrupt signal to pid: %d", h.userPid)
if err := h.executor.ShutDown(); err != nil {
if h.pluginClient.Exited() {
return nil
Expand Down

0 comments on commit 7b9b8b7

Please sign in to comment.