Skip to content

Instantly share code, notes, and snippets.

@konstantin-kelemen
Created November 7, 2016 16:03
Show Gist options
  • Save konstantin-kelemen/f84a046ecd5a79ed9f3aeef25f9546b4 to your computer and use it in GitHub Desktop.
Save konstantin-kelemen/f84a046ecd5a79ed9f3aeef25f9546b4 to your computer and use it in GitHub Desktop.
-----> Starting Kitchen (v1.13.2)
-----> Creating <default-centos-72>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-7.2'...
Progress: 20%
Progress: 50%
Progress: 70%
Progress: 90%
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-7.2' is up to date...
==> default: Setting the name of the VM: kitchen-awesome_customers_rhel-default-centos-72_default_1478534244470_79183
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Machine not provisioned because `--no-provision` is specified.
[SSH] Established
Vagrant instance <default-centos-72> created.
Finished creating <default-centos-72> (1m45.39s).
-----> Converging <default-centos-72>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 5.1.0...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
-----> Installing Chef Omnibus (install only if missing)
Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
Trying wget...
Download complete.
el 7 x86_64
Getting information for chef stable for el...
downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=el&pv=7&m=x86_64
to file /tmp/install.sh.8716/metadata.txt
trying wget...
sha1 cd53d4f6431e912d0ddafce3cabd113fec3dda05
sha256 66a514699bddd3f507a3b80b687cd71079a09e2aa01fa8111bee7f06a95c44c7
url https://packages.chef.io/files/stable/chef/12.15.19/el/7/chef-12.15.19-1.el7.x86_64.rpm
version 12.15.19
downloaded metadata file looks valid...
downloading https://packages.chef.io/files/stable/chef/12.15.19/el/7/chef-12.15.19-1.el7.x86_64.rpm
to file /tmp/install.sh.8716/chef-12.15.19-1.el7.x86_64.rpm
trying wget...
Comparing checksum with sha256sum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing chef
installing with rpm...
предупреждение: /tmp/install.sh.8716/chef-12.15.19-1.el7.x86_64.rpm: Заголовок V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
Подготовка... (100%)# (100%)## (100%)### (100%)#### (100%)##### (100%)###### (100%)####### (100%)######## (100%)######### (100%)########## (100%)########### (100%)############ (100%)############# (100%)############## (100%)############### (100%)################ (100%)################# (100%)################## (100%)################### (100%)#################### (100%)##################### (100%)###################### (100%)####################### (100%)######################## (100%)######################### (100%)########################## (100%)########################### (100%)############################ (100%)############################# (100%)############################## (100%)############################### (100%)################################ (100%)################################# (100%)################################# [100%]
Обновление / установка...
1:chef-12.15.19-1.el7 ( 1%)# ( 4%)## ( 7%)### ( 10%)#### ( 13%)##### ( 16%)###### ( 19%)####### ( 22%)######## ( 25%)######### ( 28%)########## ( 31%)########### ( 34%)############ ( 37%)############# ( 40%)############## ( 43%)############### ( 46%)################ ( 49%)################# ( 51%)################## ( 54%)################### ( 57%)#################### ( 60%)##################### ( 63%)###################### ( 66%)####################### ( 69%)######################## ( 72%)######################### ( 75%)########################## ( 78%)########################### ( 81%)############################ ( 84%)############################# ( 87%)############################## ( 90%)############################### ( 93%)################################ ( 96%)################################# ( 99%)################################# [100%]
Thank you for installing Chef!
Transferring files to <default-centos-72>
Starting Chef Client, version 12.15.19
Creating a new client identity for default-centos-72 using the validator key.
resolving cookbooks for run list: ["awesome_customers_rhel::default"]
Synchronizing Cookbooks:
- selinux (0.9.0)
- mysql2_chef_gem (1.1.0)
- chef-sugar (3.4.0)
- awesome_customers_rhel (0.1.0)
- yum-mysql-community (1.0.0)
- build-essential (7.0.1)
- httpd (0.4.4)
- postgresql (5.0.0)
- firewall (2.5.3)
- mysql (7.2.0)
- seven_zip (2.0.2)
- mingw (1.2.4)
- apt (5.0.0)
- database (5.1.2)
- smf (2.2.8)
- mariadb (0.3.1)
- yum (4.1.0)
- rbac (1.0.3)
- yum-epel (1.0.2)
- openssl (6.0.0)
- compat_resource (12.16.1)
- windows (2.0.2)
Installing Cookbook Gems:
Compiling Cookbooks...
[2016-11-07T15:59:40+00:00] WARN: Chef::Provider::AptRepository already exists! Cannot create deprecation class for LWRP provider apt_repository from cookbook apt
[2016-11-07T15:59:40+00:00] WARN: AptRepository already exists! Deprecation class overwrites Custom resource apt_repository from cookbook apt
[2016-11-07T15:59:41+00:00] WARN: Chef::Provider::YumRepository already exists! Cannot create deprecation class for LWRP provider yum_repository from cookbook yum
[2016-11-07T15:59:41+00:00] WARN: YumRepository already exists! Deprecation class overwrites Custom resource yum_repository from cookbook yum
Converging 20 resources
Recipe: selinux::_common
* yum_package[libselinux-utils] action install (up to date)
* directory[/etc/selinux] action create (up to date)
Recipe: selinux::permissive
* selinux_state[SELinux Permissive] action permissive (up to date)
Recipe: awesome_customers_rhel::firewall
* firewall_rule[open ports 80] action create
* firewall[default] action save
================================================================================
Error executing action `save` on resource 'firewall[default]'
================================================================================
RuntimeError
------------
firewall not active
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/firewall/libraries/helpers_firewalld.rb:47:in `firewalld_all_rules_permanent!'
/tmp/kitchen/cache/cookbooks/firewall/libraries/provider_firewall_firewalld.rb:156:in `block in <class:FirewallFirewalld>'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/awesome_customers_rhel/recipes/firewall.rb
16: firewall 'default' do
17: action :save
18: end
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/awesome_customers_rhel/recipes/firewall.rb:16:in `from_file'
firewall("default") do
action [:save]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :firewall
cookbook_name "awesome_customers_rhel"
recipe_name "firewall"
end
Platform:
---------
x86_64-linux
* firewall[default] action restart
* file[/etc/sysconfig/firewalld-chef.rules] action create
- create new file /etc/sysconfig/firewalld-chef.rules
- update content in file /etc/sysconfig/firewalld-chef.rules from none to ba8e4b
--- /etc/sysconfig/firewalld-chef.rules 2016-11-07 16:00:15.830881087 +0000
+++ /etc/sysconfig/.chef-firewalld-chef20161107-11627-1p25ddq.rules 2016-11-07 16:00:15.829880587 +0000
@@ -1 +1,6 @@
+# position 50
+firewall-cmd --direct --add-rule ipv4 filter INPUT 50 -p tcp -m tcp -m multiport --dports 80 -m comment --comment 'open ports 80' -j ACCEPT
+firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 50 -p tcp -m tcp -m multiport --dports 80 -m comment --comment 'open ports 80' -j ACCEPT
+firewall-cmd --direct --add-rule ipv6 filter INPUT 50 -p tcp -m tcp -m multiport --dports 80 -m comment --comment 'open ports 80' -j ACCEPT
+firewall-cmd --permanent --direct --add-rule ipv6 filter INPUT 50 -p tcp -m tcp -m multiport --dports 80 -m comment --comment 'open ports 80' -j ACCEPT
- restore selinux security context
* service[firewalld] action enable
- enable service service[firewalld]
* service[firewalld] action start
- start service service[firewalld]
Running handlers:
[2016-11-07T16:00:23+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-11-07T16:00:23+00:00] ERROR: Exception handlers complete
Chef Client failed. 5 resources updated in 47 seconds
[2016-11-07T16:00:23+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-11-07T16:00:23+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-11-07T16:00:23+00:00] ERROR: firewall[default] (awesome_customers_rhel::firewall line 16) had an error: RuntimeError: firewall not active
[2016-11-07T16:00:23+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment