Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Move kill-on-failure responsibility to caller of weave script #2296

Merged
merged 1 commit into from
May 18, 2016

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented May 13, 2016

Fixes #2284; also ends up rather simpler. Undoes much of #2264.

The change also removes two flags from the interface of attach(), at the cost of a duplicate Inspect in case of error. I prefer it that way.

@bboreham bboreham force-pushed the issues/2284-die-another-way branch from be7955b to 56b2a31 Compare May 13, 2016 14:50
@bboreham bboreham added this to the 1.6.0 milestone May 13, 2016
// attach failed: if we have a request waiting on the start, kill the container,
// otherwise assume it is a Docker-initated restart and kill the process inside.
if proxy.waitChan(ident) != nil {
proxy.client.KillContainer(docker.KillContainerOptions{ID: ident})

This comment was marked as abuse.

This comment was marked as abuse.

@bboreham bboreham force-pushed the issues/2284-die-another-way branch from 56b2a31 to ff81ecf Compare May 16, 2016 12:39
@bboreham
Copy link
Contributor Author

Added some error handling and squashed commits.

@bboreham bboreham removed their assignment May 16, 2016
}
}
if e != nil {
Log.Warningf("Error killing %s: %s", ident, e)

This comment was marked as abuse.

This comment was marked as abuse.

@awh awh merged commit 4dca07c into master May 18, 2016
@awh awh deleted the issues/2284-die-another-way branch May 18, 2016 11:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants