From 4ca8b176448d7484a2eaebe8e7fa20f431ae4b5c Mon Sep 17 00:00:00 2001 From: Vasu1105 Date: Thu, 6 Oct 2016 00:32:23 +0530 Subject: Updated release notes for cab_package resource and provider Signed-off-by: Vasu1105 --- RELEASE_NOTES.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b652d7e837..0eb8c798d3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -30,6 +30,20 @@ Please see [https://docs.chef.io/release_notes.html](https://docs.chef.io/releas * Support for Solaris releases before 10u11 has been removed * Upgraded Ohai to 8.20 with new / enhanced plugins. See the [ohai changelog](https://github.com/chef-cookbooks/ohai/blob/master/CHANGELOG.md) +* Added cab_package resource and provider which supports the installation of CAB/cabinet packages on Windows. Example: + + ```ruby + cab_package 'Install .NET 3.5 sp1 via KB958488' do + source 'C:\Users\xyz\AppData\Local\Temp\Windows6.1-KB958488-x64.cab' + action :install + end + + cab_package 'Remove .NET 3.5 sp1 via KB958488' do + source 'C:\Users\xyz\AppData\Local\Temp\Windows6.1-KB958488-x64.cab' + action :remove + end + ``` + **NOTE:** cab_package resource does not support URLs in `source`. ## Highlighted bug fixes for this release: -- cgit v1.2.1 From b0c760d3d70e476b23fb595f20b96db74b09f17f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Wed, 5 Oct 2016 17:29:52 -0700 Subject: add learnchef testing to travis matrix Signed-off-by: Lamont Granquist --- .travis.yml | 52 +++++++++-- kitchen-tests/.kitchen.travis.yml | 7 +- kitchen-tests/.kitchen.yml | 8 +- kitchen-tests/Berksfile | 7 +- kitchen-tests/Berksfile.lock | 73 +++++++++------ .../awesome_customers_rhel_wrapper/.kitchen.yml | 21 +++++ .../awesome_customers_rhel_wrapper/Berksfile | 3 + .../awesome_customers_rhel_wrapper/chefignore | 100 +++++++++++++++++++++ .../awesome_customers_rhel_wrapper/metadata.rb | 9 ++ .../recipes/default.rb | 6 ++ .../awesome_customers_ubuntu_wrapper/.kitchen.yml | 21 +++++ .../awesome_customers_ubuntu_wrapper/Berksfile | 3 + .../awesome_customers_ubuntu_wrapper/chefignore | 100 +++++++++++++++++++++ .../awesome_customers_ubuntu_wrapper/metadata.rb | 9 ++ .../recipes/default.rb | 6 ++ 15 files changed, 388 insertions(+), 37 deletions(-) create mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml create mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile create mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore create mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/metadata.rb create mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/recipes/default.rb create mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml create mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile create mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore create mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/metadata.rb create mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/recipes/default.rb diff --git a/.travis.yml b/.travis.yml index 3fb6461607..0c2ae0b153 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,7 +119,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test ubuntu-1204 + - bundle exec kitchen test webapp-ubuntu-1204 after_failure: - cat .kitchen/logs/kitchen.log env: @@ -137,7 +137,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test ubuntu-1404 + - bundle exec kitchen test webapp-ubuntu-1404 after_failure: - cat .kitchen/logs/kitchen.log env: @@ -155,7 +155,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test ubuntu-1604 + - bundle exec kitchen test webapp-ubuntu-1604 after_failure: - cat .kitchen/logs/kitchen.log env: @@ -173,7 +173,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test debian-7 + - bundle exec kitchen test webapp-debian-7 after_failure: - cat .kitchen/logs/kitchen.log env: @@ -191,7 +191,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test debian-8 + - bundle exec kitchen test webapp-debian-8 bundler_args: --without changelog development docgen guard integration maintenance omnibus_package tools aix bsd mac_os_x solaris windows --frozen after_failure: - cat .kitchen/logs/kitchen.log @@ -210,7 +210,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test centos-6 + - bundle exec kitchen test webapp-centos-6 after_failure: - cat .kitchen/logs/kitchen.log env: @@ -228,7 +228,7 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test centos-7 + - bundle exec kitchen test webapp-centos-7 after_failure: - cat .kitchen/logs/kitchen.log env: @@ -246,12 +246,48 @@ matrix: - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) - cd kitchen-tests script: - - bundle exec kitchen test fedora-23 + - bundle exec kitchen test webapp-fedora-23 after_failure: - cat .kitchen/logs/kitchen.log env: - FEDORA=23 - KITCHEN_YAML=.kitchen.travis.yml + - rvm: 2.3.1 + services: docker + sudo: required + gemfile: kitchen-tests/Gemfile + before_install: + - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) + - gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2) + bundler_args: --without changelog development docgen guard integration maintenance omnibus_package tools aix bsd mac_os_x solaris windows --frozen + before_script: + - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) + - cd kitchen-tests + script: + - bundle exec kitchen test awesome-customers-ubuntu-ubuntu-1404 + after_failure: + - cat .kitchen/logs/kitchen.log + env: + - AWESOME_CUSTOMERS_UBUNTU=1 + - KITCHEN_YAML=.kitchen.travis.yml + - rvm: 2.3.1 + services: docker + sudo: required + gemfile: kitchen-tests/Gemfile + before_install: + - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) + - gem install bundler -v $(grep bundler omnibus_overrides.rb | cut -d'"' -f2) + bundler_args: --without changelog development docgen guard integration maintenance omnibus_package tools aix bsd mac_os_x solaris windows --frozen + before_script: + - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) + - cd kitchen-tests + script: + - bundle exec kitchen test awesome-customers-rhel-centos-7 + after_failure: + - cat .kitchen/logs/kitchen.log + env: + - AWESOME_CUSTOMERS_RHEL=1 + - KITCHEN_YAML=.kitchen.travis.yml ### END TEST KITCHEN ONLY ### - rvm: 2.3.1 sudo: required diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml index 9c5854d923..38d00ea199 100644 --- a/kitchen-tests/.kitchen.travis.yml +++ b/kitchen-tests/.kitchen.travis.yml @@ -115,4 +115,9 @@ suites: - name: webapp run_list: - recipe[base::default] -# - recipe[webapp::default] + - name: awesome_customers_ubuntu + run_list: + - recipe[awesome_customers_ubuntu_wrapper::default] + - name: awesome_customers_rhel + run_list: + - recipe[awesome_customers_rhel_wrapper::default] diff --git a/kitchen-tests/.kitchen.yml b/kitchen-tests/.kitchen.yml index 314857663e..d6df77932a 100644 --- a/kitchen-tests/.kitchen.yml +++ b/kitchen-tests/.kitchen.yml @@ -33,5 +33,9 @@ suites: - name: webapp run_list: - recipe[base::default] -# - recipe[webapp::default] - attributes: + - name: awesome_customers_ubuntu + run_list: + - recipe[awesome_customers_ubuntu_wrapper::default] + - name: awesome_customers_rhel + run_list: + - recipe[awesome_customers_rhel_wrapper::default] diff --git a/kitchen-tests/Berksfile b/kitchen-tests/Berksfile index 407b685236..45695ca5a3 100644 --- a/kitchen-tests/Berksfile +++ b/kitchen-tests/Berksfile @@ -1,8 +1,13 @@ source "https://supermarket.getchef.com" -cookbook "webapp", path: "cookbooks/webapp" +#cookbook "webapp", path: "cookbooks/webapp" cookbook "base", path: "cookbooks/base" cookbook "php", "~> 1.5.0" cookbook "resolver", github: "chef-cookbooks/resolver" + +cookbook "awesome_customers_ubuntu_wrapper", path: "cookbooks/awesome_customers_ubuntu_wrapper" +cookbook "awesome_customers_ubuntu", github: "learn-chef/awesome_customers_ubuntu" +cookbook "awesome_customers_rhel_wrapper", path: "cookbooks/awesome_customers_rhel_wrapper" +cookbook "awesome_customers_rhel", github: "learn-chef/awesome_customers_rhel" diff --git a/kitchen-tests/Berksfile.lock b/kitchen-tests/Berksfile.lock index 0a60ca95f6..c8c3aa5077 100644 --- a/kitchen-tests/Berksfile.lock +++ b/kitchen-tests/Berksfile.lock @@ -1,19 +1,42 @@ DEPENDENCIES + awesome_customers_rhel + git: https://github.com/learn-chef/awesome_customers_rhel.git + revision: 1ac86593829610c0eab7a45d9c63c09a9cea1754 + awesome_customers_rhel_wrapper + path: cookbooks/awesome_customers_rhel_wrapper + awesome_customers_ubuntu + git: https://github.com/learn-chef/awesome_customers_ubuntu.git + revision: 71927c094d570e6fd0f8bfbcc02ebe3556af2a16 + awesome_customers_ubuntu_wrapper + path: cookbooks/awesome_customers_ubuntu_wrapper base path: cookbooks/base php (~> 1.5.0) resolver git: https://github.com/chef-cookbooks/resolver.git revision: 8bf9034dabc47d29a07870e4059c32114f2c820a - webapp - path: cookbooks/webapp GRAPH - apache2 (3.2.2) apt (4.0.2) compat_resource (>= 12.10) - aws (4.1.1) - ohai (>= 4.0) + awesome_customers_rhel (0.1.0) + database (~> 6.0) + firewall (~> 2.5) + httpd (~> 0.4) + mysql (~> 7.0) + mysql2_chef_gem (~> 1.1) + selinux (~> 0.9) + awesome_customers_rhel_wrapper (0.1.0) + awesome_customers_rhel (>= 0.0.0) + awesome_customers_ubuntu (0.1.0) + apt (~> 4.0) + database (~> 6.0) + firewall (~> 2.5) + httpd (~> 0.4) + mysql (~> 7.0) + mysql2_chef_gem (~> 1.1) + awesome_customers_ubuntu_wrapper (0.1.0) + awesome_customers_ubuntu (>= 0.0.0) base (0.1.0) apt (>= 0.0.0) build-essential (>= 0.0.0) @@ -42,37 +65,40 @@ GRAPH compat_resource (>= 0.0.0) compat_resource (12.14.7) cron (2.0.0) - database (2.3.1) - aws (>= 0.0.0) - mysql (~> 5.0) - mysql-chef_gem (~> 0.0) + database (6.0.0) postgresql (>= 1.0.0) - xfs (>= 0.0.0) + firewall (2.5.2) + chef-sugar (>= 0.0.0) + httpd (0.4.4) + compat_resource (>= 12.14.6) iis (5.0.1) windows (>= 1.34.6) iptables (3.0.0) compat_resource (>= 12.14.3) logrotate (2.1.0) compat_resource (>= 0.0.0) + mariadb (0.3.1) + apt (>= 0.0.0) + yum (>= 0.0.0) + yum-epel (>= 0.0.0) mingw (1.2.4) compat_resource (>= 0.0.0) seven_zip (>= 0.0.0) multipackage (3.0.28) compat_resource (>= 0.0.0) - mysql (5.6.3) + mysql (7.2.0) + smf (>= 0.0.0) yum-mysql-community (>= 0.0.0) - mysql-chef_gem (0.0.5) + mysql2_chef_gem (1.1.0) build-essential (>= 0.0.0) - mysql (>= 0.0.0) + mariadb (>= 0.0.0) + mysql (>= 6.0) nscd (4.1.0) compat_resource (>= 0.0.0) ntp (3.2.0) - ohai (4.2.2) - compat_resource (>= 12.14) openssh (2.1.0) iptables (>= 1.0) - openssl (4.4.0) - chef-sugar (>= 3.1.1) + openssl (6.0.0) php (1.5.0) build-essential (>= 0.0.0) iis (>= 0.0.0) @@ -80,25 +106,22 @@ GRAPH windows (>= 0.0.0) xml (>= 0.0.0) yum-epel (>= 0.0.0) - postgresql (4.0.6) + postgresql (3.4.16) apt (>= 1.9.0) build-essential (>= 0.0.0) - openssl (~> 4.0) + openssl (>= 0.0.0) + rbac (1.0.3) resolver (1.3.1) selinux (0.9.0) seven_zip (2.0.2) windows (>= 1.2.2) + smf (2.2.8) + rbac (>= 1.0.1) sudo (3.0.0) ubuntu (2.0.0) apt (>= 0.0.0) users (4.0.1) - webapp (0.1.0) - apache2 (~> 3.2.2) - database (~> 2.3.1) - mysql (~> 5.6.3) - php (~> 1.5.0) windows (2.0.2) - xfs (2.0.1) xml (3.0.0) build-essential (>= 0.0.0) yum (4.0.0) diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml new file mode 100644 index 0000000000..53e966ae5b --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml @@ -0,0 +1,21 @@ +--- +driver: + name: vagrant + network: + - ["private_network", {ip: "192.168.34.34"}] + +provisioner: + name: chef_zero + +platforms: + - name: ubuntu-14.04 + +suites: + - name: default + run_list: + - recipe[awesome_customers_ubuntu::default] + attributes: + awesome_customers_ubuntu: + database: + root_password: 'mysql_root_password' + admin_password: 'mysql_admin_password' diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile new file mode 100644 index 0000000000..967b9a78b6 --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile @@ -0,0 +1,3 @@ +source "https://supermarket.chef.io" + +metadata diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore new file mode 100644 index 0000000000..0fc713235b --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore @@ -0,0 +1,100 @@ +# Put files/directories that should be ignored in this file when uploading +# or sharing to the community site. +# Lines that start with '# ' are comments. + +# OS generated files # +###################### +.DS_Store +Icon? +nohup.out +ehthumbs.db +Thumbs.db + +# SASS # +######## +.sass-cache + +# EDITORS # +########### +\#* +.#* +*~ +*.sw[a-z] +*.bak +REVISION +TAGS* +tmtags +*_flymake.* +*_flymake +*.tmproj +.project +.settings +mkmf.log + +## COMPILED ## +############## +a.out +*.o +*.pyc +*.so +*.com +*.class +*.dll +*.exe +*/rdoc/ + +# Testing # +########### +.watchr +.rspec +spec/* +spec/fixtures/* +test/* +features/* +examples/* +Guardfile +Procfile +.kitchen* +.rubocop.yml + +# SCM # +####### +.git +*/.git +.gitignore +.gitmodules +.gitconfig +.gitattributes +.svn +*/.bzr/* +*/.hg/* +*/.svn/* + +# Berkshelf # +############# +Berksfile +Berksfile.lock +cookbooks/* +tmp + +# Cookbooks # +############# +CONTRIBUTING* +CHANGELOG* +TESTING* + +# Strainer # +############ +Colanderfile +Strainerfile +.colander +.strainer + +# Vagrant # +########### +.vagrant +Vagrantfile + +# Travis # +########## +.travis.yml diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/metadata.rb b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/metadata.rb new file mode 100644 index 0000000000..641f2f91e3 --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/metadata.rb @@ -0,0 +1,9 @@ +name "awesome_customers_rhel_wrapper" +maintainer "The Authors" +maintainer_email "you@example.com" +license "all_rights" +description "Installs/Configures awesome_customers_rhel" +long_description "Installs/Configures awesome_customers_rhel" +version "0.1.0" + +depends "awesome_customers_rhel" diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/recipes/default.rb b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/recipes/default.rb new file mode 100644 index 0000000000..058ee61617 --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/recipes/default.rb @@ -0,0 +1,6 @@ +# +# Cookbook Name:: awesome_customers_rhel +# Recipe:: default +# +# Copyright (c) 2016 The Authors, All Rights Reserved. +include_recipe "awesome_customers_rhel::default" diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml new file mode 100644 index 0000000000..53e966ae5b --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml @@ -0,0 +1,21 @@ +--- +driver: + name: vagrant + network: + - ["private_network", {ip: "192.168.34.34"}] + +provisioner: + name: chef_zero + +platforms: + - name: ubuntu-14.04 + +suites: + - name: default + run_list: + - recipe[awesome_customers_ubuntu::default] + attributes: + awesome_customers_ubuntu: + database: + root_password: 'mysql_root_password' + admin_password: 'mysql_admin_password' diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile new file mode 100644 index 0000000000..967b9a78b6 --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile @@ -0,0 +1,3 @@ +source "https://supermarket.chef.io" + +metadata diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore new file mode 100644 index 0000000000..0fc713235b --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore @@ -0,0 +1,100 @@ +# Put files/directories that should be ignored in this file when uploading +# or sharing to the community site. +# Lines that start with '# ' are comments. + +# OS generated files # +###################### +.DS_Store +Icon? +nohup.out +ehthumbs.db +Thumbs.db + +# SASS # +######## +.sass-cache + +# EDITORS # +########### +\#* +.#* +*~ +*.sw[a-z] +*.bak +REVISION +TAGS* +tmtags +*_flymake.* +*_flymake +*.tmproj +.project +.settings +mkmf.log + +## COMPILED ## +############## +a.out +*.o +*.pyc +*.so +*.com +*.class +*.dll +*.exe +*/rdoc/ + +# Testing # +########### +.watchr +.rspec +spec/* +spec/fixtures/* +test/* +features/* +examples/* +Guardfile +Procfile +.kitchen* +.rubocop.yml + +# SCM # +####### +.git +*/.git +.gitignore +.gitmodules +.gitconfig +.gitattributes +.svn +*/.bzr/* +*/.hg/* +*/.svn/* + +# Berkshelf # +############# +Berksfile +Berksfile.lock +cookbooks/* +tmp + +# Cookbooks # +############# +CONTRIBUTING* +CHANGELOG* +TESTING* + +# Strainer # +############ +Colanderfile +Strainerfile +.colander +.strainer + +# Vagrant # +########### +.vagrant +Vagrantfile + +# Travis # +########## +.travis.yml diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/metadata.rb b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/metadata.rb new file mode 100644 index 0000000000..429fce2f64 --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/metadata.rb @@ -0,0 +1,9 @@ +name "awesome_customers_ubuntu_wrapper" +maintainer "The Authors" +maintainer_email "you@example.com" +license "all_rights" +description "Installs/Configures awesome_customers_ubuntu" +long_description "Installs/Configures awesome_customers_ubuntu" +version "0.1.0" + +depends "awesome_customers_ubuntu" diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/recipes/default.rb b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/recipes/default.rb new file mode 100644 index 0000000000..93012d295f --- /dev/null +++ b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/recipes/default.rb @@ -0,0 +1,6 @@ +# +# Cookbook Name:: awesome_customers_ubuntu +# Recipe:: default +# +# Copyright (c) 2016 The Authors, All Rights Reserved. +include_recipe "awesome_customers_ubuntu::default" -- cgit v1.2.1 From 050989ea7b9a7bb5dd8531b7f6f195b8e3358eac Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Wed, 5 Oct 2016 17:31:35 -0700 Subject: remove unnecessary skeleton files from test cookbooks Signed-off-by: Lamont Granquist --- .../awesome_customers_rhel_wrapper/.kitchen.yml | 21 ----- .../awesome_customers_rhel_wrapper/Berksfile | 3 - .../awesome_customers_rhel_wrapper/chefignore | 100 --------------------- .../awesome_customers_ubuntu_wrapper/.kitchen.yml | 21 ----- .../awesome_customers_ubuntu_wrapper/Berksfile | 3 - .../awesome_customers_ubuntu_wrapper/chefignore | 100 --------------------- 6 files changed, 248 deletions(-) delete mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml delete mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile delete mode 100644 kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore delete mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml delete mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile delete mode 100644 kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml deleted file mode 100644 index 53e966ae5b..0000000000 --- a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/.kitchen.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -driver: - name: vagrant - network: - - ["private_network", {ip: "192.168.34.34"}] - -provisioner: - name: chef_zero - -platforms: - - name: ubuntu-14.04 - -suites: - - name: default - run_list: - - recipe[awesome_customers_ubuntu::default] - attributes: - awesome_customers_ubuntu: - database: - root_password: 'mysql_root_password' - admin_password: 'mysql_admin_password' diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile deleted file mode 100644 index 967b9a78b6..0000000000 --- a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/Berksfile +++ /dev/null @@ -1,3 +0,0 @@ -source "https://supermarket.chef.io" - -metadata diff --git a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore b/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore deleted file mode 100644 index 0fc713235b..0000000000 --- a/kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/chefignore +++ /dev/null @@ -1,100 +0,0 @@ -# Put files/directories that should be ignored in this file when uploading -# or sharing to the community site. -# Lines that start with '# ' are comments. - -# OS generated files # -###################### -.DS_Store -Icon? -nohup.out -ehthumbs.db -Thumbs.db - -# SASS # -######## -.sass-cache - -# EDITORS # -########### -\#* -.#* -*~ -*.sw[a-z] -*.bak -REVISION -TAGS* -tmtags -*_flymake.* -*_flymake -*.tmproj -.project -.settings -mkmf.log - -## COMPILED ## -############## -a.out -*.o -*.pyc -*.so -*.com -*.class -*.dll -*.exe -*/rdoc/ - -# Testing # -########### -.watchr -.rspec -spec/* -spec/fixtures/* -test/* -features/* -examples/* -Guardfile -Procfile -.kitchen* -.rubocop.yml - -# SCM # -####### -.git -*/.git -.gitignore -.gitmodules -.gitconfig -.gitattributes -.svn -*/.bzr/* -*/.hg/* -*/.svn/* - -# Berkshelf # -############# -Berksfile -Berksfile.lock -cookbooks/* -tmp - -# Cookbooks # -############# -CONTRIBUTING* -CHANGELOG* -TESTING* - -# Strainer # -############ -Colanderfile -Strainerfile -.colander -.strainer - -# Vagrant # -########### -.vagrant -Vagrantfile - -# Travis # -########## -.travis.yml diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml deleted file mode 100644 index 53e966ae5b..0000000000 --- a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/.kitchen.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -driver: - name: vagrant - network: - - ["private_network", {ip: "192.168.34.34"}] - -provisioner: - name: chef_zero - -platforms: - - name: ubuntu-14.04 - -suites: - - name: default - run_list: - - recipe[awesome_customers_ubuntu::default] - attributes: - awesome_customers_ubuntu: - database: - root_password: 'mysql_root_password' - admin_password: 'mysql_admin_password' diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile deleted file mode 100644 index 967b9a78b6..0000000000 --- a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/Berksfile +++ /dev/null @@ -1,3 +0,0 @@ -source "https://supermarket.chef.io" - -metadata diff --git a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore b/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore deleted file mode 100644 index 0fc713235b..0000000000 --- a/kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/chefignore +++ /dev/null @@ -1,100 +0,0 @@ -# Put files/directories that should be ignored in this file when uploading -# or sharing to the community site. -# Lines that start with '# ' are comments. - -# OS generated files # -###################### -.DS_Store -Icon? -nohup.out -ehthumbs.db -Thumbs.db - -# SASS # -######## -.sass-cache - -# EDITORS # -########### -\#* -.#* -*~ -*.sw[a-z] -*.bak -REVISION -TAGS* -tmtags -*_flymake.* -*_flymake -*.tmproj -.project -.settings -mkmf.log - -## COMPILED ## -############## -a.out -*.o -*.pyc -*.so -*.com -*.class -*.dll -*.exe -*/rdoc/ - -# Testing # -########### -.watchr -.rspec -spec/* -spec/fixtures/* -test/* -features/* -examples/* -Guardfile -Procfile -.kitchen* -.rubocop.yml - -# SCM # -####### -.git -*/.git -.gitignore -.gitmodules -.gitconfig -.gitattributes -.svn -*/.bzr/* -*/.hg/* -*/.svn/* - -# Berkshelf # -############# -Berksfile -Berksfile.lock -cookbooks/* -tmp - -# Cookbooks # -############# -CONTRIBUTING* -CHANGELOG* -TESTING* - -# Strainer # -############ -Colanderfile -Strainerfile -.colander -.strainer - -# Vagrant # -########### -.vagrant -Vagrantfile - -# Travis # -########## -.travis.yml -- cgit v1.2.1 From cbc56072a96efae05df8c954762c767075bfe3b4 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 6 Oct 2016 10:43:50 -0700 Subject: fix manage_home provider inconsistency on freebsd and mac we're now telling people to use `manage_home` instead of `supports[:manage_home]` but it doesn't actually work. fixes that so that it works now. Signed-off-by: Lamont Granquist --- lib/chef/provider/user.rb | 10 ++++++++++ lib/chef/provider/user/dscl.rb | 4 ++-- lib/chef/provider/user/linux.rb | 18 ++++-------------- lib/chef/provider/user/pw.rb | 4 ++-- lib/chef/provider/user/useradd.rb | 6 +----- 5 files changed, 19 insertions(+), 23 deletions(-) diff --git a/lib/chef/provider/user.rb b/lib/chef/provider/user.rb index 2bc4cc10bc..f6b088d333 100644 --- a/lib/chef/provider/user.rb +++ b/lib/chef/provider/user.rb @@ -210,6 +210,16 @@ class Chef def check_lock raise NotImplementedError end + + def non_unique? + # XXX: THIS GOES AWAY IN CHEF-13 AND BECOMES JUST new_resource.non_unique + new_resource.non_unique || new_resource.supports[:non_unique] + end + + def managing_home_dir? + # XXX: THIS GOES AWAY IN CHEF-13 AND BECOMES JUST new_resource.manage_home + new_resource.manage_home || new_resource.supports[:manage_home] + end end end end diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 821fa8e8a7..01203c0d9f 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -292,7 +292,7 @@ user password using shadow hash.") return end - if new_resource.supports[:manage_home] + if managing_home_dir? validate_home_dir_specification! if (current_resource.home == new_resource.home) && !new_home_exists? @@ -438,7 +438,7 @@ user password using shadow hash.") # and deleting home directory if needed. # def remove_user - if new_resource.supports[:manage_home] + if managing_home_dir? # Remove home directory FileUtils.rm_rf(current_resource.home) end diff --git a/lib/chef/provider/user/linux.rb b/lib/chef/provider/user/linux.rb index 4a2491d806..968cf771e4 100644 --- a/lib/chef/provider/user/linux.rb +++ b/lib/chef/provider/user/linux.rb @@ -52,14 +52,14 @@ class Chef opts << "-s" << new_resource.shell if should_set?(:shell) opts << "-u" << new_resource.uid if should_set?(:uid) opts << "-d" << new_resource.home if updating_home? - opts << "-o" if non_unique + opts << "-o" if non_unique? opts end def usermod_options opts = [] if updating_home? - if manage_home + if managing_home_dir? opts << "-m" end end @@ -69,7 +69,7 @@ class Chef def useradd_options opts = [] opts << "-r" if new_resource.system - if manage_home + if managing_home_dir? opts << "-m" else opts << "-M" @@ -79,7 +79,7 @@ class Chef def userdel_options opts = [] - opts << "-r" if manage_home + opts << "-r" if managing_home_dir? opts << "-f" if new_resource.force opts end @@ -122,16 +122,6 @@ class Chef # FIXME: should probably go on the current_resource @locked end - - def non_unique - # XXX: THIS GOES AWAY IN CHEF-13 AND BECOMES JUST new_resource.non_unique - new_resource.non_unique || new_resource.supports[:non_unique] - end - - def manage_home - # XXX: THIS GOES AWAY IN CHEF-13 AND BECOMES JUST new_resource.manage_home - new_resource.manage_home || new_resource.supports[:manage_home] - end end end end diff --git a/lib/chef/provider/user/pw.rb b/lib/chef/provider/user/pw.rb index a1d7671c28..b210374eb9 100644 --- a/lib/chef/provider/user/pw.rb +++ b/lib/chef/provider/user/pw.rb @@ -46,7 +46,7 @@ class Chef def remove_user command = "pw userdel #{@new_resource.username}" - command << " -r" if @new_resource.supports[:manage_home] + command << " -r" if managing_home_dir? run_command(:command => command) end @@ -87,7 +87,7 @@ class Chef end end end - if @new_resource.supports[:manage_home] + if managing_home_dir? Chef::Log.debug("#{@new_resource} is managing the users home directory") opts << " -m" end diff --git a/lib/chef/provider/user/useradd.rb b/lib/chef/provider/user/useradd.rb index 68b62812a7..35a106b0b6 100644 --- a/lib/chef/provider/user/useradd.rb +++ b/lib/chef/provider/user/useradd.rb @@ -124,7 +124,7 @@ class Chef Chef::Log.debug("#{new_resource} setting home to #{new_resource.home}") end end - opts << "-o" if new_resource.non_unique + opts << "-o" if non_unique? opts end end @@ -154,10 +154,6 @@ class Chef new_resource.home && Pathname.new(@current_resource.home).cleanpath != Pathname.new(new_resource.home).cleanpath end - def managing_home_dir? - new_resource.manage_home || new_resource.supports[:manage_home] - end - end end end -- cgit v1.2.1 From 747454c0862b0813df1529423d86d7e4706d873a Mon Sep 17 00:00:00 2001 From: Matt Wrock Date: Thu, 6 Oct 2016 12:44:58 -0700 Subject: small change to test bump bot Signed-off-by: Matt Wrock --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 74a30d45b0..98216cf5fd 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,7 @@ ChefConfig::PackageTask.new(File.expand_path("..", __FILE__), "Chef", "chef") do package.component_paths = ["chef-config"] package.generate_version_class = true end -# Add a conservative dependency update to version:bump (which was created by PackageTask) +# Add conservative dependency update to version:bump (which was created by PackageTask) task "version:bump" => %w{version:bump_patch version:update} task "version:bump" => %w{version:bump_patch version:update} -- cgit v1.2.1 From 15450932d5968ceac15176465fdeca4392b36320 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Thu, 6 Oct 2016 20:04:12 +0000 Subject: Bump version of chef to 12.15.15 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0e9b5d3459..cdd36af707 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.14) + chef (12.15.15) addressable bundler (>= 1.10) - chef-config (= 12.15.14) + chef-config (= 12.15.15) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.14-universal-mingw32) + chef (12.15.15-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.14) + chef-config (= 12.15.15) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.14) + chef-config (12.15.15) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index c6305cccfe..26856378de 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.14 \ No newline at end of file +12.15.15 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 00f73a44f6..cda39fe612 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.14" + VERSION = "12.15.15" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index bb3cdfe80c..5fcb42d8f8 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.14" + VERSION = "12.15.15" end # -- cgit v1.2.1 From 0cea7a0055a40902bd93e3540f3e4e701b4ba9c0 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 6 Oct 2016 13:51:23 -0700 Subject: use the command line prompt for sudo if set Signed-off-by: Lamont Granquist --- lib/chef/knife/ssh.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb index 6f266b2719..f827aca280 100644 --- a/lib/chef/knife/ssh.rb +++ b/lib/chef/knife/ssh.rb @@ -541,6 +541,7 @@ class Chef configure_user configure_password + @password = config[:ssh_password] if config[:ssh_password] configure_ssh_identity_file configure_gateway configure_session -- cgit v1.2.1 From 1a0c4c533be9e8a35a6fa8650e7a478f19d90ae6 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Thu, 6 Oct 2016 21:10:32 +0000 Subject: Bump version of chef to 12.15.16 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cdd36af707..bfedbadd53 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.15) + chef (12.15.16) addressable bundler (>= 1.10) - chef-config (= 12.15.15) + chef-config (= 12.15.16) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.15-universal-mingw32) + chef (12.15.16-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.15) + chef-config (= 12.15.16) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.15) + chef-config (12.15.16) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index 26856378de..dc8fad71b2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.15 \ No newline at end of file +12.15.16 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index cda39fe612..4925b93fee 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.15" + VERSION = "12.15.16" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 5fcb42d8f8..33ca2b11bd 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.15" + VERSION = "12.15.16" end # -- cgit v1.2.1 From 3f22571dfa424ffad434ad203c8e1f0bc5b677b4 Mon Sep 17 00:00:00 2001 From: "Jeremy J. Miller" Date: Thu, 6 Oct 2016 17:46:26 -0400 Subject: Adding support for rfc 62 exit code 213 --- lib/chef/application/exit_code.rb | 9 +++++++++ lib/chef/exceptions.rb | 1 + spec/unit/application/exit_code_spec.rb | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index 753f1a0d80..6fec2524dd 100644 --- a/lib/chef/application/exit_code.rb +++ b/lib/chef/application/exit_code.rb @@ -35,6 +35,7 @@ class Chef REBOOT_NEEDED: 37, REBOOT_FAILED: 41, AUDIT_MODE_FAILURE: 42, + CLIENT_UPGRADED: 213, } DEPRECATED_RFC_062_EXIT_CODES = { @@ -127,6 +128,8 @@ class Chef VALID_RFC_062_EXIT_CODES[:REBOOT_FAILED] elsif audit_failure?(exception) VALID_RFC_062_EXIT_CODES[:AUDIT_MODE_FAILURE] + elsif client_upgraded?(exception) + VALID_RFC_062_EXIT_CODES[:CLIENT_UPGRADED] else VALID_RFC_062_EXIT_CODES[:GENERIC_FAILURE] end @@ -162,6 +165,12 @@ class Chef end end + def client_upgraded?(exception) + resolve_exception_array(exception).any? do |e| + e.is_a? Chef::Exceptions::ClientUpgraded + end + end + def sigint_received?(exception) resolve_exception_array(exception).any? do |e| e.is_a? Chef::Exceptions::SigInt diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index ea779754e2..7126323ff7 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -79,6 +79,7 @@ class Chef class Reboot < Exception; end class RebootPending < Exception; end class RebootFailed < Mixlib::ShellOut::ShellCommandFailed; end + class ClientUpgraded < Exception; end class PrivateKeyMissing < RuntimeError; end class CannotWritePrivateKey < RuntimeError; end class RoleNotFound < RuntimeError; end diff --git a/spec/unit/application/exit_code_spec.rb b/spec/unit/application/exit_code_spec.rb index 73a113e554..59ee400c23 100644 --- a/spec/unit/application/exit_code_spec.rb +++ b/spec/unit/application/exit_code_spec.rb @@ -64,6 +64,10 @@ describe Chef::Application::ExitCode do it "validates a REBOOT_FAILED return code of 41" do expect(valid_rfc_exit_codes.include?(41)).to eq(true) end + + it "validates a CLIENT_UPGRADED return code of 213" do + expect(valid_rfc_exit_codes.include?(213)).to eq(true) + end end context "when Chef::Config :exit_status is not configured" do @@ -215,6 +219,12 @@ describe Chef::Application::ExitCode do expect(exit_codes.normalize_exit_code(runtime_error)).to eq(37) end + it "returns CLIENT_UPGRADED when the client was upgraded during converge" do + client_upgraded_error = Chef::Exceptions::ClientUpgraded.new("BOOM") + runtime_error = Chef::Exceptions::RunFailedWrappingError.new(client_upgraded_error) + expect(exit_codes.normalize_exit_code(runtime_error)).to eq(213) + end + it "returns SIGINT_RECEIVED when a SIGINT is received." do sigint_error = Chef::Exceptions::SigInt.new("BOOM") runtime_error = Chef::Exceptions::RunFailedWrappingError.new(sigint_error) -- cgit v1.2.1 From 1a2f0c6422adc4c304bdd36af9fcdbb43df54e3a Mon Sep 17 00:00:00 2001 From: "Jeremy J. Miller" Date: Thu, 6 Oct 2016 17:46:26 -0400 Subject: Adding support for rfc 62 exit code 213 Signed-off-by: Jeremy J. Miller --- lib/chef/application/exit_code.rb | 9 +++++++++ lib/chef/exceptions.rb | 1 + spec/unit/application/exit_code_spec.rb | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index 753f1a0d80..6fec2524dd 100644 --- a/lib/chef/application/exit_code.rb +++ b/lib/chef/application/exit_code.rb @@ -35,6 +35,7 @@ class Chef REBOOT_NEEDED: 37, REBOOT_FAILED: 41, AUDIT_MODE_FAILURE: 42, + CLIENT_UPGRADED: 213, } DEPRECATED_RFC_062_EXIT_CODES = { @@ -127,6 +128,8 @@ class Chef VALID_RFC_062_EXIT_CODES[:REBOOT_FAILED] elsif audit_failure?(exception) VALID_RFC_062_EXIT_CODES[:AUDIT_MODE_FAILURE] + elsif client_upgraded?(exception) + VALID_RFC_062_EXIT_CODES[:CLIENT_UPGRADED] else VALID_RFC_062_EXIT_CODES[:GENERIC_FAILURE] end @@ -162,6 +165,12 @@ class Chef end end + def client_upgraded?(exception) + resolve_exception_array(exception).any? do |e| + e.is_a? Chef::Exceptions::ClientUpgraded + end + end + def sigint_received?(exception) resolve_exception_array(exception).any? do |e| e.is_a? Chef::Exceptions::SigInt diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index ea779754e2..7126323ff7 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -79,6 +79,7 @@ class Chef class Reboot < Exception; end class RebootPending < Exception; end class RebootFailed < Mixlib::ShellOut::ShellCommandFailed; end + class ClientUpgraded < Exception; end class PrivateKeyMissing < RuntimeError; end class CannotWritePrivateKey < RuntimeError; end class RoleNotFound < RuntimeError; end diff --git a/spec/unit/application/exit_code_spec.rb b/spec/unit/application/exit_code_spec.rb index 73a113e554..59ee400c23 100644 --- a/spec/unit/application/exit_code_spec.rb +++ b/spec/unit/application/exit_code_spec.rb @@ -64,6 +64,10 @@ describe Chef::Application::ExitCode do it "validates a REBOOT_FAILED return code of 41" do expect(valid_rfc_exit_codes.include?(41)).to eq(true) end + + it "validates a CLIENT_UPGRADED return code of 213" do + expect(valid_rfc_exit_codes.include?(213)).to eq(true) + end end context "when Chef::Config :exit_status is not configured" do @@ -215,6 +219,12 @@ describe Chef::Application::ExitCode do expect(exit_codes.normalize_exit_code(runtime_error)).to eq(37) end + it "returns CLIENT_UPGRADED when the client was upgraded during converge" do + client_upgraded_error = Chef::Exceptions::ClientUpgraded.new("BOOM") + runtime_error = Chef::Exceptions::RunFailedWrappingError.new(client_upgraded_error) + expect(exit_codes.normalize_exit_code(runtime_error)).to eq(213) + end + it "returns SIGINT_RECEIVED when a SIGINT is received." do sigint_error = Chef::Exceptions::SigInt.new("BOOM") runtime_error = Chef::Exceptions::RunFailedWrappingError.new(sigint_error) -- cgit v1.2.1 From b22c9b270fe5ec18d670f14481f1065e098246b4 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Fri, 7 Oct 2016 16:07:36 +0000 Subject: Bump version of chef to 12.15.17 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index bfedbadd53..28759a9262 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.16) + chef (12.15.17) addressable bundler (>= 1.10) - chef-config (= 12.15.16) + chef-config (= 12.15.17) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.16-universal-mingw32) + chef (12.15.17-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.16) + chef-config (= 12.15.17) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.16) + chef-config (12.15.17) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index dc8fad71b2..ddf9e96e53 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.16 \ No newline at end of file +12.15.17 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 4925b93fee..25f76b9509 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.16" + VERSION = "12.15.17" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 33ca2b11bd..4014c59316 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.16" + VERSION = "12.15.17" end # -- cgit v1.2.1 From a0e772a2939b9b2813f998d1e08b43762975f8c8 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Fri, 7 Oct 2016 16:40:38 +0000 Subject: Bump version of chef to 12.15.18 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 28759a9262..78f333739a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.17) + chef (12.15.18) addressable bundler (>= 1.10) - chef-config (= 12.15.17) + chef-config (= 12.15.18) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.17-universal-mingw32) + chef (12.15.18-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.17) + chef-config (= 12.15.18) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.17) + chef-config (12.15.18) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index ddf9e96e53..ccbaa268e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.17 \ No newline at end of file +12.15.18 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 25f76b9509..203a59828c 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.17" + VERSION = "12.15.18" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 4014c59316..04db21cdeb 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.17" + VERSION = "12.15.18" end # -- cgit v1.2.1 From f4cd9b334d394f89298519073a3c138fe7f8b22f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 7 Oct 2016 09:42:34 -0700 Subject: we haven't even been testing against chef-rewind for some time and its now officially deprecated in its README: https://github.com/thommay/chef-rewind Signed-off-by: Lamont Granquist --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 3c6588867c..782a85357d 100644 --- a/Gemfile +++ b/Gemfile @@ -33,7 +33,6 @@ end group(:integration) do gem "chef-provisioning" gem "chef-provisioning-aws" - gem "chef-rewind" gem "chef-sugar" gem "chefspec" gem "halite" -- cgit v1.2.1 From f4a8371527abff08794fec086f149c559167014f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 7 Oct 2016 14:50:52 -0700 Subject: manually remove chef-rewind from the Gemfile.lock Signed-off-by: Lamont Granquist --- Gemfile.lock | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 78f333739a..524c71bfe2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,7 +156,6 @@ GEM chef-provisioning (~> 2.0) retryable (~> 2.0, >= 2.0.1) ubuntu_ami (~> 0.4, >= 0.4.1) - chef-rewind (0.0.9) chef-sugar (3.4.0) chef-zero (5.1.0) ffi-yajl (~> 2.2) @@ -575,7 +574,6 @@ DEPENDENCIES chef-config! chef-provisioning chef-provisioning-aws - chef-rewind chef-sugar cheffish chefspec -- cgit v1.2.1 From a8278f840bea3c669b052a8fe4a3496141fae5e3 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Fri, 7 Oct 2016 22:39:18 +0000 Subject: Bump version of chef to 12.15.19 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 78f333739a..58ecc2f2a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.18) + chef (12.15.19) addressable bundler (>= 1.10) - chef-config (= 12.15.18) + chef-config (= 12.15.19) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.18-universal-mingw32) + chef (12.15.19-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.18) + chef-config (= 12.15.19) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.18) + chef-config (12.15.19) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index ccbaa268e4..8519fe894c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.18 \ No newline at end of file +12.15.19 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 203a59828c..b978573cd7 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.18" + VERSION = "12.15.19" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 04db21cdeb..b0297a52cd 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.18" + VERSION = "12.15.19" end # -- cgit v1.2.1 From b37dec1f8e027376feddc17f72ba3a4da7823086 Mon Sep 17 00:00:00 2001 From: Ryan Hass Date: Fri, 7 Oct 2016 15:31:28 -0700 Subject: Update changelog for 12.15.18 release. Signed-off-by: Ryan Hass --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ddd22612a..91644a6bf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Change Log +## [v12.15.18](https://github.com/chef/chef/tree/v12.15.18) (2016-10-07) +[Full Changelog](https://github.com/chef/chef/compare/v12.14.89...v12.15.18) + +**Enhancements:** + +- Adding support for rfc 62 exit code 213 [\#5428](https://github.com/chef/chef/pull/5428) ([jeremymv2](https://github.com/jeremymv2)) +- Allow raw_key to override the configured signing\_key [\#5314](https://github.com/chef/chef/pull/5314) ([thommay](https://github.com/thommay)) +- Set yum\_repository gpgcheck default to true [\#5398](https://github.com/chef/chef/pull/5398) ([shortdudey123](https://github.com/shortdudey123)) +- Allow deletion of registry\_key without the need for users to pass data key in values hash. [\#5359](https://github.com/chef/chef/pull/5359) ([Aliasgar16](https://github.com/Aliasgar16)) +- Adding support for cab files to Chef package provider on windows [\#5285](https://github.com/chef/chef/pull/5285) ([Vasu1105](https://github.com/Vasu1105)) +- Ignore unknown metadata fields in metadata.rb [\#5299](https://github.com/chef/chef/pull/5299) ([lamont-granquist](https://github.com/lamont-granquist)) + +**Fixed Bugs:** + +- knife ssh: use the command line prompt for sudo if set [\#5427](https://github.com/chef/chef/pull/5427) ([lamont-granquist](https://github.com/lamont-granquist)) +- User provider: Fix manage\_home provider inconsistency for Mac and FreeBSD providers [\#5423](https://github.com/chef/chef/pull/5423) ([lamont-granquist](https://github.com/lamont-granquist)) +- Fix for "Chefspec template rendering fails when cookbook\_name != directory name" [\#5417](https://github.com/chef/chef/pull/5417) ([lamont-granquist](https://github.com/lamont-granquist)) +- Fix solaris handling for useradd -m/-M behavior [\#5408](https://github.com/chef/chef/pull/5408) ([coderanger](https://github.com/coderanger)) +- Normalize full key name to avoid resource update on identical key names [\#5290](https://github.com/chef/chef/pull/5290) ([bai](https://github.com/bai)) +- Add trailing newline to generated 15update-stamp [\#5382](https://github.com/chef/chef/pull/5382) ([pwalz](https://github.com/pwalz)) +- Invalid `dsc_scripts` should fail the run [\#5377](https://github.com/chef/chef/pull/5377) ([NimishaS](https://github.com/NimishaS)) +- Revert --local filter for gems installed from paths [\#5379](https://github.com/chef/chef/pull/5379) ([mwrock](https://github.com/mwrock)) +- Fix knife list\_commands\(\) [\#5386](https://github.com/chef/chef/pull/5386) ([lamont-granquist](https://github.com/lamont-granquist)) +- Don't use -r for users or groups on Solaris. [\#5355](https://github.com/chef/chef/pull/5355) ([coderanger](https://github.com/coderanger)) +- Chef 12 Attribute Regression [\#5360](https://github.com/chef/chef/pull/5360) ([gbagnoli](https://github.com/gbagnoli)) +- Handling Errno::ETIMEDOUT [\#5358](https://github.com/chef/chef/pull/5358) ([NimishaS](https://github.com/NimishaS)) + ## [v12.14.89](https://github.com/chef/chef/tree/v12.14.89) (2016-09-22) [Full Changelog](https://github.com/chef/chef/compare/v12.14.77...v12.14.89) -- cgit v1.2.1 From c25ef0d7514f7de047a7b6dd368e7ac6a929cf78 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Fri, 7 Oct 2016 22:53:24 +0000 Subject: Bump version of chef to 12.15.20 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 58ecc2f2a5..70a6dea4c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.19) + chef (12.15.20) addressable bundler (>= 1.10) - chef-config (= 12.15.19) + chef-config (= 12.15.20) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.19-universal-mingw32) + chef (12.15.20-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.19) + chef-config (= 12.15.20) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.19) + chef-config (12.15.20) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index 8519fe894c..f3a819ca5d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.19 \ No newline at end of file +12.15.20 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index b978573cd7..14adbc322a 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.19" + VERSION = "12.15.20" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index b0297a52cd..30de880b23 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.19" + VERSION = "12.15.20" end # -- cgit v1.2.1 From 6f2315803b046d07eaef641cb2c427327c32e265 Mon Sep 17 00:00:00 2001 From: Chef Versioner Date: Fri, 7 Oct 2016 22:54:18 +0000 Subject: Bump version of chef to 12.15.21 by Chef Versioner. --- Gemfile.lock | 10 +++++----- VERSION | 2 +- chef-config/lib/chef-config/version.rb | 2 +- lib/chef/version.rb | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a3e783374a..defe1e2b6e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,10 +33,10 @@ GIT PATH remote: . specs: - chef (12.15.20) + chef (12.15.21) addressable bundler (>= 1.10) - chef-config (= 12.15.20) + chef-config (= 12.15.21) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -62,10 +62,10 @@ PATH specinfra (~> 2.10) syslog-logger (~> 1.6) uuidtools (~> 2.1.5) - chef (12.15.20-universal-mingw32) + chef (12.15.21-universal-mingw32) addressable bundler (>= 1.10) - chef-config (= 12.15.20) + chef-config (= 12.15.21) chef-zero (>= 4.8) diff-lcs (~> 1.2, >= 1.2.4) erubis (~> 2.7) @@ -106,7 +106,7 @@ PATH PATH remote: chef-config specs: - chef-config (12.15.20) + chef-config (12.15.21) addressable fuzzyurl mixlib-config (~> 2.0) diff --git a/VERSION b/VERSION index f3a819ca5d..4aa9f7a551 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.15.20 \ No newline at end of file +12.15.21 \ No newline at end of file diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 14adbc322a..deec2b1966 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -21,7 +21,7 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.20" + VERSION = "12.15.21" end # diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 30de880b23..fa2afd7074 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -21,7 +21,7 @@ class Chef CHEF_ROOT = File.expand_path("../..", __FILE__) - VERSION = "12.15.20" + VERSION = "12.15.21" end # -- cgit v1.2.1