diff options
author | Christian Breunig <christian@breunig.cc> | 2024-02-06 17:47:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 17:47:19 +0100 |
commit | e9842fcda2e5d1053f3da18997baed31821feab9 (patch) | |
tree | 5d1493a4562cf370954e3e151a99004a47fc190a | |
parent | 9f8bdf9b7b4b72afa9290ee6b42ecb88a59bf4f8 (diff) | |
parent | d24e690f49477007ec71a24048fe4402cf88a8d7 (diff) | |
download | vyos-cloud-init-equuleus.tar.gz vyos-cloud-init-equuleus.zip |
Merge pull request #72 from zdc/T6007-equuleusequuleus
cc_vyos: T6007: Run config migrations before Cloud-init
-rw-r--r-- | cloudinit/config/cc_vyos.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index 8f2e7f46..ba0401d9 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -1081,6 +1081,10 @@ def handle(name, cfg, cloud, log, _args): file_name = cfg_file_name logger.debug("Using configuration file: {}".format(file_name)) + # We must run all migrations on the config before Cloud-init will modify it + # Otherwise, regardless of proper syntax for the current version, migrations will be re-run with unpredictable result + logger.debug("Running migrations for: {}".format(file_name)) + run(['/usr/libexec/vyos/run-config-migration.py', file_name]) with open(file_name, 'r') as f: config_file = f.read() config = ConfigTree(config_file) |