Page MenuHomeVyOS Platform

The /config bind mount does not respect inode updates
Closed, ResolvedPublicBUG

Description

An issue exposed in T7709 was that the current mechanism in live-boot for the bind mount of /config to /opt/vyatta/etc/config does not correctly update on a libc rename. A simple example is given below. This necessarily breaks the standard approach for 'atomic' save of config.boot (T7709).

The current mechanism in the live-boot initramfs construction is, in fact, historical and was introduced under constraints I believe are no longer of concern. It will be rationalized to restore expected behavior; for backport of a fault resistant config.boot save, a workaround will be provided.

The suggested approach for rationalization will move the bind mount back to the initialization in vyos-router. This has the added benefit of simplifying the goal of adopting upstream live-boot.

Current behavior:

vyos@vyos:~$ touch {/opt/vyatta/etc/config/test1,/opt/vyatta/etc/config/test2}
vyos@vyos:~$ ls -li /opt/vyatta/etc/config/{test1,test2}
133141 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:19 /opt/vyatta/etc/config/test1
133146 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:19 /opt/vyatta/etc/config/test2
vyos@vyos:~$ ls -li /config/{test1,test2}
133141 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:19 /config/test1
133146 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:19 /config/test2
vyos@vyos:~$ python3 -c "import os; os.rename('/opt/vyatta/etc/config/test1', '/opt/vyatta/etc/config/test2')"
vyos@vyos:~$ ls -li /opt/vyatta/etc/config/test2
133141 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:19 /opt/vyatta/etc/config/test2
vyos@vyos:~$ ls -li /config/test2
133146 -rw-r--r-- 0 vyos vyattacfg 0 Sep 17 15:19 /config/test2

Behavior after rationalization:

vyos@vyos:~$ touch {/opt/vyatta/etc/config/test1,/opt/vyatta/etc/config/test2}
vyos@vyos:~$ ls -li /opt/vyatta/etc/config/{test1,test2}
133122 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:24 /opt/vyatta/etc/config/test1
133156 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:24 /opt/vyatta/etc/config/test2
vyos@vyos:~$ ls -li /config/{test1,test2}
133122 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:24 /config/test1
133156 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:24 /config/test2
vyos@vyos:~$ python3 -c "import os; os.rename('/opt/vyatta/etc/config/test1', '/opt/vyatta/etc/config/test2')"
vyos@vyos:~$ ls -li /opt/vyatta/etc/config/test2
133122 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:24 /opt/vyatta/etc/config/test2
vyos@vyos:~$ ls -li /config/test2
133122 -rw-r--r-- 1 vyos vyattacfg 0 Sep 17 15:24 /config/test2

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

jestabro moved this task from Open to Finished on the VyOS 1.5 Circinus (1.5-stream-2025-Q3) board.
jestabro moved this task from Need Triage to Completed on the VyOS Rolling board.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.