[chef] Re: Problems with chef 12.0.3-1 and lvm cookbook


Chronological Thread 
  • From: Noah Kantrowitz < >
  • To:
  • Subject: [chef] Re: Problems with chef 12.0.3-1 and lvm cookbook
  • Date: Wed, 21 Jan 2015 12:52:37 -0800

The cookbook needs to be updated for Chef 12. Add "include Chef::DSL::Recipe" 
to the top of the providers.

--Noah

On Jan 21, 2015, at 12:42 PM, John Warren 
< >
 wrote:

> I was testing one of our cookbooks using kitchen/vagrant and received the 
> following error message:
>  
>       ←[0m
>       
> ================================================================================
>       Error executing action `create` on resource 
> 'lvm_logical_volume[lv_jenkins]'
>       
> ================================================================================
>  
> ←[0m      NoMethodError
>       -------------
>       undefined method `directory' for 
> #<Chef::Provider::LvmLogicalVolume:0x0000000430dd48>
>  
>       Cookbook Trace:
>              ---------------
>  
>        
> /tmp/kitchen/cookbooks/lvm/libraries/provider_lvm_logical_volume.rb:107:in 
> `action_create'
>              
> /tmp/kitchen/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:98:in 
> `block in create_logical_volumes'
>              
> /tmp/kitchen/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:96:in 
> `each'
>              
> /tmp/kitchen/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:96:in 
> `create_logical_volumes'
>              
> /tmp/kitchen/cookbooks/lvm/libraries/provider_lvm_volume_group.rb:58:in 
> `action_create'
>  
>              Resource Declaration:
>              ---------------------
>              # In 
> /tmp/kitchen/cookbooks/lvm/libraries/resource_lvm_volume_group.rb
>  
>              109:         volume = lvm_logical_volume(name, &block)
>              110:         volume.action :nothing
>  
>  
>  
>        Compiled Resource:
>              ------------------
>  
>              # Declared in 
> /tmp/kitchen/cookbooks/lvm/libraries/resource_lvm_volume_group.rb:109:in 
> `logical_volume'
>  
>              lvm_logical_volume("lv_jenkins") do
>                provider Chef::Provider::LvmLogicalVolume
>                action [:nothing]
>                retries 0
>  
> This is using version 1.2.2 of the opscode lvm cookbook.  Everything works 
> fine when I force kitchen to use chef 11.8.0.  I was assuming that chef 
> 12.x would be backwards compatible.  Is this not the case?
>  
> Thanks,
>  
> John Warren

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail




Archive powered by MHonArc 2.6.16.

§