3

[Originally posted this to opscode forum, got no response]

I’m testing out a free hosted chef-server account and multiple subcommands are failing with ‘Unexpected Errors’. Perhaps my version and the server version are incompatible?

OS: Ubuntu 12.04LTS

Local Chef: 10.12.0 (Installed through gem)

Local Ruby: 1.8.7

Also, the workstation machine has been manually configured, but the client(s) I’ve been experimenting with are launched with the Rackspace plugin (using ‘knife rackspace server create…’) The problem commands seem to fail when talking to the host chef-server, however, before it ever tries to modify the client, so I don’t believe that’s where the problem exists. The virtual-servers that are launched by ‘knife rackspace server create’ are launched properly but then deleting them with knife fails.

If I include a recipe in the run_list when I create the server, the recipe is properly added to the run_list. If I try to add it later or remove the one that there server was initialized with, those commands fail.

Here is the output of a few relevant commands (with stacktraces):

https://gist.github.com/7100ada3fd6690113697

1 Answer 1

1

Looking at your gist (very helpful, btw!) it looks like the syntax for the run_list modifications may be slightly off.

In one example, you provide:

knife node run_list remove rs-chefdemo-03 init_noop -VV

The error is not very helpful, agreed.

I believe the correct syntax that you should be using is:

knife node run_list remove rs-chefdemo-03 'recipe[init_noop]' -VV

This should act the way you expect.

As for the knife rackspace command, I suspect you are using the wrong key, as is stated in the readme:

Deletes an existing server in the currently configured Rackspace Cloud account by the server/instance id. You can find the instance id by entering ‘knife rackspace server list’.

So the correct syntax for this would be:

knife rackspace server delete 20950789 -VV

Best of luck!

4
  • I'll give this is shot when I get the chance. I did try several different versions of the syntax for the add/remove recipe argument, since the docs said the 'recipe[]' wrapper was optional. None of them seemed to work but I'll try again. As for the rackspace delete - thanks that is probably the problem I was way off. Jul 25, 2012 at 15:49
  • Any luck? I'd be curious to know if they still don't work for you, and on which versions of chef, as well as the verbose output of the failure. Jul 31, 2012 at 16:43
  • The Rackspace specific commands worked. I'm still unable to get the run_list add/remove commands to work. I even dug into the Chef source code (v 10.12.0) and found that both commands call a method named "run_list" on an object named "node" of type "Hash". Hash is a built in Hashmap type and the object in question just contains node names (keys) and chef server urls for the nodes (values). So I don't see how this code could work regardless of the input values. Sep 9, 2012 at 1:10
  • I think I forgot to quote the recipe, edited answer above. This should now match: github.com/opscode/chef/blob/10-stable/chef/lib/chef/run_list/… Can you provide debugging output? Sep 9, 2012 at 12:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .