Cookbook version
v2.6.3
Chef-client version
Chef Development Kit Version: 2.5.3
chef-client version: 13.8.5
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.1
kitchen version: 1.20.0
inspec version: 1.51.21
Platform Details
RHEL 7 instance on EC2, using CIS Red Hat Enterprise Linux 7 Benchmark v2.1.1.1 AMI
Scenario:
Applying this cookbook. On this image, firewalld is masked.
Steps to Reproduce:
Simply including include_recipe 'firewall'
Expected Result:
cookbook completes with firewalld enabled.
If the service is already present but masked; the cookbook should unmask it
Actual Result:
Error appears:
[2018-03-13T14:55:17+00:00] ERROR: Running exception handlers
Running handlers complete
[2018-03-13T14:55:17+00:00] ERROR: Exception handlers complete
Chef Client failed. 12 resources updated in 01 minutes 17 seconds
[2018-03-13T14:55:17+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2018-03-13T14:55:17+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-03-13T14:55:17+00:00] ERROR: firewall[default] (firewall::default line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: service[firewalld] (/tmp/kitchen/cache/cookbooks/firewall/libraries/provider_firewall_firewalld.rb line 161) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /bin/systemctl --system enable firewalld ----
STDOUT:
STDERR: Failed to execute operation: Cannot send after transport endpoint shutdown
---- End output of /bin/systemctl --system enable firewalld ----
Ran /bin/systemctl --system enable firewalld returned 1
[2018-03-13T14:55:17+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <rhel7-rhel-7>. Please see .kitchen/logs/rhel7-rhel-7.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Workaround:
Log onto the instance and unmask the service ( systemctl unmask firewalld )
Cookbook version
v2.6.3
Chef-client version
Platform Details
RHEL 7 instance on EC2, using CIS Red Hat Enterprise Linux 7 Benchmark v2.1.1.1 AMI
Scenario:
Applying this cookbook. On this image, firewalld is masked.
Steps to Reproduce:
Simply including
include_recipe 'firewall'Expected Result:
cookbook completes with firewalld enabled.
If the service is already present but masked; the cookbook should unmask it
Actual Result:
Error appears:
Workaround:
Log onto the instance and unmask the service (
systemctl unmask firewalld)