mirror of
https://github.com/moby/moby.git
synced 2026-07-24 16:26:51 +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.
|
// Add inter-network communication rules.
|
||||||
setupNetworkIsolationRules := func(config *networkConfiguration, i *bridgeInterface) error {
|
setupNetworkIsolationRules := func(config *networkConfiguration, i *bridgeInterface) error {
|
||||||
if err := network.isolateNetwork(true); err != nil {
|
if err := network.isolateNetwork(true); err != nil {
|
||||||
if err = network.isolateNetwork(false); err != nil {
|
if errRollback := network.isolateNetwork(false); errRollback != nil {
|
||||||
log.G(context.TODO()).Warnf("Failed on removing the inter-network iptables rules on cleanup: %v", err)
|
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
|
// register the cleanup function
|
||||||
network.registerIptCleanFunc(func() error {
|
network.registerIptCleanFunc(func() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user