mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix for iptables cleanup 8307
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
This commit is contained in:
parent
d98b117962
commit
e171eda998
2 changed files with 4 additions and 2 deletions
|
@ -527,7 +527,9 @@ func (container *Container) ReleaseNetwork() {
|
||||||
}
|
}
|
||||||
eng := container.daemon.eng
|
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{}
|
container.NetworkSettings = &NetworkSettings{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ const (
|
||||||
// If the job returns a failure status, an error is returned
|
// If the job returns a failure status, an error is returned
|
||||||
// which includes the status.
|
// which includes the status.
|
||||||
func (job *Job) Run() error {
|
func (job *Job) Run() error {
|
||||||
if job.Eng.IsShutdown() {
|
if job.Eng.IsShutdown() && !job.GetenvBool("overrideShutdown") {
|
||||||
return fmt.Errorf("engine is shutdown")
|
return fmt.Errorf("engine is shutdown")
|
||||||
}
|
}
|
||||||
// FIXME: this is a temporary workaround to avoid Engine.Shutdown
|
// FIXME: this is a temporary workaround to avoid Engine.Shutdown
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue