Skip to content

Commit f1adfd6

Browse files
thomasjmmedyagh
authored andcommitted
Fix network retry check for (rootless) podman
1 parent c8c54fb commit f1adfd6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/drivers/kic/oci/network_create.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func tryCreateDockerNetwork(ociBin string, subnet *network.Parameters, mtu int,
157157
if strings.Contains(rr.Output(), "is being used by a network interface") {
158158
return nil, ErrNetworkGatewayTaken
159159
}
160+
if strings.Contains(rr.Output(), "is already used on the host or by another config") {
161+
return nil, ErrNetworkGatewayTaken
162+
}
160163
return nil, fmt.Errorf("create %s network %s %s with gateway %s and MTU of %d: %w", ociBin, name, subnet.CIDR, subnet.Gateway, mtu, err)
161164
}
162165
return gateway, nil

0 commit comments

Comments
 (0)