Skip to content

Commit

Permalink
make it so the check before teardown is not trusted
Browse files Browse the repository at this point in the history
fixes #401
  • Loading branch information
lyondhill committed Mar 6, 2017
1 parent bd02297 commit 917839b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion processors/app/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ func stopDevContainer(appModel *models.App) error {
// remove the container
if err := docker.ContainerRemove(container.ID); err != nil {
lumber.Error("dev:console:teardown:docker.ContainerRemove(%s): %s", container.ID, err)
return util.ErrorAppend(err, "failed to remove dev container")
// we cannot trust that the container is there even though we checked for it
// return util.ErrorAppend(err, "failed to remove dev container")
}

// // extract the container IP
Expand Down
3 changes: 2 additions & 1 deletion processors/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func teardown(appModel *models.App) error {
// remove the container
if err := docker.ContainerRemove(container.ID); err != nil {
lumber.Error("dev:console:teardown:docker.ContainerRemove(%s): %s", container.ID, err)
return util.ErrorAppend(err, "failed to remove dev container")
// prechecking for the containers existance does not guarantee it exists
// return util.ErrorAppend(err, "failed to remove dev container")
}

return nil
Expand Down

0 comments on commit 917839b

Please sign in to comment.