summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishekKr <abhikumar163@gmail.com>2016-10-08 13:29:06 +0530
committerAbhishekKr <abhikumar163@gmail.com>2016-10-08 13:29:06 +0530
commit8901f5c3caa69f74b325094a157f1080bbd78bac (patch)
tree73509822a1671c490cb573dc2a94b16d7d3e8239
parent23be92cd9eecd5117db967cdfc814165d52344f5 (diff)
parent6f2315803b046d07eaef641cb2c427327c32e265 (diff)
downloadchef-8901f5c3caa69f74b325094a157f1080bbd78bac.tar.gz
Merge branches 'master' and 'master' of https://github.com/chef/chef
-rw-r--r--.travis.yml52
-rw-r--r--CHANGELOG.md27
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock12
-rw-r--r--RELEASE_NOTES.md14
-rw-r--r--Rakefile2
-rw-r--r--VERSION2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--kitchen-tests/.kitchen.travis.yml7
-rw-r--r--kitchen-tests/.kitchen.yml8
-rw-r--r--kitchen-tests/Berksfile7
-rw-r--r--kitchen-tests/Berksfile.lock73
-rw-r--r--kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/metadata.rb9
-rw-r--r--kitchen-tests/cookbooks/awesome_customers_rhel_wrapper/recipes/default.rb6
-rw-r--r--kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/metadata.rb9
-rw-r--r--kitchen-tests/cookbooks/awesome_customers_ubuntu_wrapper/recipes/default.rb6
-rw-r--r--lib/chef/application/exit_code.rb9
-rw-r--r--lib/chef/exceptions.rb1
-rw-r--r--lib/chef/knife/ssh.rb1
-rw-r--r--lib/chef/provider/user.rb10
-rw-r--r--lib/chef/provider/user/dscl.rb4
-rw-r--r--lib/chef/provider/user/linux.rb18
-rw-r--r--lib/chef/provider/user/pw.rb4
-rw-r--r--lib/chef/provider/user/useradd.rb6
-rw-r--r--lib/chef/version.rb2
-rw-r--r--spec/unit/application/exit_code_spec.rb10
26 files changed, 230 insertions, 72 deletions
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/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)
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"
diff --git a/Gemfile.lock b/Gemfile.lock
index 0e9b5d3459..defe1e2b6e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -33,10 +33,10 @@ GIT
PATH
remote: .
specs:
- chef (12.15.14)
+ chef (12.15.21)
addressable
bundler (>= 1.10)
- chef-config (= 12.15.14)
+ 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.14-universal-mingw32)
+ chef (12.15.21-universal-mingw32)
addressable
bundler (>= 1.10)
- chef-config (= 12.15.14)
+ 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.14)
+ chef-config (12.15.21)
addressable
fuzzyurl
mixlib-config (~> 2.0)
@@ -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
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:
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}
diff --git a/VERSION b/VERSION
index c6305cccfe..4aa9f7a551 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.15.14 \ 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 00f73a44f6..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.14"
+ VERSION = "12.15.21"
end
#
diff --git a/kitchen-tests/.kitchen.travis.yml b/kitchen-tests/.kitchen.travis.yml
index d73b41368d..312764e9e4 100644
--- a/kitchen-tests/.kitchen.travis.yml
+++ b/kitchen-tests/.kitchen.travis.yml
@@ -118,4 +118,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 518aa56fac..f08e94dc94 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/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/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"
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/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
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
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index bb3cdfe80c..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.14"
+ VERSION = "12.15.21"
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)