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

[OSSTEST PATCH 13/36] Disable persistent net generator on Bookworm



This schema doesn't work. Even if the udev rule is there, the name of
the different NIC are different from one boot to the next. On a
machine (sabro*) with 3 different NIC, the name of each interface is
basically random and could take on of three name, "eth[0-2]".

net.ifnames=0 does still mean that we have "eth*" names, but the
generated file "75-persistent-net-generator" doesn't seems to name the
interfaces as expected.

The new predictable network interface names schema seems to work well
enough. The names are still the same after rebooting into Xen, at
least on the few machine tested so far. But, we will change to a "mac"
name policy in a follow-up commit.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 Osstest/Debian.pm | 12 +++++++-----
 ts-host-install   |  2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index cf5a3bd1..102b0246 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -87,10 +87,12 @@ sub debian_boot_setup ($$$$$;$) {
         $kopt .= ' '.$targkopt;
     }
 
-    # 
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
-    # In fact these are anything but predictable.  We use the scheme
-    # from Debian jessie and earlier, persistent-net-generator etc.
-    $kopt .= ' net.ifnames=0';
+    if ($ho->{Suite} =~ m/stretch|buster/) {
+        # 
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+        # In fact these are anything but predictable.  We use the scheme
+        # from Debian jessie and earlier, persistent-net-generator etc.
+        $kopt .= ' net.ifnames=0';
+    }
 
     foreach my $hook ($hooks ? @$hooks : ()) {
         my $bo_hook= $hook->{EditBootOptions};
@@ -800,7 +802,7 @@ sub debian_overlays ($$) {
     # network device names', is the default; but it is anything but
     # predictable, so we disable it.  Instead, we restore the
     # 75-persistent-net-generator mechanism from jessie and earlier.
-    $maybe->("overlay-persistent-net") if $ho->{Suite} !~ m/wheezy|jessie/;
+    $maybe->("overlay-persistent-net") if $ho->{Suite} =~ m/stretch|buster/;
 
     $maybe->("overlay-$suite");
     $maybe->($c{OverlayLocal}, 'overlay-local.tar');
diff --git a/ts-host-install b/ts-host-install
index 17a1bf78..88481038 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -214,7 +214,7 @@ sub setup_netboot_firstboot($) {
     system qw(rm -rf --),"$initrd_overlay.d";
     mkdir "$initrd_overlay.d" or die "$initrd_overlay.d: $!";
 
-    if ($ho->{Suite} !~ m/wheezy|jessie/) {
+    if ($ho->{Suite} =~ m/stretch|buster/) {
        my @cmd = (qw(cp -dR overlay-persistent-net/.),
                   "$initrd_overlay.d/.");
        logm("using persistent-net-generator: @cmd");
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.