Merge ~slyon/network-manager:netplan-migrate-maintscript into network-manager:netplan/lunar-gu

Proposed by Lukas Märdian
Status: Merged
Merged at revision: f9372617a07831a143d32e7f4521499b7c454566
Proposed branch: ~slyon/network-manager:netplan-migrate-maintscript
Merge into: network-manager:netplan/lunar-gu
Diff against target: 35 lines (+27/-0)
1 file modified
debian/network-manager.postinst (+27/-0)
Reviewer Review Type Date Requested Status
Simon Chopin Needs Information
Danilo Egea Gondolfo Pending
Review via email: mp+440401@code.staging.launchpad.net

Description of the change

d/network-manager.postinst: Trigger Netplan migration on install/upgrade

Modify the connection's ID (con-name) to trigger its migration.
The Netplan integration will translate the original NM keyfile from
/etc/NetworkManager/system-connections/* to a YAML file located in
/etc/netplan/90-NM-*.yaml and re-generate a corresponding keyfile in
/run/NetworkManager/system-connections/netplan-NM-*.nmconnection
After successful migration, the original ID (con-name) is restored.

To post a comment you must log in.
Revision history for this message
Simon Chopin (schopin) wrote :

question: What happens to the original keyfile?

If it's not removed, then re-running the script (cf https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#maintainer-scripts-idempotency ) will overwrite the previous migration's yaml, which might have changed in the mean time.

review: Needs Information
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

The original keyfile in /etc/NetworkManager/system-connections/* is being deleted by the Netplan integration automatically during the process, after it got translated into /etc/netplan/90-NM-*.yaml successfully.

I.e. that would be within the first "nmcli con mod ..." call for each connection profile.

Revision history for this message
Dave Jones (waveform) wrote :

Left a couple of comments on the version comparison line which might bear some thought (but I'm unsure if they're actually relevant without additional context).

Revision history for this message
Lukas Märdian (slyon) :
Revision history for this message
Lukas Märdian (slyon) wrote :

Thanks! Answered Dave's inline comment. I think the current implementation matches my intention.

Revision history for this message
Lukas Märdian (slyon) wrote :

Thanks all! We got some extra eyeballs, let's get this merged and deployed to the "Netplan Everywhere PPA (Lunar)" testers.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: