Page MenuHomeVyOS Platform

Recreate only a specific container
Closed, ResolvedPublicBUG

Description

All containers are recreated during change any container

set container name c1 allow-host-networks
set container name c1 image 'busybox'
set container name c2 allow-host-networks
set container name c2 image 'busybox'
commit

Both containers were added:

vyos@r14# run show container 
CONTAINER ID  IMAGE                             COMMAND     CREATED         STATUS             PORTS       NAMES
61508ea6196e  docker.io/library/busybox:latest  sh          41 seconds ago  Up 41 seconds ago              c1
54d593d360da  docker.io/library/busybox:latest  sh          40 seconds ago  Up 41 seconds ago              c2
[edit]
vyos@r14#

Change container c1 option. Both containers were recreated.

vyos@r14# set container name c1 host-name c1.local
[edit]
vyos@r14# commit

vyos@r14# run show container 
CONTAINER ID  IMAGE                             COMMAND     CREATED         STATUS             PORTS       NAMES
020ab4fb4d7b  docker.io/library/busybox:latest  sh          13 seconds ago  Up 14 seconds ago              c1
6955626eebe2  docker.io/library/busybox:latest  sh          7 seconds ago   Up 8 seconds ago               c2
[edit]
vyos@r14#

Expected behavior, only c1 container should be changed/recreated.

If any node changed, there is a dict trigger to remove containers in apply section

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.4-rolling-202303020317
Why the issue appeared?
Design mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po changed the task status from Open to In progress.Mar 12 2023, 7:24 AM
c-po claimed this task.
c-po changed the task status from In progress to Needs testing.Mar 28 2023, 7:54 PM
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
c-po moved this task from Need Triage to Backport Candidates on the VyOS 1.3 Equuleus (1.3.3) board.