DLPX-67375 [Backport of Issue DLPX-67281 to 6.0.0.0] Network configuration not migrated because of multiple netplan files #160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The root-cause of this issue is that the service that generates the
default netplan file for cloud-init (named cloud-init-local) can run
at the same time as delphix-migration which writes our own custom
netplan file on-disk (and potentially deletes the default one if the
timing is right). Unfortunately, timing is not always right and due
to the above raace between the two services we end up with two
netplan files that can have conflicting info.
This change ensures that the migration service runs after cloud-init-local
so the default netplan file is always generated before ouyr custom one
takes its place.
Note again that this is a migration-only issue that can happen on
first boot. We disable the cloud-init-local service from regenerating
its netplan file for subsequent boots.