- From: Joshua Timberman <
>
- To: "
" <
>
- Subject: [chef] Re: err in apt cookbook
- Date: Fri, 14 Jun 2013 03:37:55 +0000
- Accept-language: en-US
So here's the thing about that. It's "okay" for some things, but not always,
and there are potential side effects where the thing you expect doesn't
actually work.
`use_inline_resources` was introduced in Chef 11 to fix with the way that
resources contained within a LWRP used notifications. It really makes it
easier to reason about chaining resource notifications within an LWRP, and
one strong reason to upgrade to Chef 11, especially if you use a lot of LWRPs.
In the case of the apt cookbook, it was in part a fix for why-run mode, along
with proper notifications within resources in the action block. The version
requirements for Chef to use the apt cookbook are clearly defined in the
README.
Adding this kind of backwards compatibility to cookbooks means that we either
need to do it to every cookbook, accumulating cruft, and possibly confusing
behavior (or code paths) for users in the future, or we move forward. Since
cookbooks on the community site where they're released don't have an option
to have multiple "default" versions (e.g., the version for Chef 10 or Chef
11), it means we have to make a decision moving forward.
Cheers,
Joshua
On Jun 12, 2013, at 7:26 AM, Guilhem Lettron
<
>
wrote:
>
You can do a pull request like this one:
>
https://github.com/opscode-cookbooks/ark/pull/25
>
>
It can help anyone on < chef 11 :)
>
>
Guilhem Lettron
>
>
>
On Wed, Jun 12, 2013 at 2:57 PM,
>
<
>
>
wrote:
>
Thanks.. that helped.. using version 1.10.0 for apt resolved the issue
>
>
>
>
Thanks all
>
>
>
>
Haynes.
>
>
>
>
From: Sam
>
[mailto:
>
>
Sent: Wednesday, June 12, 2013 4:00 PM
>
To:
>
>
Subject: [chef] Re: Re: err in apt cookbook
>
>
>
>
This happened to me too, I'm now pinning it my environments:
>
>
>
>
cookbook 'apt', '= 1.9.0'
>
>
>
>
>
>
On 12 June 2013 11:28, Alex Kiernan
>
<
>
>
wrote:
>
>
At a guess you're using Chef 10 but the apt cookbook which has been updated
>
to use use_inline_resources which is new in Chef 11:
>
>
>
>
http://docs.opscode.com/breaking_changes_chef_11.html#with-inline-compilation
>
>
>
>
>
On Wed, Jun 12, 2013 at 11:19 AM,
>
<
>
>
wrote:
>
>
Hi,
>
>
>
>
>
>
I am trying Zenoss cookbook. But while I run chef-client I see below error.
>
Any help appreciated.
>
>
>
>
>
>
>
>
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] INFO: Storing updated
>
cookbooks/openssh/README.md in the cache.
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] INFO: Storing updated
>
cookbooks/openssh/CHANGELOG.md in the cache.
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] INFO: Storing updated
>
cookbooks/openssh/LICENSE in the cache.
>
>
>
>
================================================================================
>
>
Recipe Compile Error in
>
/var/cache/chef/cookbooks/apt/providers/repository.rb
>
>
================================================================================
>
>
>
>
NameError
>
>
---------
>
>
undefined local variable or method `use_inline_resources' for
>
#<Class:0x7f4f6c94e6d0>
>
>
>
>
Cookbook Trace:
>
>
---------------
>
>
/var/cache/chef/cookbooks/apt/providers/repository.rb:20:in
>
`class_from_file'
>
>
>
>
Relevant File Content:
>
>
----------------------
>
>
/var/cache/chef/cookbooks/apt/providers/repository.rb:
>
>
>
>
13: # Unless required by applicable law or agreed to in writing, software
>
>
14: # distributed under the License is distributed on an "AS IS" BASIS,
>
>
15: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>
implied.
>
>
16: # See the License for the specific language governing permissions and
>
>
17: # limitations under the License.
>
>
18: #
>
>
19:
>
>
20>> use_inline_resources
>
>
21:
>
>
22: def whyrun_supported?
>
>
23: true
>
>
24: end
>
>
25:
>
>
26: # install apt key from keyserver
>
>
27: def install_key_from_keyserver(key, keyserver)
>
>
28: execute "install-key #{key}" do
>
>
29: if !node['apt']['key_proxy'].empty?
>
>
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] ERROR: Running exception handlers
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] FATAL: Saving node information to
>
/var/cache/chef/failed-run-data.json
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] ERROR: Exception handlers complete
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] FATAL: Stacktrace dumped to
>
/var/cache/chef/chef-stacktrace.out
>
>
[Wed, 12 Jun 2013 10:16:08 +0000] FATAL: NameError: undefined local
>
variable or method `use_inline_resources' for #<Class:0x7f4f6c94e6d0>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
regards,
>
>
Haynes Davis
>
>
>
>
>
>
This message is for the designated recipient only and may contain
>
privileged, proprietary, or otherwise confidential information. If you have
>
received it in error, please notify the sender immediately and delete the
>
original. Any other use of the e-mail by you is prohibited.
>
>
Where allowed by local law, electronic communications with Accenture and
>
its affiliates, including e-mail and instant messaging (including content),
>
may be scanned by our systems for the purposes of information security and
>
assessment of internal compliance with Accenture policy.
>
>
______________________________________________________________________________________
>
>
www.accenture.com
>
>
>
>
>
>
>
--
>
Alex Kiernan
>
>
>
>
>
>
>
--
>
http://about.me/pikesley
>
>
Archive powered by MHonArc 2.6.16.