View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000130 | AlmaLinux-8 | selinux-policy | public | 2021-10-04 22:25 | 2021-10-04 22:52 |
Reporter | jtremblay | Assigned To | |||
Priority | normal | Severity | block | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0000130: when using CHEF to manage SELINUX the cookbook fails | ||||
Description | - selinux (2.1.1) - selinux_policy (2.4.3) Recipe: selinux::_common * selinux_install[selinux os prep] action install ================================================================================ Error executing action `install` on resource 'selinux_install[selinux os prep]' ================================================================================ RuntimeError ------------ not supported! Cookbook Trace: --------------- /var/chef/cache/cookbooks/selinux/resources/install.rb:29:in `block in class_from_file' Resource Declaration: --------------------- # In /var/chef/cache/cookbooks/selinux/recipes/_common.rb 2: selinux_install 'selinux os prep' Compiled Resource: ------------------ # Declared in /var/chef/cache/cookbooks/selinux/recipes/_common.rb:2:in `from_file' selinux_install("selinux os prep") do action [:install] default_guard_interpreter :default declared_type :selinux_install cookbook_name "selinux" recipe_name "_common" end System Info: ------------ chef_version=13.12.14 platform=almalinux platform_version=8.4 ruby=ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux] program_name=chef-client worker: ppid=9037;start=17:59:19; executable=/opt/chef/bin/chef-client | ||||
Steps To Reproduce | install almalinux 8.4 with chef-client 13.12.14 and assign the cookbook recipe "selinux::disabled" | ||||
Additional Information | this works on an identical RHEL 8.4 box both installed and bootstrapped into CHEF with the same runlist. | ||||
Tags | No tags attached. | ||||
Attached Files | chef-stacktrace.out (8,006 bytes)
Generated at 2021-10-04 17:59:27 -0400 RuntimeError: selinux_install[selinux os prep] (selinux::_common line 2) had an error: RuntimeError: not supported! /var/chef/cache/cookbooks/selinux/resources/install.rb:29:in `block in class_from_file' (eval):2:in `block in action_install' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/provider.rb:225:in `instance_eval' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/provider.rb:225:in `compile_and_converge_action' (eval):2:in `action_install' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/provider.rb:171:in `run_action' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource.rb:592:in `run_action' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:70:in `run_action' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:98:in `block (2 levels) in converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:98:in `each' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:98:in `block in converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:97:in `converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:718:in `block in converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:713:in `catch' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:713:in `converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:752:in `converge_and_save' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:286:in `run' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:292:in `block in fork_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:280:in `fork' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:280:in `fork_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:245:in `block in run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/local_mode.rb:44:in `with_server_connectivity' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:233:in `run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:470:in `sleep_then_run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:459:in `block in interval_run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:458:in `loop' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:458:in `interval_run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:442:in `run_application' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:59:in `run' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/bin/chef-client:26:in `<top (required)>' /usr/bin/chef-client:75:in `load' /usr/bin/chef-client:75:in `<main>' >>>> Caused by RuntimeError: not supported! /var/chef/cache/cookbooks/selinux/resources/install.rb:29:in `block in class_from_file' (eval):2:in `block in action_install' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/provider.rb:225:in `instance_eval' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/provider.rb:225:in `compile_and_converge_action' (eval):2:in `action_install' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/provider.rb:171:in `run_action' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource.rb:592:in `run_action' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:70:in `run_action' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:98:in `block (2 levels) in converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:98:in `each' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:98:in `block in converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:85:in `step' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/runner.rb:97:in `converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:718:in `block in converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:713:in `catch' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:713:in `converge' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:752:in `converge_and_save' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/client.rb:286:in `run' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:292:in `block in fork_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:280:in `fork' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:280:in `fork_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:245:in `block in run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/local_mode.rb:44:in `with_server_connectivity' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:233:in `run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:470:in `sleep_then_run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:459:in `block in interval_run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:458:in `loop' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:458:in `interval_run_chef_client' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application/client.rb:442:in `run_application' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/lib/chef/application.rb:59:in `run' /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.12.14/bin/chef-client:26:in `<top (required)>' /usr/bin/chef-client:75:in `load' /usr/bin/chef-client:75:in `<main>' | ||||
abrt_hash | |||||
URL | |||||
|
it seems that when CHEF is trying to identify Alma it fails when 'rhel', 'fedora', 'amazon' 26 package %w(policycoreutils selinux-policy selinux-policy-targeted libselinux-utils mcstrans) 27 else 28 # implement support for your platform here! 29 raise "#{node['platform_family']} not supported!" 30 end 31 |
|
1 # 2 # Cookbook:: selinux 3 # Resource:: install 4 # 5 # Copyright:: 2016-2017, Chef Software, Inc. 6 # 7 # Licensed under the Apache License, Version 2.0 (the "License"); 8 # you may not use this file except in compliance with the License. 9 # You may obtain a copy of the License at 10 # 11 # http://www.apache.org/licenses/LICENSE-2.0 12 # 13 # Unless required by applicable law or agreed to in writing, software 14 # distributed under the License is distributed on an "AS IS" BASIS, 15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 # See the License for the specific language governing permissions and 17 # limitations under the License. 18 19 action :install do 20 case node['platform_family'] 21 when 'debian' 22 package 'selinux-basics' 23 when 'ubuntu' 24 package %w(selinux-basics selinux-policy-default auditd) 25 when 'rhel', 'fedora', 'amazon','centos' 26 package %w(policycoreutils selinux-policy selinux-policy-targeted libselinux-utils mcstrans) 27 else 28 # implement support for your platform here! 29 raise "#{node['platform_family']} not supported!" 30 end 31 32 directory '/etc/selinux' do 33 owner 'root' 34 group 'root' 35 mode '0755' 36 action :create 37 end 38 end ~ |
|
I added and removed 'centos' for testing I also changed the os-release to NAME="AlmaLinux" VERSION="8.4 (Electric Cheetah)" ID="almalinux" ID_LIKE="fedora" VERSION_ID="8.4" PLATFORM_ID="platform:el8" PRETTY_NAME="AlmaLinux 8.4 (Electric Cheetah)" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:almalinux:almalinux:8.4:GA" HOME_URL="https://almalinux.org/" DOCUMENTATION_URL="https://wiki.almalinux.org/" BUG_REPORT_URL="https://bugs.almalinux.org/" ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8" ALMALINUX_MANTISBT_PROJECT_VERSION="8.4" No change |