From 0469999c87b8659b149617cc99ab919e1a09b752 Mon Sep 17 00:00:00 2001 From: Swagat Bora Date: Tue, 19 Nov 2024 15:00:05 -0800 Subject: [PATCH] fix: return an error if custom bridge name is not set successfully (#100) Signed-off-by: Swagat Bora --- internal/service/network/driver/bridge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/network/driver/bridge.go b/internal/service/network/driver/bridge.go index eb59244..2b0ce26 100644 --- a/internal/service/network/driver/bridge.go +++ b/internal/service/network/driver/bridge.go @@ -92,7 +92,7 @@ func (bd *bridgeDriver) HandlePostCreate(net *netutil.NetworkConfig) (string, er // Since nerdctl currently does not support custom bridge names, // we explicitly override bridge name in the conflist file for the network that was just created if err = bd.setBridgeName(net, bridgeName); err != nil { - warning = fmt.Sprintf("Failed to set network bridge name %s: %s", bridgeName, err) + return "", fmt.Errorf("failed to set network bridge name %s: %s", bridgeName, err) } }