Nova prvisioning fails when i attach 2 ports

Bug #1168247 reported by Ritesh Shetty
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Unassigned

Bug Description

I am facing an issue. If i send in 2 ports(created from 2 subnets) during provisioning then it fails but works with 1 port.
Is this a bug or my paylaod is incorect. Since Rory faced issue with cli i am assuming my rest payload is ok
This is the rest paylaod.
{ "server" : { "name" : "loadbalancer-1-T55" , "imageRef" : "6b97a852-8eb1-498c-b9f0-d5374726a43c" , "flavorRef" : "1" , "key_name" : "demokey" ,
"networks" : [
{ "port" : "5dae5598-a5e6-4330-ba1c-5120d31c5f85"} ,
{ "port" : "013d75e0-9cfe-4b32-9b6f-41c0a5063795"}]
}}

Revision history for this message
Ritesh Shetty (ritesh-s-shetty) wrote :

This is repeatable with cli also

ritesh@vcloudgrizzly:/opt/stack/logs/screen$ nova --debug boot --image d892d16d-fbbf-4e0e-9ee8-4c8a496833e7 --num-instances 2 --key-name riteshkeypair --flavor 1 riteshtest --nic port-id=599b64a9-9ad7-4720-ad22-3b16033f1a50 --nic port-id=f15122b9-40eb-44f0-b5e0-8eb0502072e6

INFO (connectionpool:191) Starting new HTTP connection (1): 192.168.124.28
DEBUG (connectionpool:283) "POST http://192.168.124.28:8774/v2/02db3d5031e74cd9a78a11ee16844693/servers HTTP/1.1" 500 128
RESP: [500] {'date': 'Fri, 12 Apr 2013 23:51:28 GMT', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-26ca1126-aae8-4bf3-8e6c-24d3c9e24177'}
RESP BODY: {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}

DEBUG (shell:768) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-26ca1126-aae8-4bf3-8e6c-24d3c9e24177)
Traceback (most recent call last):
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 765, in main
    OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
  File "/opt/stack/python-novaclient/novaclient/shell.py", line 701, in main
    args.func(self.cs, args)
  File "/opt/stack/python-novaclient/novaclient/v1_1/shell.py", line 282, in do_boot
    server = cs.servers.create(*boot_args, **boot_kwargs)
  File "/opt/stack/python-novaclient/novaclient/v1_1/servers.py", line 600, in create
    **boot_kwargs)
  File "/opt/stack/python-novaclient/novaclient/v1_1/base.py", line 163, in _boot
    return_raw=return_raw, **kwargs)
  File "/opt/stack/python-novaclient/novaclient/base.py", line 145, in _create
    _resp, body = self.api.client.post(url, body=body)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 233, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 217, in _cs_request
    **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 199, in _time_request
    resp, body = self.request(url, method, **kwargs)
  File "/opt/stack/python-novaclient/novaclient/client.py", line 193, in request
    raise exceptions.from_response(resp, body, url, method)
ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-26ca1126-aae8-4bf3-8e6c-24d3c9e24177)
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-26ca1126-aae8-4bf3-8e6c-24d3c9e24177)

Revision history for this message
Ritesh Shetty (ritesh-s-shetty) wrote :

I Noticed on Horizon iam able to attach mutiple nics. But actually what it is doing is sending mutiple network id's which works

This works since i am sending mutiple network id's

ritesh@vcloudgrizzly:/opt/stack/logs/screen$ nova --debug boot --image d892d16d-fbbf-4e0e-9ee8-4c8a496833e7 --num-instances 2 --key-name riteshkeypair --flavor 1 riteshtest --nic net-id=599b64a9-9ad7-4720-ad22-3b16033f1a50 --nic net-id=f15122b9-40eb-44f0-b5e0-8eb0502072e6

Revision history for this message
Ritesh Shetty (ritesh-s-shetty) wrote :

Did some more testing looks like it accepts mutiple ports if they were created from 2 subnets belonging to 2 different networks.
But if i specify ports that were created from 2 subnets from in the same network then it doesnt work.

Revision history for this message
Aaron Rosen (arosen) wrote :

I believe this might be the intended behavor. Why do you want two ports attached to a vm in the same subnet? A tenant could loop the network by bridging these interfaces which is probably why this isn't allowed.

Revision history for this message
Ritesh Shetty (ritesh-s-shetty) wrote :

no thats not what i want. if you see my posts i am saying these 2 ports are on 2 different subnets but these 2 subnets belong to same network. I think it should work

Revision history for this message
Dan Smith (danms) wrote :

I don't think that assigning two subnets is any safer than two ports on the same network if the instance still has the ability to provide a L2 loop.

That said, I don't think that the 500 error is the right response from nova in this case. Can you track down the server-side logs for this (probably nova-compute.log)?

Changed in nova:
importance: Undecided → Medium
status: New → Triaged
status: Triaged → Incomplete
Revision history for this message
Ritesh Shetty (ritesh-s-shetty) wrote :

Segmentation is achieved using subnets whether the ports come from same network or different shouldnt matter in my opinion. Quantum brings in this very powerfull feature to do segmentation using subnet but if nova cant support it and wants us to create new networks then it is not good.

Revision history for this message
Ritesh Shetty (ritesh-s-shetty) wrote :

also i think i have a works around(need to test it though)
i am planning to create port with 2 subnets which come out of same network. Then attach this port while provisioning.

If this works is this different from attaching 2 ports while provisioning ?

Revision history for this message
Sean Dague (sdague) wrote :

2 year old bug that didn't include follow up, closing

Changed in nova:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.