test-kitchen / kitchen-vra

A Test Kitchen driver for VMware vRealize Automation
Apache License 2.0
13 stars 22 forks source link

Failed to complete #create action: [the vRA request did not create any servers.] #5

Closed Ronancunningham closed 8 years ago

Ronancunningham commented 8 years ago

Hi

Thanks for the driver.

I'm on OSX Yosemite and I believe vrealize 6.2 but not 100% sure on that. Chef Development Kit Version: 0.6.0 chef-client version: 12.3.0 kitchen version: 1.4.2

I'm creating an ec2 instance from a blueprint but get the error below: kitchen create -----> Starting Kitchen (v1.4.2) -----> Creating ... Building vRA catalog request... Catalog request 9539aa83-2ff7-41ae-a419-7950265a8409 submitted. Current request status: IN_PROGRESS Current request status: PENDING_POST_APPROVAL

------Exception------- Class: Kitchen::ActionFailed Message: Failed to complete #create action: [the vRA request did not create any servers.]


Please see .kitchen/logs/kitchen.log for more details Also try running kitchen diagnose --all for configuration

The request does get completed successfully however, I get my machine.

Update: I note in resource.rb of the vmware-vra-gem, only 'Infrastructure.Virtual' is an option and not 'Infrastructure.Cloud' so I guess aws/ec2 instances are not supported.

def vm? resource_data['resourceTypeRef']['id'] == 'Infrastructure.Virtual' end

adamleff commented 8 years ago

Hello, @Ronancunningham - thanks for using the gem and thanks for your issue report!

You are correct, and that's a good find - we did not test against vRA creating cloud instances, only vCenter VMs. vRA + EC2 was not a common use case for our users.

I just pushed up a new branch to the vmware-vra-gem, branch name adamleff/ec2-support. It extends the #vm? method to accept Infrastructure.Virtual and Infrastructure.Cloud. Want to test it out to see if it works for you?

To do so:

gem 'berkshelf'
gem 'test-kitchen'
gem 'kitchen-vra'
gem 'vmware-vra-gem', git: 'https://github.com/chef-partners/vmware-vra-gem.git', branch: 'adamleff/ec2-support'

That should use the branch of the vRA gem and create your instance.

Let me know how it goes.

~Adam

Ronancunningham commented 8 years ago

Hi Adam

Thanks for your quick response. That appears to work now. In your .kitchen.yml you must have the following setting as vra does not manage ec2 I.Ps in the request data

use_dns: true

Thanks

Ronan

From: Adam Leff notifications@github.com<mailto:notifications@github.com> Reply-To: chef-partners/kitchen-vra reply@reply.github.com<mailto:reply@reply.github.com> Date: Monday, 16 November 2015 15:43 To: chef-partners/kitchen-vra kitchen-vra@noreply.github.com<mailto:kitchen-vra@noreply.github.com> Cc: CME Group ronan.cunningham@cmegroup.com<mailto:ronan.cunningham@cmegroup.com> Subject: Re: [kitchen-vra] Failed to complete #create action: the vRA request did not create any servers.

Hello, @Ronancunninghamhttps://github.com/Ronancunningham - thanks for using the gem and thanks for your issue report!

You are correct, and that's a good find - we did not test against vRA creating cloud instances, only vCenter VMs. vRA + EC2 was not a common use case for our users.

I just pushed up a new branch to the vmware-vra-gem, branch name adamleff/ec2-support. It extends the #vm? method to accept Infrastructure.Virtual and Infrastructure.Cloud. Want to test it out to see if it works for you?

To do so:

gem 'berkshelf'gem 'test-kitchen'gem 'kitchen-vra'gem 'vmware-vra-gem', git: 'https://github.com/chef-partners/vmware-vra-gem.git', branch: 'adamleff/ec2-support'

That should use the branch of the vRA gem and create your instance.

Let me know how it goes.

~Adam

Reply to this email directly or view it on GitHubhttps://github.com/chef-partners/kitchen-vra/issues/5#issuecomment-157073544.

adamleff commented 8 years ago

@Ronancunningham Thanks for the confirmation. I've opened PR https://github.com/chef-partners/vmware-vra-gem/pull/15 against the VMware vRA gem. Once the PR is closed and merged, I'll release a new version of the gem with this fix. Thanks again for bringing it to our attention.

~Adam