small fixes

This commit is contained in:
Alex Dadgar
2017-07-22 12:25:02 -07:00
parent b6451f2d07
commit 3cb16aa9a8
2 changed files with 7 additions and 4 deletions

View File

@@ -382,13 +382,16 @@ func (h *lxcDriverHandle) Exec(ctx context.Context, cmd string, args []string) (
}
func (h *lxcDriverHandle) Kill() error {
h.logger.Printf("[INFO] driver.lxc: shutting down container %q", h.container.Name())
name := h.container.Name()()
h.logger.Printf("[INFO] driver.lxc: shutting down container %q", nmae)
if err := h.container.Shutdown(h.killTimeout); err != nil {
h.logger.Printf("[INFO] driver.lxc: shutting down container %q failed: %v", h.container.Name(), err)
h.logger.Printf("[INFO] driver.lxc: shutting down container %q failed: %v", name, err)
if err := h.container.Stop(); err != nil {
h.logger.Printf("[ERR] driver.lxc: error stopping container %q: %v", h.container.Name(), err)
h.logger.Printf("[ERR] driver.lxc: error stopping container %q: %v", name, err)
}
}
close(h.doneCh)
return nil
}

View File

@@ -7,7 +7,7 @@ PING_LOOP_PID=$!
trap "kill $PING_LOOP_PID" EXIT HUP INT QUIT TERM
GOTEST_FLAGS="-parallel=8" make test
GOTEST_FLAGS="-parallel=4" make test
TEST_OUTPUT=$?
kill $PING_LOOP_PID