Skip to content

Commit

Permalink
container: T5082: shorten container network prefix to allow longer names
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
c-po committed Apr 14, 2023
1 parent 0439599 commit 2a87605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/conf_mode/container.py
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 2a87605

Please sign in to comment.