← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1213293] Re: security-group-rule-create returns 500 on bad input

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1213293

Title:
  security-group-rule-create returns 500 on bad input

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  When trying to create a security group rule like so:

  neutron security-group-rule-create test --protocol 43 --port-range-min
  43

  You get:

  Request Failed: internal server error while processing your request.

  Server stack-trace reports:

  2013-08-16 18:11:56.896 18344 ERROR NVPApiHelper [-] Received error code: 400
  2013-08-16 18:11:56.896 18344 ERROR NVPApiHelper [-] Server Error Message: Port values valid for TCP/UDP/ICMP/ICMPv6 only
  2013-08-16 18:11:56.898 18344 ERROR neutron.api.v2.resource [-] create failed
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/resource.py", line 84, in resource
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 405, in create
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     obj = obj_creator(request.context, **kwargs)
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/nicira/NeutronPlugin.py", line 2099, in create_security_group_rule
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     return self.create_security_group_rule_bulk(context, bulk_rule)[0]
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/nicira/NeutronPlugin.py", line 2130, in create_security_group_rule_bulk
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     combined_rules)
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/nicira/nvplib.py", line 1023, in update_security_group_rules
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     rsp = do_request(HTTP_PUT, path, body, cluster=cluster)
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/nicira/nvplib.py", line 949, in do_request
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     res = cluster.api_client.request(*args)
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/nicira/NvpApiClient.py", line 150, in request
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     self.error_codes[status](self)
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource   File "/opt/stack/neutron/neutron/plugins/nicira/NvpApiClient.py", line 190, in zero
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource     raise NvpApiException()
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource NvpApiException: An unknown exception occurred.
  2013-08-16 18:11:56.898 18344 TRACE neutron.api.v2.resource

  And in a nutshell:

  Port values valid for TCP/UDP/ICMP/ICMPv6 only

  We should raise BadRequest instead.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1213293/+subscriptions