Add EC2 host in sandbox

Dear comunity,

I try to add i try to add an ec2 host on my OpenNebula 4.12.0 virutal sandbox. Always receive an error message:

>  Error monitoring Host ec2 (4): Error executing poll

/var/log/one/oned.log -->

Tue May 12 09:52:23 2015 [Z0][InM][D]: Monitoring datastore default (1)
Tue May 12 09:52:23 2015 [Z0][InM][D]: Monitoring datastore files (2)
Tue May 12 09:52:23 2015 [Z0][InM][D]: Monitoring host ec2 (4)
Tue May 12 09:52:23 2015 [Z0][ImM][D]: Datastore default (1) successfully monitored.
Tue May 12 09:52:23 2015 [Z0][ImM][D]: Datastore files (2) successfully monitored.
Tue May 12 09:52:23 2015 [Z0][InM][I]: Command execution fail: /var/lib/one/remotes/im/run_probes ec2 /var/lib/one//datastores 4124 20 4 ec2
Tue May 12 09:52:23 2015 [Z0][InM][I]: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': /usr/lib/ruby/gems/1.8/gems/aws-sdk-resources-2.0.29/lib/aws-sdk-resources.rb:29: syntax error, unexpected ':', expecting ')' (SyntaxError) Tue May 12 09:52:23 2015 [Z0][InM][I]: ...json(definition), source_path: definition) Tue May 12 09:52:23 2015 [Z0][InM][I]: ^ Tue May 12 09:52:23 2015 [Z0][InM][I]: /usr/lib/ruby/gems/1.8/gems/aws-sdk-resources-2.0.29/lib/aws-sdk-resources.rb:44: syntax error, unexpected kEND, expecting $end Tue May 12 09:52:23 2015 [Z0][InM][I]: from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
Tue May 12 09:52:23 2015 [Z0][InM][I]: from /usr/lib/ruby/gems/1.8/gems/aws-sdk-2.0.29/lib/aws-sdk.rb:1
Tue May 12 09:52:23 2015 [Z0][InM][I]: from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' Tue May 12 09:52:23 2015 [Z0][InM][I]: from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
Tue May 12 09:52:23 2015 [Z0][InM][I]: from ./…/…/vmm/ec2/ec2_driver.rb:34
Tue May 12 09:52:23 2015 [Z0][InM][I]: from ./poll:21:in `require’
Tue May 12 09:52:23 2015 [Z0][InM][I]: from ./poll:21
Tue May 12 09:52:23 2015 [Z0][InM][E]: Error executing poll
Tue May 12 09:52:23 2015 [Z0][InM][I]: ExitCode: 1
Tue May 12 09:52:23 2015 [Z0][ONE][E]: Error monitoring Host ec2 (4): Error executing poll

/etc/one/ec2_driver.conf -->

proxy_uri:
regions:
default:
region_name: eu-west-1
access_key_id:AKIAXXXXXXXXXXXXXXXXXXXWA
secret_access_key:EMNXXXXXXXXXXXXXXXXXXXXXXXXXXur00LL
capacity:
m1.small:5
m1.large:0
m1.xlarge:0
us-east-1:

Thanks for assistance

Hi,

Probably, the problem is the missing whitespace between the key and the value in the access and secret keys.

Cheers

Hi,

i try with whitespace and without whitespace.

The key’s works fine with hybridfox.

On a fresh virtualbox sandbox or AMI sandbox i follow de instruccion of the driver configuration.

OpenNebula Configuration

Uncomment the EC2 IM and VMM drivers from /etc/one/oned.conf file in order to use the driver.

IM_MAD = [
name = “ec2”,
executable = “one_im_sh”,
arguments = “-c -t 1 -r 0 ec2” ]

VM_MAD = [
name = “ec2”,
executable = “one_vmm_sh”,
arguments = “-t 15 -r 0 ec2”,
type = “xml” ]

/etc/one/ec2_driver.conf:

regions:
default:
region_name: us-east-1
access_key_id: YOUR_ACCESS_KEY
secret_access_key: YOUR_SECRET_ACCESS_KEY
capacity:
m1.small: 5
m1.large: 0
m1.xlarge: 0
After OpenNebula is restarted, create a new Host that uses the ec2 drivers:

$ onehost create ec2 --im ec2 --vm ec2 --net dummy

/var/log/one/oned.log–>

Monitoring host ec2 (8)
Thu May 14 13:06:58 2015 [Z0][InM][I]: Command execution fail: /var/lib/one/remotes/im/run_probes ec2 /var/lib/one//datastores 4124 20 8 ec2
Thu May 14 13:06:58 2015 [Z0][InM][I]: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': /usr/lib/ruby/gems/1.8/gems/aws-sdk-resources-2.0.29/lib/aws-sdk-resources.rb:29: syntax error, unexpected ':', expecting ')' (SyntaxError) Thu May 14 13:06:58 2015 [Z0][InM][I]: ...json(definition), source_path: definition) Thu May 14 13:06:58 2015 [Z0][InM][I]: ^ Thu May 14 13:06:58 2015 [Z0][InM][I]: /usr/lib/ruby/gems/1.8/gems/aws-sdk-resources-2.0.29/lib/aws-sdk-resources.rb:44: syntax error, unexpected kEND, expecting $end Thu May 14 13:06:58 2015 [Z0][InM][I]: from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
Thu May 14 13:06:58 2015 [Z0][InM][I]: from /usr/lib/ruby/gems/1.8/gems/aws-sdk-2.0.29/lib/aws-sdk.rb:1
Thu May 14 13:06:58 2015 [Z0][InM][I]: from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require' Thu May 14 13:06:58 2015 [Z0][InM][I]: from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:inrequire’
Thu May 14 13:06:58 2015 [Z0][InM][I]: from ./…/…/vmm/ec2/ec2_driver.rb:34
Thu May 14 13:06:58 2015 [Z0][InM][I]: from ./poll:21:in `require’
Thu May 14 13:06:58 2015 [Z0][InM][I]: from ./poll:21

Any Idea.

Thanks.

Hi,

Probably the problem is that you are using the last version (2) of the aws ruby sdk with ruby 1.8. Could you try removing this gem and installing a version < 2:
https://github.com/aws/aws-sdk-ruby/tree/aws-sdk-v1

Hope this helps

i have the same problem just i not using the sandbox

i have a ESX server and opennebula with this server

now im trying with the ec2 host and i have the same problem.

have you fixed it ?

What ruby version are you using in the frontend (oned)?

Hi, yes, now connect to aws:.

# gem install aws-sdk-v1

# gem uninstall aws-sdk

Select gem to uninstall:

  1. aws-sdk-1.33.0
  2. aws-sdk-1.50.0
  3. aws-sdk-1.57.0
  4. aws-sdk-2.0.29
  5. All versions
    4