chef icon indicating copy to clipboard operation
chef copied to clipboard

ifconfig resource doesn't work on MacOS

Open adeptg opened this issue 3 years ago • 3 comments

Description

ifconfig on MacOS doesn't have --version option so ifconfig resource asks to install net-tools (it doesn't exist on Mac) https://github.com/chef/chef/commit/a073871748ea5d93b4f39d517447e56c6801414b

Chef Version

14

Platform Version

System Info:

chef_version=14.0.202 platform=macos platform_version=12.0.1 ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin15] program_name=/usr/local/bin/chef-client executable=/opt/chef/bin/chef-client

Replication Case

Use ifconfig resource on MacOS

Client Output

RuntimeError

net-tools not found - this is required for ifconfig

Resource Declaration:

In /var/chef/cache/cookbooks/ph_network_mac/recipes/ipsec.rb

ifconfig OWN_IP do device "bridge0" mask "255.255.255.0" onboot "yes" notifies :run, "execute[add route 10.0.0.0/8]", :immediately end

adeptg avatar Jun 02 '22 19:06 adeptg

https://github.com/chef/chef/blob/cb0f07953e14bc4614beb90f69ba66483fea264c/lib/chef/provider/ifconfig.rb#L57-L62

marcparadise avatar Jun 07 '22 14:06 marcparadise

Yuriy, we will triage this but we expect this to be corrected in the current release of Chef (Chef-18/Chef-17, but NOT Chef-14)

johnmccrae avatar Jun 07 '22 14:06 johnmccrae

Yes, sure, I understand. I just wanted to report that there is a bug in the upstream. Thanks!

adeptg avatar Jun 08 '22 06:06 adeptg