Skip to content

Commit

Permalink
fix for iptables cleanup 8307
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <[email protected]> (github: jfrazelle)
  • Loading branch information
jessfraz committed Oct 29, 2014
1 parent d98b117 commit e171eda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion daemon/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ func (container *Container) ReleaseNetwork() {
}
eng := container.daemon.eng

eng.Job("release_interface", container.ID).Run()
job := eng.Job("release_interface", container.ID)
job.SetenvBool("overrideShutdown", true)
job.Run()
container.NetworkSettings = &NetworkSettings{}
}

Expand Down
2 changes: 1 addition & 1 deletion engine/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const (
// If the job returns a failure status, an error is returned
// which includes the status.
func (job *Job) Run() error {
if job.Eng.IsShutdown() {
if job.Eng.IsShutdown() && !job.GetenvBool("overrideShutdown") {
return fmt.Errorf("engine is shutdown")
}
// FIXME: this is a temporary workaround to avoid Engine.Shutdown
Expand Down

0 comments on commit e171eda

Please sign in to comment.