fix for iptables cleanup 8307

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: e171eda9989cb5d10e7fe14b258f239edb124541
Component: engine
This commit is contained in:
Jessica Frazelle
2014-10-16 16:54:55 -07:00
parent 6ab2c0d2ce
commit c55ffb34ca
2 changed files with 4 additions and 2 deletions

View File

@ -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{}
}

View File

@ -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