From 468acbc86d0c7e62d7ca7fbe17ae527f7f0a9913 Mon Sep 17 00:00:00 2001 From: Swagat Bora Date: Mon, 18 Nov 2024 20:11:23 +0000 Subject: [PATCH] fix: return an error if custom bridge name is not set successfully 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) } }