Page MenuHomeVyOS Platform

Use container network without network declaration error
Closed, ResolvedPublicBUG

Description

Use nonexists network name in a container:

set container name exabgp image 'biwhite/exabgp'
set container name exabgp network NET01 address '192.168.29.11'

Commit:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/container.py", line 367, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/container.py", line 135, in verify
    if network_name not in container['network']:
KeyError: 'network'

Expected create a network before using it somewhere:

set container network NET01 prefix '192.168.29.0/24'

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.4-rolling-202206070913
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)