Summary
There is a path mismatch between where cloud-init looks for the default configuration file and where the build system places flavor-defined configurations. This causes custom config.boot.default files defined in release-flavors to be ignored on cloud/VM images.
The Problem
Cloud-init (cc_vyos.py and cc_vyos_userdata.py) uses this fallback path:
/usr/share/vyos/config.boot.default
The build system places flavor-defined configs at:
/opt/vyatta/etc/config.boot.default
When cloud-init runs on first boot and no /opt/vyatta/etc/config/config.boot exists yet (common for qcow2/raw images), it falls back to /usr/share/vyos/config.boot.default - completely bypassing the flavor-specific configuration.
Why We Cannot Simply Change Cloud-init
Changing cloud-init to use /opt/vyatta/etc/config. boot.default would break image flavors that do not define a custom config. These flavors rely on the vyos-1x package default at /usr/share/vyos/config.boot.default as their fallback.
Proposed Solution
The build system can place flavor-defined default_config at both locations:
- /opt/vyatta/etc/config.boot.default (for vyos-router init script)
- /usr/share/vyos/config.boot.default (for cloud-init)
Or it can create a final /opt/vyatta/etc/config/config.boot file.
This ensures:
- Flavors with custom configs have them available to cloud-init
- Flavors without custom configs still fall back to the vyos-1x package default
- The vyos-router init script continues to work as expected
Impacted Flavors
All cloud/VM flavors that define custom configs without the default vyos user.