Page MenuHomeVyOS Platform

Upgrading fails due to a container writing / changing files during "Copying configuration directory".
Open, HighPublicBUG

Description

While upgrading from 1.4.0 to 1.4.1 I ran into an interesting issue where the "Copying configuration directory" failed due to a container writing/changing files while the copy is ongoing.

error: [('/opt/vyatta/etc/config/containers/routinator/cache/repository/stored/rrdp/repo-rpki.idnic.net/f7a2c36d49a9f51fe44ae673d2a407d92a122bdc2195126eb404a9f51534dcc2/rsync/repo-rpki.idnic.net/repo/8e9abb1a-d6c0-454f-870a-8beedd81fcd2', '/usr/lib/live/mount/persistence/boot/1.4.1/rw/opt/vyatta/etc/config/containers/routinator/cache/repository/stored/rrdp/repo-rpki.idnic.net/f7a2c36d49a9f51fe44ae673d2a407d92a122bdc2195126eb404a9f51534dcc2/rsync/repo-rpki.idnic.net/repo/8e9abb1a-d6c0-454f-870a-8beedd81fcd2', "[Errno 2] No such file or directory: '/opt/vyatta/etc/config/containers/routinator/cache/repository/stored/rrdp/repo-rpki.idnic.net/f7a2c36d49a9f51fe44ae673d2a407d92a122bdc2195126eb404a9f51534dcc2/rsync/repo-rpki.idnic.net/repo/8e9abb1a-d6c0-454f-870a-8beedd81fcd2'"), ('/opt/vyatta/etc/config/containers/routinator/cache/repository/stored/rrdp/repo-rpki.idnic.net/f7a2c36d49a9f51fe44ae673d2a407d92a122bdc2195126eb404a9f51534dcc2/rsync/repo-rpki.idnic.net/repo/835048c6-8ccd-463d-ad34-ae7428647a9c', '/usr/lib/live/mount/persistence/boot/1.4.1/rw/opt/vyatta/etc/config/containers/routinator/cache/repository/stored/rrdp/repo-rpki.idnic.net/f7a2c36d49a9f51fe44ae673d2a407d92a122bdc2195126eb404a9f51534dcc2/rsync/repo-rpki.idnic.net/repo/835048c6-8ccd-463d-ad34-ae7428647a9c', "[Errno 2] No such file or directory: '/opt/vyatta/etc/config/containers/routinator/cache/repository/stored/rrdp/repo-rpki.idnic.net/f7a2c36d49a9f51fe44ae673d2a407d92a122bdc2195126eb404a9f51534dcc2/rsync/repo-rpki.idnic.net/repo/835048c6-8ccd-463d-ad34-ae7428647a9c'")]
}

This made the system end up in a broken state where 1.4.1 was not visible in "show system image".
Stopping the container and retrying the upgrade gave the following error:

Error: [Errno 17] File exists: '/usr/lib/live/mount/persistence/boot/1.4.1/rw/opt/vyatta/etc/config'

Manually cleaning up that folder and re-trying the upgrade (with the container stopped) worked properly.

Suggestion 1:
Automatically stop all containers when doing upgrades

Suggestion 2:
Create some sort of persistent storage for containers that is mounted by VyOS separately from the /config/ folder, and that does not need to be copied between releases.

Details

Version
1.4.1
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Containers use persistent storage and are not copied between releases.
As I understand you bind some cache/databases volumes to /config/xxxx

Correct. Bad config on my part then. So it is best practice just to keep stuff internal to docker so to speak?

But how do we handle container upgrades, will the cache/db then we wiped?