Chef isn't properly detecting a rackspace cloud server

I have created a number of servers in recent weeks using ‘knife backspace
server create blah blah’. These have all worked fine, except the last couple i
have created have had sporadic issues where chef doesn’t detect that they are
Rackspace cloud serves, and so things like node[:cloud][:private_ips].first or
node[:rackspace][:private_ip] do not work at all. So, two questions:

  1. Why does it not properly detect that it’s a Rackspace Cloud server, and
  2. Is there a way to tell Chef that it’s a Rackspace Cloud server so that the
    code above works?

Thanks

Yo,

This is an ohai bug [0], has been broken for a while now. I know there
was some mention of the ability to force override enabling the
detection of a particular cloud, but I haven't ready any recent news
regarding it's resolution..

Bryan?

--AJ

[0] http://tickets.opscode.com/browse/OHAI-310

On 29 May 2012 15:35, larrywright@gmail.com wrote:

I have created a number of servers in recent weeks using 'knife backspace
server create blah blah'. These have all worked fine, except the last couple i
have created have had sporadic issues where chef doesn't detect that they are
Rackspace cloud serves, and so things like node[:cloud][:private_ips].first or
node[:rackspace][:private_ip] do not work at all. So, two questions:

  1. Why does it not properly detect that it's a Rackspace Cloud server, and
  2. Is there a way to tell Chef that it's a Rackspace Cloud server so that the
    code above works?

Thanks

On Mon, May 28, 2012 at 11:35 PM, larrywright@gmail.com wrote:

  1. Why does it not properly detect that it's a Rackspace Cloud server, and

Rackspace (and most/all of the cloud providers) create such a
commoditized environment there is no way to tell which cloud you are
in without making one or more network calls, which are likely to fail
and cause significant delays in the Ohai run.

  1. Is there a way to tell Chef that it's a Rackspace Cloud server so that the
    code above works?

Use Ohai 0.6.14.rc.1 (gem install ohai --pre) which should release
this week. Then create an empty file called
"/etc/chef/ohai/hints/rackspace.json" This is part of the new hints
system that we created for working around problems identifying clouds.

In the future, the knife-rackspace plugin will always create this for you.

You can also use the Rackspace API to create this file for you.

Bryan