Skip to content

DLPX-67375 [Backport of Issue DLPX-67281 to 6.0.0.0] Network configuration not migrated because of multiple netplan files #160

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

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

sdimitro
Copy link
Contributor

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.

…ation not migrated because of multiple netplan files

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.
@sdimitro
Copy link
Contributor Author

PR for original issue can be found here -> #159

[Unit]
Description=Delphix OS Migration Service
PartOf=delphix.target
DefaultDependencies=no
After=systemd-udev-settle.service
After=cloud-init-local.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, do we have to worry about running before any other cloud-init services? In other words, does this also need a Before=cloud-init.service?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great question. In term of anything that we manage by netplan there should be nothing to worry about. Outside of that though, one could bring up the question of resolv.conf. Looking at the logs in our machines and the source code of cloud-init it is not obvious to me which service handles the creation of that file by default. If it is indeed cloud-init and not cloud-init-local then we should probably do what you suggest. I can open an issue about this so it is tracked somewhere as this is a backport and I wouldn't like to introduce any differences between this and its original commit on master.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebroy sebroy merged commit eda62d4 into delphix:6.0/release Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants