diff options
author | zsdc <taras@vyos.io> | 2024-05-16 03:12:08 +0300 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2024-05-16 03:16:32 +0300 |
commit | 02d7ea9908f726dc6a363f28942f4edb7d350340 (patch) | |
tree | 86e6661ac67d4ec939e0f9a45179809ae1a0adf7 /config | |
parent | fe56e399d4d95510a8837b9eb2045eda2316164c (diff) | |
download | vyos-cloud-init-02d7ea9908f726dc6a363f28942f4edb7d350340.tar.gz vyos-cloud-init-02d7ea9908f726dc6a363f28942f4edb7d350340.zip |
ifupdown: T6038: Cleanup network config properly
Cloud-init in environments where Meta-data is available via network configures
the main interface and keeps the config in `/etc/network/interfaces.d/`.
This config later interferes with the VyOS configuration.
To avoid the problem previously the code in the `cc_vyos.py` module was used,
but this is not enough. The module is running only once during instance
deployment. But Cloud-init will re-add the config file with each boot.
There are two ways to solve this incompatibility (within Cloud-init) - disable
network config or perform cleanup during each boot.
Disabling network config is not correct in this context, because it blocks the
ability to fetch Meta-data after the first boot, which in turn blocks the
ability to run per-boot modules with an updated config.
Therefore, the cleanup code was extracted to an independent
`cc_vyos_ifupdown.py` module that performs proper cleanup with each boot.
Diffstat (limited to 'config')
-rw-r--r-- | config/cloud.cfg.d/10_vyos.cfg | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/cloud.cfg.d/10_vyos.cfg b/config/cloud.cfg.d/10_vyos.cfg index d4415126..f34e262a 100644 --- a/config/cloud.cfg.d/10_vyos.cfg +++ b/config/cloud.cfg.d/10_vyos.cfg @@ -19,6 +19,7 @@ cloud_init_modules: # The modules that run in the 'config' stage cloud_config_modules: + - vyos_ifupdown - vyos - write_files - vyos_userdata |