Public bug reported: There is a couple of ways to obtain BadRequest from Neutron in neutron driver of security groups. As an example try to add below security group rule:
nova --debug secgroup-add-rule default icmp -1 255 0.0.0.0/0 Attempt fails and Neutron raises BadRequest. But neutron driver doesn't process exception with code 400 and reraises it again as NeutronClientException[1]. So this Exception is only handled [2], where code of this exceprion isn't processed correctly (because Neutron and Nova have different names for attribute with exceprion code), so nova throws internal server error instead of BadRequest: ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req- 4775128d-5ef0-4863-b96f-56515c967fb4) [1] - https://github.com/openstack/nova/blob/master/nova/network/security_group/neutron_driver.py#L217 [2] - https://github.com/openstack/nova/blob/master/nova/api/openstack/__init__.py#L97 ** Affects: nova Importance: Undecided Assignee: Eugeniya Kudryashova (ekudryashova) Status: In Progress -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1408024 Title: Wrong processing BadRequest while adding security group rule Status in OpenStack Compute (Nova): In Progress Bug description: There is a couple of ways to obtain BadRequest from Neutron in neutron driver of security groups. As an example try to add below security group rule: nova --debug secgroup-add-rule default icmp -1 255 0.0.0.0/0 Attempt fails and Neutron raises BadRequest. But neutron driver doesn't process exception with code 400 and reraises it again as NeutronClientException[1]. So this Exception is only handled [2], where code of this exceprion isn't processed correctly (because Neutron and Nova have different names for attribute with exceprion code), so nova throws internal server error instead of BadRequest: ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req- 4775128d-5ef0-4863-b96f-56515c967fb4) [1] - https://github.com/openstack/nova/blob/master/nova/network/security_group/neutron_driver.py#L217 [2] - https://github.com/openstack/nova/blob/master/nova/api/openstack/__init__.py#L97 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1408024/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp