From 2a876059826927ef204e359a40395955f27503ce Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 14 Apr 2023 08:22:52 +0200 Subject: [PATCH] container: T5082: shorten container network prefix to allow longer names If the name of the network + the length of the podman- prefix exceeds the maximum supported length of netavark we get an error: Error: netavark: get bridge interface: Netlink error: Numerical result out of range (os error 34) --- src/conf_mode/container.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py index 4b7ab34444..cb39f19b6a 100755 --- a/src/conf_mode/container.py +++ b/src/conf_mode/container.py @@ -376,7 +376,7 @@ def generate(container): 'name': network, 'id' : sha256(f'{network}'.encode()).hexdigest(), 'driver': 'bridge', - 'network_interface': f'podman-{network}', + 'network_interface': f'pod-{network}', 'subnets': [], 'ipv6_enabled': False, 'internal': False, @@ -479,7 +479,7 @@ def apply(container): # the network interface in advance if 'network' in container: for network, network_config in container['network'].items(): - network_name = f'podman-{network}' + network_name = f'pod-{network}' # T5147: Networks are started only as soon as there is a consumer. # If only a network is created in the first place, no need to assign # it to a VRF as there's no consumer, yet.