MigratingToNetplan
Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.
Launchpad Entry: foundations-aa-migrating-to-netplan
Packages affected: bridge-utils cloud-init maas netcfg netplan net-tools ifenslave ifupdown systemd vlan
Summary
Planning for the replacement of ifupdown and overhaul of networking tools in Ubuntu, for the 17.10 release. The target is to aggressively move towards using netplan as the preferred method of configuring the network, making sure it provides the necessary support for the features our users have come to expect, and using NetworkManager and/or systemd-networkd as a preferred "renderer" for the network configuration.
This plan includes the phasing out of outdated tools such as ifupdown and net-tools and the packages which are used as extensions to ifupdown and net-tools; in favor of the preferred, modern alternatives from ip-route2: using the 'ip' command, for example.
Release Note
In this release, several networking tools have been modernized or replaced; the table below outlines the most common replacement for well-known commands:
Include table here; e.g ifconfig == ip address / bridgectl addif eth0 br0 == bridge link set ...
Rationale
We've been carrying old tools that have been deprecated upstream for a while. Some of them are unmaintained or not well maintained at all, and many alternatives already do exist. Furthermore, given increasing demand for complex networking scenarios (large cloud uses often require complex layering of different features, such as bridges over bonds over VLANs, etc.), it has shown to be important to improve in the ease of configuring the network.
Use Cases
ACME wants to set up a new hyper-speed cloud for their clients, and need to configure VLANs on multiple bonded devices, bridged to the various networks. They can use netplan to easily define the network, and let netplan generate and apply the configuration to systemd-networkd or NetworkManager without having to worry about different syntaxes.
- John has been using brctl for a while to add interfaces for new virtual machines to his VM network; but wonders if there is a better way to do it.
- Mulan needs to list interfaces and their IPv4 and IPv6 addresses; she uses 'ip link' and 'ip addr' or 'ip -6 addr' to do so.
Assumptions
Design
Not applicable. This largely covers providing command-line applications for which the user experience is pre-defined upstream, or already fairly well-defined YAML syntax for generic network configuration.
Implementation
This section should describe a plan of action to implement the changes discussed. The general summary is below, followed by some notes on specific changes that will be required. The summary includes a rough outline of the implementation plan.
Summary
Migration to netplan and phasing out of old network tools will happen in several phases, which may overlap:
- Phase I: Identify critical-path features for netplan, implement critical-path.
- Phase II: Identify all code change targets, prioritize and fix critical pieces (packages in main, infrastructure)
- Phase III: Implement migration tools for existing installs from ifupdown to an equivalent network YAML v2.
- Phase IV: Identify and implement missing features for MaaS and other specialist users.
- Phase V: Any cleanup, as necessary (package demotions, removals, etc.)
Phase I: Critical-path netplan features
deadline ubuntu-17.06
To begin with, we'll need to identify those features we already know are abolutely required as a bare minimum to use netplan /instead of/ ifupdown on all systems.
These should be reviewed and agreed on between Foundations, Desktop and Server teams and carefully selected; it should be limited to critical-path features, not nice-to-haves coming from bias from using ifupdown. We should not aim to duplicate exactly what ifupdown did, but rather take the opportunity to improve on it.
Netplan should already be considered as relatively mature before the deadline; as it is already shipped on systems.
Possibly, provide an initial image without ifupdown for testing.
Phase II: Code change targets, fixing main and infrastructure
deadline ubuntu-17.07
There are multiple packages depending on one of the affected packages selected for replacement: http://paste.ubuntu.com/24500232/:
aranym |
1.0.2-2 |
artful/universe |
source, amd64, arm64, armhf, i386, ppc64el, s390x |
cloud-init |
0.7.9-113-g513e99e0-0ubuntu1 |
artful |
source, all |
grub-legacy-ec2 |
0.7.9-113-g513e99e0-0ubuntu1 |
artful |
all |
controlaula |
1.8.0-3.1 |
artful/universe |
source, all |
ltsp-controlaula |
1.8.0-3.1 |
artful/universe |
all |
core-network-daemon |
4.8-3 |
artful/universe |
amd64, arm64, armhf, i386, ppc64el, s390x |
freedombox-setup |
0.8ubuntu1 |
artful/universe |
source, all |
ganeti-2.15 |
2.15.2-6build3 |
artful/universe |
all |
grml-btnet |
0.04ubuntu3 |
artful/universe |
source, all |
ifenslave |
2.7ubuntu1 |
artful |
source, all |
ifenslave-2.6 |
2.7ubuntu1 |
artful/universe |
all |
ifenslave-2.6 |
2.7ubuntu1 |
artful/universe |
all |
ifplugd |
0.28-19.2 |
artful/universe |
source, amd64, arm64, armhf, i386, ppc64el, s390x |
ifscheme |
1.7-5 |
artful/universe |
source, all |
ifupdown-scripts-zg2 |
0.6-1 |
artful/universe |
source, all |
libvirt-daemon-system |
2.5.0-3ubuntu7 |
artful |
amd64, arm64, armhf, i386, ppc64el, s390x |
lxc1 |
2.0.7-0ubuntu2 |
artful |
amd64, arm64, armhf, i386, ppc64el, s390x |
lxctl |
0.3.1+debian-3 |
artful/universe |
source, all |
netscript-2.4 |
5.4.11ubuntu1 |
artful/universe |
source, all |
netscript-2.4-upstart |
5.4.11ubuntu1 |
artful/universe |
all |
netscript-ipfilter |
5.4.11ubuntu1 |
artful/universe |
all |
neutron-linuxbridge-agent |
2:10.0.0-0ubuntu5.1 |
artful |
all |
nova-compute |
2:15.0.2-0ubuntu1 |
artful |
all |
nova-compute-libvirt |
2:15.0.2-0ubuntu1 |
artful |
all |
nova-network |
2:15.0.2-0ubuntu1 |
artful |
all |
pppoeconf |
1.21ubuntu1 |
artful |
source, all |
python-nemu |
0.3.1-1 |
artful/universe |
source, all |
resolvconf |
1.79ubuntu4 |
artful |
source, all |
slapos-node-unofficial |
1.3.18-1 |
artful/universe |
all |
ubuntu-fan |
0.12.2 |
artful |
source, all |
ubuntu-minimal |
1.380 |
artful |
amd64, arm64, armhf, i386, ppc64el, s390x |
ubuntu-server |
1.380 |
artful |
amd64, arm64, armhf, i386, ppc64el, s390x |
ucarp |
1.5.2-2 |
artful/universe |
source, amd64, arm64, armhf, i386, ppc64el, s390x |
xen-utils-4.8 |
4.8.0-1ubuntu2 |
artful/universe |
amd64, arm64, armhf, i386 |
These, where possible, will need to be modified to use the "newer tools"; iproute2, etc. Packages for which Canonical is upstream will need to be ported (or dropped if it makes sense to do so), and packages where the upstream is elsewhere will need to be checked. Upstreams should be contacted with proposed patches to support the right commands for future-proofing.
When necessary, implement autopkgtests for the affected packages to ensure previous behavior is maintained.
Testing should be ongoing from that point.
Phase III: Implement migration tooling
deadline ubuntu-17.08 -- feature freeze
Old installs still using ifupdown need to be migrated to allow for upgrades from pre-17.10 to the next LTS. Validate the migration code (some is already available in netplan) to ensure the most common upgrade scenarios are supported. Make sure we can leave ifupdown behind and forcefully warn the user, or otherwise gracefully leave the system half-broken.
Go/no-go decision by then?
Phase IV: Specialist features
deadline ubuntu-17.09
Identify and implement any "specialist" features. Identification should happen in parallel to the previous phases in collaboration with the MaaS, Juju teams and others; then proceed to implementing anything missing.
Phase V: Polish
deadline ubuntu-17.10
Proceed with demotions, cleanups, last efforts for polish. At this point the migration and new implementations should be well tested and deemed stable.
UI Changes
This section only includes GUI changes.
- Drop gnome-nettools
Code Changes
Dropped packages
ifenslave, vlan, bridge-utils may have reverse-depends in main; these need to be reviewed and fixed/demoted/nuked.
netplan
Some features are still missing from netplan; such as proper support for setting the MAC on devices (blocked on some systemd bugs), or setting IPv6 MTU. The relevant missing pieces have bugs open in Launchpad.
systemd
Systemd may have bugs that would block proper use of the new tooling, especially when it comes to netplan generating systemd-networkd configuration -- this configuration is usually based on what the documentation expresses as being available, but actual implementation might fail (cf. MAC address issues in progress).
MaaS
MaaS needs to generate network YAML v2.
cloud-init
Generating/parsing network YAML v2 to apply configuration.
netcfg
netcfg needs to generate network YAML v2 instead of ifupdown configuration. It will need to copy that configuration to the installed system.
ubuntu-fan
Replace uses of bridge-utils / other "old tools" with the new.
Infrastructure changes
Autopkgtests
Many packages may be using net-tools, bridge-utils or vlan to set up their environment for autopkgtest. Review this usage and apply fixes as appropriate.
Image build scripts
Any use of the "old commands" should be ported to the "new commands".
Other infrastructure
Review the use of old tools in Ubuntu infrastructure.
Migration
This impacts tools commonly used in user scripts, they would be broken unless we provide sufficient wrappers/redirections.
- The changes should be well documented, and a clear migration path identified in Release Notes for users.
- Replace some of the most commonly used tools with stubs or wrappers to point to the new way.
- Document changes in slideshow? MOTD?
- Implement a conversion tools in netplan for existing ifupdown configurations.
Test/Demo Plan
Outstanding Issues
Systemd bugs (to be identified precisely).
BoF agenda and discussion
BoF Notes
Proposed workitems for blueprint:
Work items for ubuntu-17.06: [cyphermox] document pre-planned out of scope work: TODO [cyphermox] document/discuss/announce plan on ubuntu-devel@: TODO [cyphermox] review systemd issues with applying MAC addresses: TODO [cyphermox] merge MAC address code: TODO [rharper] IPv6 MTU code: TODO [cyphermox] speak to mpontillo for netplan crit-path features for MaaS: TODO [cyphermox] speak to dpb for netplan crit-path features for server: TODO [cyphermox] speak to tbaumann / balloons / sinzui for netplan crit-path features for Juju: TODO [cyphermox] speak to willcooke for netplan crit-path features for desktop: TODO provide an easy way (preseed?) to bring up an ifupdown-less system: TODO schedule feature work in milestones: TODO Work items for ubuntu-17.07: review and fix cloud-init usage of old tools: TODO review and fix grub-legacy-ec2 usage of old tools: TODO review and fix ifenslave usage of old tools: TODO review and fix libvirt-daemon-system usage of old tools: TODO review and fix lxc1 usage of old tools: TODO review and fix neutron-linuxbridge-agent usage of old tools: TODO review and fix nova-compute usage of old tools: TODO review and fix nova-compute-libvirt usage of old tools: TODO review and fix nova-network usage of old tools: TODO review and fix pppoeconf usage of old tools: TODO review and fix resolvconf usage of old tools: TODO review and fix ubuntu-fan usage of old tools: TODO autopkgtests for ifupdown-less install: TODO review and fix infrastructure for using new tools: TODO implement MOTD/command-not-found documentation for new commands: TODO implement wrappers for critical-path tools / warnings: TODO Work items for ubuntu-17.08: update seeds to not install ifupdown: TODO review and postpone or crack down on remaining feature work: TODO test migration code existing in netplan: TODO fix/update migration code: TODO proceed with ifupdown migration by default on install of netplan: TODO get attention from the proper people for go/no-go decision: TODO announce changes again / reminder on ubuntu-devel@: TODO Work items for ubuntu-17.09: check with MaaS team for extra features still missing: TODO check with Juju team for extra features still missing: TODO check with other teams for extra features still missing: TODO review postponed features and re-target for 18.04: TODO bug fixes for release-critical bugs in netplan/affected packages: TODO Work items for ubuntu-17.10: release note the changes: TODO cleanup remaining affected packages: TODO last-minute testing and bugfix: TODO