mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Propagate error from INC rule setup
Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
@@ -847,10 +847,10 @@ func (d *driver) createNetwork(config *networkConfiguration) (err error) {
|
||||
// Add inter-network communication rules.
|
||||
setupNetworkIsolationRules := func(config *networkConfiguration, i *bridgeInterface) error {
|
||||
if err := network.isolateNetwork(true); err != nil {
|
||||
if err = network.isolateNetwork(false); err != nil {
|
||||
log.G(context.TODO()).Warnf("Failed on removing the inter-network iptables rules on cleanup: %v", err)
|
||||
if errRollback := network.isolateNetwork(false); errRollback != nil {
|
||||
log.G(context.TODO()).WithError(errRollback).Warnf("Failed on removing the inter-network iptables rules on cleanup")
|
||||
}
|
||||
return err
|
||||
return errdefs.System(err)
|
||||
}
|
||||
// register the cleanup function
|
||||
network.registerIptCleanFunc(func() error {
|
||||
|
||||
Reference in New Issue
Block a user