Page MenuHomeVyOS Platform

Publish a port with a specific address belonging to a VRF in a container
Open, NormalPublicBUG

Description

I want to publish a port with a specific address belonging to a VRF in a container.

However, I get an error when committing.

The output will look like this:

vyos@vycontainer# run sh conf c | match 'set vrf'
set vrf bind-to-all
set vrf name nginx protocols static route 192.0.2.0/24 next-hop 192.0.2.5
set vrf name nginx table '1000'


vyos@vycontainer# run sh conf c | match container
set container name nginx image 'docker.io/nginx'
set container name nginx network internal
set container name nginx port tcp80 destination '80'
set container name nginx port tcp80 source '80'
set container network internal prefix '172.25.1.0/24'
set container network internal vrf 'nginx'


# run sh int | match eth2.11
eth2.11      192.0.2.6/30      00:0c:29:6c:4f:5b  nginx     1500  u/u 


vyos@vycontainer# set container name nginx port tcp80 listen-address 192.0.2.6


vyos@vycontainer# commit
[ container ]
VyOS had an issue completing a command.

(snip)

Report time:      2024-05-03 07:25:29
Image version:    VyOS 1.5-rolling-202405010020
Release train:    current

Built by:         [email protected]
Built on:         Wed 01 May 2024 02:44 UTC
Build UUID:       389a7efe-259f-46ee-a489-03045c409272
Build commit ID:  29f7a0c2e7ec40

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware Virtual Platform
Hardware S/N:     VMware-56 4d b8 23 85 39 d5 81-8b fc cc 69 d8 6c 4f 47
Hardware UUID:    23b84d56-3985-81d5-8bfc-cc69d86c4f47

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/container.py", line 486, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/container.py", line 459, in apply
    cmd(f'systemctl restart vyos-container-{name}.service')
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: systemctl restart vyos-container-nginx.service
returned:
exit code: 1

noteworthy:
cmd 'systemctl restart vyos-container-nginx.service'
returned (out):

returned (err):
Job for vyos-container-nginx.service failed because the control process exited with error code.
See "systemctl status vyos-container-nginx.service" and "journalctl -xeu vyos-container-nginx.service" for details.

[[container]] failed
Commit failed

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Viacheslav triaged this task as Normal priority.Fri, May 3, 8:13 AM
Viacheslav changed the subtype of this task from "Feature Request" to "Bug".