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

Marios Andreou commented on DTACLOUD-206:
-----------------------------------------

Not too sure what to do about this. The problem is that Openstack actually 
calls both of these addresses 'private'. This is somewhat explained here 
https://answers.launchpad.net/nova/+question/185110 and leaves the hope that 
this functionality may be improved in future releases.

So for example, taking to the HP cloud: 

res = @connection.req("GET", "/servers/127883/ips")
(rdb:1) res.body
"{\"addresses\": {\"private\": [{\"version\": 4, \"addr\": \"10.6.187.6\"}, 
{\"version\": 4, \"addr\": \"15.185.165.248\"}]}}"

So both addresses are 'private'. I *think* you need to put your Instance into 
the 'public' network in order for the IP address to be labelled as 'public' - 
so e.g. as explained in 
http://api-docs.hpcloud.com/hpcloud-compute/1.0/content/ch03s02s02.html I tried:

(rdb:1) res = @connection.req("GET", "/servers/127883/ips/public")
OpenStack::Compute::Exception::ItemNotFound Exception: Instance is not a member 
of specified network

The 'hack' explained in the launchpad.net post above only works if you've 
associated a floating IP. So for example, after association of a floating IP:

(rdb:1) res = @connection.req("GET", "/os-floating-ips")
#<Net::HTTPOK 200 OK readbody=true>
(rdb:1) res.body
"{\"floating_ips\": [{\"instance_id\": 127883, \"ip\": \"15.185.167.56\", 
\"fixed_ip\": \"10.6.187.6\", \"id\": 1913}]}"

and you could use this info to determine which of the two server addresses was 
the public one.

One way we *could* go is to use some kind of pattern matching on 10.0.0.0/8 
192.168.0.0/16, 172.16.0.0/12 - it would work for now. But I'm not sure this is 
the right approach. Needs discussion.


 


                
> Distinguising public and private addresses for instances launched through 
> Deltacloud to Openstack provider 
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-206
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-206
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: Deltacloud git commit version: 
> c13da7b50bbbbdc529b42207f58dbe5099006ad1
> RHEL 6.2, Fedora 16
> Openstack V2.0
>            Reporter: Ronelle Landy
>            Assignee: Marios Andreou
>
> Looking at an instance launched through Deltacloud to the Openstack provider, 
> there does not seems to be a public IP address reported by Deltacloud. What 
> HP shows as a 'fixed public address', Deltacloud shows as a second 'private 
> address':
> ------- Copying from HP interface ----------
> Server Details 
>  Status:  Active 
>  Flavor:  standard.xsmall - 1 vCPU / 1 GB RAM / 30 GB HD  
>  Image:  1361 - Debian Squeeze 6.0.3 Server 64-bit 20120123 
> Key Pair: 
> Fixed Public IP:  15.185.113.54 
>  Floating Public IPs: 
> Private IP:  10.4.108.65  
> Started:  2012-04-30 09:43:02 -0700  
> Age:  2 minutes 
> --------- Copying from deltacloud --------------
>  <link 
> href='http://qe-blade-14.idm.lab.bos.redhat.com:3008/api/images;instance_id=115785'
>  method='post' rel='create_image' />
>   </actions>
>   <public_addresses></public_addresses>
>   <private_addresses><address type='ipv4'>10.4.108.65</address>
> <address type='ipv4'>15.185.113.54</address></private_addresses>
>   <authentication type='password'>
>     <login>
>       <username>root</username>
> ------------------------------------------------------
> Note from Marios:
> see https://connect.hpcloud.com/article/api-serversdetail and  
> https://connect.hpcloud.com/question/276/public-addresses-fog. 
> I revisited those threads now to see if it was fixed and came across 
> https://answers.launchpad.net/nova/+question/185110 ... so it seems it's 
> ultimately an openstack issue. JIRA please.. we need to figure out how we can 
> capture this reliably in deltacloud.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to