mitchellh / vagrant-rackspace

Use Vagrant to manage Rackspace Cloud instances.
MIT License
234 stars 155 forks source link

"images" and "flavors" commands fail if the default provider / primary machine is not the rackspace machine #142

Open CodeCommander opened 9 years ago

CodeCommander commented 9 years ago

I have a Vagrantfile where the primary machine is a parallels vm machine (my dev machine) and the secondary machine is a rackspace cloud instance (my staging machine).

Calling either of these

 vagrant rackspace images list 
 vagrant --provider=rackspace rackspace images list 

Fails with the following error:

/Users/jeff/.vagrant.d/gems/gems/fog-core-1.32.1/lib/fog/core/service.rb:244:in `validate_options': Missing required arguments: rackspace_username, rackspace_api_key (ArgumentError)

As far as I can tell, this is happening because my api key is set in a provider :rackspace call but my default machine's provider is not rackspace so it never gets set. Trying to specifically specify the rackspace provider on the command line didn't seem to work either.

CodeCommander commented 9 years ago

I was able to get this working by deleting my dev machine definition from the Vagrantfile, but that doesn't seem like a good longterm solution.