← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1434172] Re: security group create errors without description

 

AFAICT - the API says a request with no description in the body should be allowed:
http://developer.openstack.org/api-ref-compute-v2-ext.html

In the controller, the description value is not checked but goes to validate_property...
https://github.com/openstack/nova/blob/3e5062a8ddf94351389f7e201959591b26f338a4/nova/api/openstack/compute/contrib/security_groups.py#L190-L207

At validate_property though, it errors out when any value is not a string
https://github.com/openstack/nova/blob/d33184b6f890256b332e75bd46a58823cac663ff/nova/compute/api.py#L3855-L3880

To me, this seems like an issue with nova's implementation not matching
it's API. In this case the API seems correct as description should
always be optional.

We can and should proceed with the OSC fix as a band-aid solution, but
should mark a TODO to change it when the nova side is resolved.

** Also affects: nova
   Importance: Undecided
       Status: New

-- 
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/1434172

Title:
  security group create errors without description

Status in OpenStack Compute (Nova):
  New
Status in OpenStack Command Line Client:
  In Progress

Bug description:
  security group create returns an error without --description supplied.
  This appears to be the server rejecting the request so we should set a
  default value rather than sending None.

    $ openstack security group create qaz
    ERROR: openstack Security group description is not a string or unicode (HTTP 400) (Request-ID: req-dee03de3-893a-4d58-bc3d-de87d09c3fb8)

  Sent body:

    {"security_group": {"name": "qaz2", "description": null}}

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