deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cristovao Cordeiro (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-579) Using the EC2 frontend with the Openstack driver
Date Fri, 20 Sep 2013 09:34:53 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772904#comment-13772904
] 

Cristovao Cordeiro commented on DTACLOUD-579:
---------------------------------------------

Hi Marios,

thanks for the reply. 

So, that patch fixes one issue, but others remain. Without that fix we aren't even able to
launch new instances. It was just a little but important bug.
Other issues are raised now, like the one I explain in the end of the ticket description (about
the flavor). I can take another look at that, compare the openstack drivers with others and
so on...

To clarify, in my fix, what was going on was that: for the automatic instance name definition,
a name format is adopted (something like 'ServerNUMBER'). This format relies on a unique number
which is extracted from the Time module, so that we don't ever get two instances with the
same name. The problem was that this number was being extracted from the ruby call Time.now.to_s,
which returns a non-desirable format. What we want is Time.now.to_i, so that we get a single
and unique number instead of the date.

You can replicate this issue if you get access to an Openstack cloud (the one I used is private
so you wouldn't have access) and launch the Deltacloud server like:

  deltacloudd -i openstack -f ec2  # and other arguments if you need them

and then you can just

  curl --user "user+tenant:pass" "serverhost:port/ec2/?Action=RunInstances&ImageId=your_image_id"
-v 

and after you use my fix, you can check the 2nd issue by

  curl --user "user+tenant:pass" "serverhost:port/ec2/?Action=RunInstances&ImageId=your_image_id&InstanceType=your_flavor"
-v 


Hope this is clear enough ;)
Thanks
Cris
                
> Using the EC2 frontend with the Openstack driver
> ------------------------------------------------
>
>                 Key: DTACLOUD-579
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-579
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Cristovao Cordeiro
>            Assignee: Marios Andreou
>
> Hello,
> I've noticed that when trying to make launch requests (and only launch requests) through
the DC's EC2 frontend with the Openstack driver, it fails.
> Basically I have a DC server with the EC2 frontend connected to an Openstack provider.
I'm issuing the following:
>     curl --user "user+tenant:pass" "localhost:3004/ec2/?Action=RunInstances&ImageId=b8018jdb-fgfc-412c-9337-6129xj4n152a"
-v
> I get the following:
> Deltacloud::Exceptions::ValidationFailure - Instance name is not a valid hostname:
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/openstack-1.1.0/lib/openstack/connection.rb:474:in
`raise_exception'
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/openstack-1.1.0/lib/openstack/compute/connection.rb:120:in
`create_server'
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/deltacloud-core-1.1.3/lib/deltacloud/drivers/openstack/openstack_driver.rb:205:in
`block in create_instance'
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/deltacloud-core-1.1.3/lib/deltacloud/drivers/exceptions.rb:220:in
`call'
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/deltacloud-core-1.1.3/lib/deltacloud/drivers/exceptions.rb:220:in
`safely'
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/deltacloud-core-1.1.3/lib/deltacloud/drivers/openstack/openstack_driver.rb:204:in
`create_instance'
> ...
> ...
> ...
> This line: "params[:name] = (opts[:name] && opts[:name].length>0)? opts[:name]
: "server#{Time.now.to_s}" " in the openstack_driver.rb file is the issue. 
> And, even after fast fixing it a new error is raised if I point a flavor in the EC2 request
(like m1.small). This error is:
> Deltacloud::Exceptions::ValidationFailure - Invalid flavorRef provided.:
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/openstack-1.1.0/lib/openstack/connection.rb:474:in
`raise_exception'
> 	/usr/local/rvm/gems/ruby-2.0.0-p0/gems/openstack-1.1.0/lib/openstack/compute/connection.rb:120:in
`create_server'
> which refers to the second line below the one about the server name.
> Can someone look into this?
> Thanks
> Cris

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message