summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-10-26 16:30:57 -0700
committerTim Smith <tsmith84@gmail.com>2020-10-26 16:31:43 -0700
commitab39c46259f06c5343ef1db6873e137b7ae9af49 (patch)
tree06a683ceff1a2cb83870f1650a16d11975603f83
parented67cb7fad4c000dc791695602daa2f4c9d13b97 (diff)
downloadchef-ab39c46259f06c5343ef1db6873e137b7ae9af49.tar.gz
ifconfig is not compatible with Fedora 33 or later
This resource only works with the legacy redhat /etc/networks configuration format. That format was slapped onto NetworkManager when RHEL moved off legacy init scripts. Fedora 33 switches to the keyfile format so this resource no longer works on those systems. Stop testing it there and add a note to the resource description so we get that up on the docs site. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb2
-rw-r--r--lib/chef/resource/ifconfig.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb
index 149b2cb65c..2a02636ac2 100644
--- a/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb
+++ b/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb
@@ -1,3 +1,5 @@
+return if fedora? && node["platform_version"] >= "33" # ifconfig does not support the new network manager keyfile format
+
execute "create virtual interface for testing" do
command "ifconfig eth0:0 123.123.22.22"
end
diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb
index 223e10967f..5e46fa10f3 100644
--- a/lib/chef/resource/ifconfig.rb
+++ b/lib/chef/resource/ifconfig.rb
@@ -26,7 +26,7 @@ class Chef
provides :ifconfig
- description "Use the **ifconfig** resource to manage interfaces on Unix and Linux systems. Note: This resource requires the ifconfig binary to be present on the system and may require additional packages to be installed first. On Ubuntu 18.04 or later you will need to install the `ifupdown` package, which disables the built in Netplan functionality."
+ description "Use the **ifconfig** resource to manage interfaces on Unix and Linux systems. Note: This resource requires the ifconfig binary to be present on the system and may require additional packages to be installed first. On Ubuntu 18.04 or later you will need to install the `ifupdown` package, which disables the built in Netplan functionality. This resource will not work with Fedora release 33 or later."
examples <<~DOC
**Configure a network interface with a static IP**