[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#881771: release-notes: No mention of "predictable network interface names" in Debian 10



Andrei POPESCU wrote:
>> In issues.dbk:
>> 
>>   <section id="migrate-interface-names">
>>     <title>Migrating from legacy network interface names</title>
>>     <para>
>>      If your system was upgraded from an earlier release, and still uses
>>      the old-style network interface names that were deprecated with
>>      stretch (such as <literal>eth0</literal> or <literal>wlan</literal>),
> 
> s/eth0/eth/ ? (since you used the non-numbered names also in upgrading.dbk)

Here I'm just giving a familiar example to identify the scheme from.
(Oh, you're right, I'm inconsistent.)
 
>>      you should be aware that <systemitem role="package">udev</systemitem>
>>      in buster no longer supports the mechanism of defining their names via
>>      <filename>/etc/udev/rules.d/70-persistent-net.rules</filename>. To
>>      avoid the danger of your machine losing networking after the upgrade
>>      to buster, it is recommended that you migrate in advance to the new
>>      naming scheme (usually meaning names like <literal>enp0s1</literal> or
>>      <literal>wlp2s5</literal>, which incorporate PCI bus- and
>>      slot-numbers). Take care to update any interface names hard-coded in
>>      configuration for firewalls, <systemitem role="package">ifupdown</systemitem>.
>>      and so on.
>>     </para>
>>     <para>
>>      The alternative is to switch to a supported mechanism for enforcing
>>      the old naming scheme, such as the <literal>net.ifname=0</literal>
>>      kernel commandline option or a systemd <filename>.link</filename>
>>      file.
> 
> Point to systemd.link(5)?

Oh yes, I forgot to come back to this.  It's not completely clear what
the approved method of doing manpage links is, but one option is to
point at
 <ulink url="https://manpages.debian.org/stretch/udev/systemd.link.5.html";>systemd.link(5)</ulink>.
or maybe just
 <ulink url="https://manpages.debian.org/systemd.link";>systemd.link(5)</ulink>.
 
>>     </para>
>>     <para>
>>      To find the new-style names that will be used, first find the
>>      current names of the relevant interfaces:
>>     </para>
>>     <screen
>>      $ echo /sys/class/net/[ew]*
>>     </screen>
>>     <para>
>>      For each one, check whether it is used in configuration files:
>>     </para>
>>     <screen>
>>      $ sudo rgrep -w eth0 /etc
>>     </screen>
>>     <para>
>>      And what name <systemitem role="package">udev</systemitem> would prefer to
>>      use for it:
>>     </para>
>>     <screen>
>>      $ udevadm test-builtin net_id /sys/class/net/eth0 2>/dev/null
>>     </screen>
>>     <para>
>>      (One of these may be a fallback MAC-based name, sometimes needed
>>      for USB network hardware.)
>>     </para>
>> 
>> [Possibly add extra details there for other special cases]

(In particular there are onboard cards and PCI hotplug cards, but the
upstream docs explain these better than I could.)

>> 
>>     <para>
>>      To switch over, disable <filename>70-persistent-net.rules</filename>
>>      either by renaming it or by commenting out individual lines.
>>      On virtual machines you will need to remove the files
>>      <filename>/etc/systemd/network/99-default.link</filename> and
>>      (if using virtio network devices)
>>      <filename>/etc/systemd/network/50-virtio-kernel-names.link</filename>.
>>      Then rebuild the <filename>initrd</filename>:
>>     </para>
>>     <screen>
>>      $ sudo update-initramfs -u
>>     </screen>
>>     <para>
>>      and reboot. Your system should now have new-style network interface
>>      names. Adjust any remaining configuration files, and test your system.
>>     </para>
> 
> https://wiki.debian.org/NetworkConfiguration#Predictable_Network_Interface_Names
> suggests this might not be sufficient to activate the predictable naming 
> on stretch, is this tested?

It was enough for me, but there are also at least two other ways of
complicating matters:
 * a net.ifnames=0 option in your grub config
 * masking /dev/null symlinks in /etc/systemd/network/
Setting up one of those then forgetting about it might cause problems.

>> [possibly a paragraph about safe upgrades over SSH]
> 
> I believe your text above provides sufficient information to enable a 
> remote sysadmin to deal with this without further help.

Given unlimited space and copious reliable sources we could also
produce a decision tree for which configuration files to modify before
or after the reboot, and whether to do test-runs with one-off kernel
options and dead-man's-handle cronjobs, and so on, but a small and
inaccurate version would probably do more harm than good.

>  
>>     <para>
>>      See the
>>      <ulink url="https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/";>upstream
>>      documentation</link> and the <literal>udev</literal>
>>      <filename>README.Debian</file> for further information.
>>     </para>
>>   </section>
>> 
>> And/or maybe a pointer to some useful page in the Debian Wiki, but I
>> suspect we'd need to write one first.
>> 
>> Then in upgrading.dbk
>> 
>>   <section id="review-interface-names">
>>     <title>Verify network interface name support</title>
>>     <para>
>>      Systems upgraded from older releases that still use network interfaces
>>      with names like <literal>eth</literal> or <literal>wlan</literal> are
>>      at risk of losing networking once they switch to buster; see
>>      <xref linkend="migrate-interface-names"/> for migration instructions.
>>     </para>
>>   </section>

Oh, you're right; there's no reason for that to say "eth" that
wouldn't also apply in the previous one.  This should either say "like
eth0 or wlan0" or "with names starting with eth- or wlan-".
-- 
JBR	with qualifications in linguistics, experience as a Debian
	sysadmin, and probably no clue about this particular package


Reply to: