Page MenuHomeVyOS Platform

containers add network without declaring prefix raise ConfigError
Closed, ResolvedPublicBUG

Description

To reproduce, add network without prefix:

vyos@r11-roll# set container network NET03
[edit]
vyos@r11-roll# commit
[ container ]
VyOS had an issue completing a command.

Report time:      2021-11-09 18:39:28
Image version:    VyOS 1.4-rolling-202111090317
Release train:    sagitta

Built by:         [email protected]
Built on:         Tue 09 Nov 2021 03:17 UTC
Build UUID:       65b8318e-dbe2-4856-a090-cefd6713891d
Build commit ID:  ee81272116cd68

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    8e21d64e-e498-475c-9866-290cd53a3b86

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/containers.py", line 325, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/containers.py", line 161, in verify
    raise ConfigError(f'prefix for network "{net}" must be defined!')
NameError: name 'net' is not defined



[[container]] failed
Commit failed
[edit]
vyos@r11-roll#

Details

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