Skip to content

Commit

Permalink
Qemu driver: include PIDs in log output
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeseprocedure committed Nov 1, 2017
1 parent 60e2797 commit 507c6d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/driver/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func (h *qemuHandle) Kill() error {
case <-h.doneCh:
return nil
case <-time.After(h.killTimeout):
h.logger.Printf("[DEBUG] driver.qemu: kill timeout exceeded")
h.logger.Printf("[DEBUG] driver.qemu: kill timeout exceeded for user process pid %d", h.userPid)
if h.pluginClient.Exited() {
return nil
}
Expand All @@ -475,7 +475,7 @@ func (h *qemuHandle) run() {
ps, werr := h.executor.Wait()
if ps.ExitCode == 0 && werr != nil {
if e := killProcess(h.userPid); e != nil {
h.logger.Printf("[ERR] driver.qemu: error killing user process: %v", e)
h.logger.Printf("[ERR] driver.qemu: error killing user process pid %d: %v", h.userPid, e)
}
}
close(h.doneCh)
Expand All @@ -497,13 +497,13 @@ func (h *qemuHandle) sendQemuShutdown() error {
monitorSocket, err := net.Dial("unix", h.monitorPath)
if err == nil {
defer monitorSocket.Close()
h.logger.Printf("[DEBUG] driver.qemu: sending graceful shutdown command to qemu monitor socket %q", h.monitorPath)
h.logger.Printf("[DEBUG] driver.qemu: sending graceful shutdown command to qemu monitor socket %q for user process pid %d", h.monitorPath, h.userPid)
_, err = monitorSocket.Write([]byte(qemuGracefulShutdownMsg))
if err != nil {
h.logger.Printf("[WARN] driver.qemu: failed to send shutdown message %q to monitor socket %q: %s", qemuGracefulShutdownMsg, h.monitorPath, err)
h.logger.Printf("[WARN] driver.qemu: failed to send shutdown message %q to monitor socket %q for user process pid %d: %s", qemuGracefulShutdownMsg, h.monitorPath, h.userPid, err)
}
}
h.logger.Printf("[WARN] driver.qemu: could not connect to qemu monitor %q: %s", h.monitorPath, err)
h.logger.Printf("[WARN] driver.qemu: could not connect to qemu monitor %q for user process pid %d: %s", h.monitorPath, h.userPid, err)
}
return err
}

0 comments on commit 507c6d9

Please sign in to comment.