Skip to content

Commit

Permalink
Merge pull request #402 from nanobox-io/hotfix/teardown
Browse files Browse the repository at this point in the history
make it so the check  before teardown is not trusted
  • Loading branch information
lyondhill authored Mar 6, 2017
2 parents 4ecf739 + 917839b commit 265d52a
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 265d52a

Please sign in to comment.