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

Zack Shoylev commented on JCLOUDS-603:
--------------------------------------

Thanks so much, this has helped speed things along!

I tested using devstack:

neutron port-create private --fixed-ip ip_address=10.0.0.15

This created a port using the neutron client.
Then I ran your code against the devstack instance and specified the port id 
obtained above.

Then nova show [server uuid] has this:

+--------------------------------------+-----------------------------------------------------------------+
| Property                             | Value                                  
                         |
+--------------------------------------+-----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                 
                         |
| OS-EXT-AZ:availability_zone          | nova                                   
                         |
| OS-EXT-STS:power_state               | 1                                      
                         |
| OS-EXT-STS:task_state                | -                                      
                         |
| OS-EXT-STS:vm_state                  | active                                 
                         |
| OS-SRV-USG:launched_at               | 2014-06-20T00:45:48.000000             
                         |
| OS-SRV-USG:terminated_at             | -                                      
                         |
| accessIPv4                           |                                        
                         |
| accessIPv6                           |                                        
                         |
| config_drive                         |                                        
                         |
| created                              | 2014-06-20T00:45:41Z                   
                         |
| flavor                               | m1.tiny (1)                            
                         |
| hostId                               | 
f82e0dac5a8487148908a4fc1f887f146989c0eec491800fc6d00e4e        |
| id                                   | e4c0c277-b92f-4106-b985-3fbad491dcd5   
                         |
| image                                | cirros-0.3.2-x86_64-disk 
(797d5484-7d76-4204-b17c-4137bbe32469) |
| key_name                             | -                                      
                         |
| metadata                             | {}                                     
                         |
| name                                 | test-jclouds                           
                         |
| os-extended-volumes:volumes_attached | []                                     
                         |
| private network                      | 10.0.0.15                              
                         |
| progress                             | 0                                      
                         |
| security_groups                      | default                                
                         |
| status                               | ACTIVE                                 
                         |
| tenant_id                            | 86a56d9e19ec4133bb52e39569893453       
                         |
| updated                              | 2014-06-20T00:45:48Z                   
                         |
| user_id                              | baceec804fa642cd82303a303a6b350b       
                         |
+--------------------------------------+-----------------------------------------------------------------+

I am getting pretty much the same results with nova boot. I see no significant 
differences in behavior or exchanged JSON messages in either case.
In both cases the private network value is 10.0.0.15 which seems to be working 
as expected?

> CreateServerOptions.novaNetworks() does not work when using with 
> Network.portUuid()
> -----------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-603
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-603
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 1.7.1
>         Environment: jClouds 1.7.1, openstack havana h.1
>            Reporter: Jeffrey Nguyen
>         Attachments: nova-boot-port-issue.txt
>
>
> I'm having issue with the CreateServerOptions.novaNetworks(). Specifically, 
> I'm having issue with this API when the Network is populated using 
> Network.portUuid().  When using both Network.networkUuid() and 
> Network.fixedIp(), the network/IP assignment worked fine.    However, when I 
> used Network.portUuid() to assign neutron port, the network is not assigned 
> to the spawned instance.   I tried both with the portUuid alone and together 
> with networkUuid and fixed IP but observed the same problem.
> I'm using jClouds 1.7.1 with openstack Havana H.1
> I've embedded the gist of the code below.  In case that doesn't come out 
> right, the URL to the gist snippet is at 
> https://gist.github.com/jeffrngu/25b62377d1bdf6380b19
> <script 
> src="https://gist.github.com/jeffrngu/25b62377d1bdf6380b19.js";></script>
> Below is the wire log that shows request/response.   Any pointers would be 
> greatly appreciated.
> Thanks,
> -Jeffrey
> 16:46:09.282 [main] DEBUG jclouds.wire - >> 
> "{"server":{"name":"test","imageRef":"928a086a-77bb-4885-865c-2395f121530b","flavorRef":"c5407aca-a22d-44d8-81bb-4e82991e937e","networks":[{"port":"00244f0c-e5fe-417c-88ac-8883ee80dc11"}]}}"
> 16:46:09.282 [main] DEBUG jclouds.headers - >> POST http://<openstack 
> IP>:<port>/v2/5e9543b620354483b40647f93a76d3b8/servers HTTP/1.1
> 16:46:09.282 [main] DEBUG jclouds.headers - >> Accept: application/json
> 16:46:09.282 [main] DEBUG jclouds.headers - >> X-Auth-Token: 
> MIIRTgYJKoZIhvcNAQcCoIIRPzCCETsCAQExCTAHBgUrDgMCGjCCD6QGCSqGSIb3DQEHAaCCD5UEgg+ReyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxNC0wNi0
> ...kplG3xrrk7J7iPhl3IBaupxxM11dkkjjMr9QUVFipFSxJJQi8RZUp2QB4On6Aw+yV13OnGYR5k9f4vgxxwvTmvw
> 16:46:09.282 [main] DEBUG jclouds.headers - >> Content-Type: application/json
> 16:46:09.283 [main] DEBUG jclouds.headers - >> Content-Length: 194
> 16:46:18.745 [main] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService - 
> Receiving response -1933851451: HTTP/1.1 202 Accepted
> 16:46:18.745 [main] DEBUG jclouds.headers - << HTTP/1.1 202 Accepted
> 16:46:18.745 [main] DEBUG jclouds.headers - << Date: Tue, 17 Jun 2014 
> 15:38:18 GMT
> 16:46:18.746 [main] DEBUG jclouds.headers - << Location: http://<openstack 
> IP>:<port>/v2/5e9543b620354483b40647f93a76d3b8/servers/70c57a48-c0b2-4fe5-8651-f40d409814ef
> 16:46:18.746 [main] DEBUG jclouds.headers - << Connection: keep-alive
> 16:46:18.746 [main] DEBUG jclouds.headers - << X-Compute-Request-Id: 
> req-bfa0eb9e-df0b-455c-b3df-24bf02696949
> 16:46:18.746 [main] DEBUG jclouds.headers - << Content-Type: application/json
> 16:46:18.746 [main] DEBUG jclouds.headers - << Content-Length: 440
> 16:46:18.747 [main] DEBUG jclouds.wire - << "{"server": {"security_groups": 
> [{"name": "default"}], "OS-DCF:diskConfig": "MANUAL", "id": 
> "70c57a48-c0b2-4fe5-8651-f40d409814ef", "links": [{"href": "http
> ://<openstack 
> IP>:<port>/v2/5e9543b620354483b40647f93a76d3b8/servers/70c57a48-c0b2-4fe5-8651-f40d409814ef",
>  "rel": "self"}, {"href": "http://<openstack 
> IP>:<port>/5e9543b620354483b40647f93a76d3b8/servers/70c5
> 7a48-c0b2-4fe5-8651-f40d409814ef", "rel": "bookmark"}], "adminPass": 
> "******"}}"



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to