From 73e5411e7bfa77e1e9a15beaea2d0e52357551d9 Mon Sep 17 00:00:00 2001 From: Herwig bogaert Date: Tue, 25 Jul 2023 14:41:04 +0200 Subject: [PATCH] Add Debian 11 and 12 support Change name of Debian package ifenslave-2.6 to ifenslave. As of Debian 11, the package ifenslave-2.6 is no longer available, causing puppet run failure when using bonds. Debian 9 and 10 support is maintained because they also have the ifenslave package (with ifenslave-2.6 marked as transitional). This drops support for bonds in Debian 8, which is EOL since June 2018. --- README.md | 5 +++++ manifests/bond/setup.pp | 2 +- metadata.json | 4 +++- spec/classes/bond/setup_spec.rb | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a228b71d..192739f6 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,11 @@ This class also provides fine-grained control over which packages to install and how to install them. The documentation for the parameters exposed can be found [here](https://github.com/voxpupuli/puppet-network/blob/master/manifests/init.pp). +Bonding on Debian requires the package [ifenslave](https://packages.debian.org/search?suite=all§ion=all&arch=any&searchon=names&keywords=ifenslave), +which is installed automatically when a bond is defined. This package was +renamed in Debian 9, and therefore bonding does not work on Debian +versions prior to 9. + Note: you may also need to update your master's plugins (run on your puppet master): puppet agent -t --noop diff --git a/manifests/bond/setup.pp b/manifests/bond/setup.pp index afe49549..9486d346 100644 --- a/manifests/bond/setup.pp +++ b/manifests/bond/setup.pp @@ -2,7 +2,7 @@ class network::bond::setup { case $facts['os']['family'] { 'Debian': { - package { 'ifenslave-2.6': + package { 'ifenslave': ensure => present, } } diff --git a/metadata.json b/metadata.json index 808a48bf..4fb96482 100644 --- a/metadata.json +++ b/metadata.json @@ -27,7 +27,9 @@ { "operatingsystem": "Debian", "operatingsystemrelease": [ - "8" + "10", + "11", + "12" ] }, { diff --git a/spec/classes/bond/setup_spec.rb b/spec/classes/bond/setup_spec.rb index 397c72da..5f820ce2 100644 --- a/spec/classes/bond/setup_spec.rb +++ b/spec/classes/bond/setup_spec.rb @@ -8,6 +8,6 @@ } end - it { is_expected.to contain_package('ifenslave-2.6') } + it { is_expected.to contain_package('ifenslave') } end end