> -----Original Message-----
> From: Ralf Haferkamp [mailto:rha...@suse.de]
> Sent: Thursday, March 07, 2013 3:13 AM
> To: crowbar
> Cc: Abes, Andi; Nanuk Krinner
> Subject: Re: [Crowbar] setting GEM_PATH chef related bits
> 
> Hi,
> 
> On Wednesday 06 March 2013 12:36:56 andi_a...@dell.com wrote:
> > Been hitting a funky error (see below), from deep in the bowls of
> > knife. The interesting part is how this was resolved - using the chef
> > server embedded gemsite, rather than the system one ( i.e. adding
> > GEM_PATH=/opt/chef/embedded/lib/ruby/gems to the env).
> Looking at the IRC backlog from last night it seems that this only works when
> using the omnibus chef installer, right? We are not doing that.
> (Currently we are still even using chef-server 10, but that is supposed to 
> change
> really soon now). And our packages don't embed all of chef's requirement into
> the package, to answer your other question from IRC.
> 
> I am trying to understand the problem but I must admit I am a bit lost with 
> this.
> Would you mind giving a little more detail on want exactly the problem is and
> how we can reproduce it?

I manually did the following sequence:
* run the crowbar installer, which deploys chef and friends (to my 
understanding sever 11, knife and chef-client 10.26)
* run bundle install in the crowbar app
* attempt to run knife.

That last part generated crazy exceptions about missing methods on 
Chef::ChepAPI (missing []).
Adding the GEM_PATH pointing to the embedded gemsite that the omnibus installer 
lays down cleared the exception.

I haven't tracked down the exact cause of the exception (or why setting the 
GEM_PATH solves it), but my guesstimate is that there's some sort of gem 
collision between the gems that bundler lays down for the app and those that 
chef utilities use - that jives with the problem going away when the gem_path 
is set.

Agree that this is not necessarily the best solution, and that understanding 
the exact source of conflict might be good. Could it be that we're pulling in 
(with the Gemfile) the wrong version of chef gems?


> 
> > Might be worth keeping that in mind as we invoke chef'ist things.
> >
> >
> > The Error:
> > /var/lib/gems/1.9.1/gems/chef-10.24.0/lib/chef/knife/client_create.rb:
> > 6
> > 2:in `run': undefined method `[]' for
> > #<Chef::ApiClient:0x00000002418960> (NoMethodError)
> 
> regards,
>       Ralf

_______________________________________________
Crowbar mailing list
Crowbar@dell.com
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/

Reply via email to