Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc_vyos: T6007: Run config migrations before Cloud-init #72

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cloudinit/config/cc_vyos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading