summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-04-14 08:22:52 +0200
committerChristian Breunig <christian@breunig.cc>2023-04-14 08:22:52 +0200
commit2a876059826927ef204e359a40395955f27503ce (patch)
treea9b1af02ea5792f4b0e6682caa47f5253a621805 /src
parent0439599a8e31ee1a4252a2c38bb512f414388870 (diff)
downloadvyos-1x-2a876059826927ef204e359a40395955f27503ce.tar.gz
vyos-1x-2a876059826927ef204e359a40395955f27503ce.zip
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)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/container.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/container.py b/src/conf_mode/container.py
index 4b7ab3444..cb39f19b6 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.