static ip= address configuration does not end up in netplan file

Bug #1832042 reported by Dimitri John Ledkov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned
Cosmic
Confirmed
Undecided
Unassigned
Disco
Won't Fix
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned

Bug Description

static ip= address configuration does not end up in netplan file

klibc ipconfig process ip=...:$proto and dumps the state into a file, which is then parsed to generate runtime netplan configs.

For static ip configuration ipconfig parses $proto values "off" "none" "static" as the same PROTO_NONE and encodes it as PROTO="none" in the serialized state file.

The function that dumps ip data (_declare_ip_info()) has keys only values for dhcp dhcp4 dhcp6 static. But not "none" (used by ipconfig) or "off" (as valid by the kernel).

This means that netplan files generated in /run for static ip configuration are incomplete.

Imho we should accept "off" "none" "static" as all valid PROTO settings for static ip configuration.

[Impact]

 * `netplan apply` will not reapply static ip configuration as declared in ip= kernel cmdline.

[Test Case]

 * boot with static ip configuration in the kernel cmdline, e.g.

  ip=10.245.232.12::10.245.232.1:255.255.255.255:clound01:enc603:none

  Check that /run/netplan/*.yaml contains addresses stanzas.

[Regression Potential]

 * Runtime netplan configuration will now be more complete. Meaning that static ip addresses will now persist across `netplan apply` / downing, and reupping an interface. Whilst it was intended for static ip addresses to be there, it might be unexpected that they actually work properly now.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.133ubuntu5

---------------
initramfs-tools (0.133ubuntu5) eoan; urgency=medium

  * Correctly serialize previously absent static ip configuration
    (declared as protocol 'none' by ipconfig) into runtime netplan
    yaml. LP: #1832042
  * Adjust testsuite sample file to match reality
  * Set executable bit on resume script in local-premount

 -- Dimitri John Ledkov <email address hidden> Fri, 07 Jun 2019 21:56:33 +0100

Changed in initramfs-tools (Ubuntu Eoan):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in initramfs-tools (Ubuntu Bionic):
status: New → Confirmed
Changed in initramfs-tools (Ubuntu Cosmic):
status: New → Confirmed
Changed in initramfs-tools (Ubuntu Disco):
status: New → Confirmed
Changed in initramfs-tools (Ubuntu Xenial):
status: New → Confirmed
Steve Langasek (vorlon)
Changed in initramfs-tools (Ubuntu Disco):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.