cherry picking https://github.com/opscode/chef/pull/2326 to 12-stable