Can we create server group with empty policies?

Bug #1740123 reported by wei.ying
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Wishlist
Takashi Natsume

Bug Description

Env: devstack master branch

Des: According to the description of server group policies[1], the value of policies are "A list of exactly one policy name to associate with the server group".

However, when I use the following creation and pass the empty policies, and the server group can be created successfully, is this reasonable?

kwargs = {u'name': u'test', u'policies': []}
novaclient(request).server_groups.create(**kwargs)

[1] https://developer.openstack.org/api-ref/compute/#create-server-group

Tags: api
Revision history for this message
Matt Riedemann (mriedem) wrote :

I don't see anything in the REST API schema validation or code that requires that policies are provided. I don't know if there is a good reason for creating a server group without any policies though.

Matt Riedemann (mriedem)
tags: added: api
Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

You can create the group, but then if you boot an instance with that group, the instance will fail because there is no policy.

That's enough arguable to have the API providing you a 400 if you try creating a group without a policy, but I feel we need to open a blueprint and a spec for it, hence marking it Wishlist except if someone complains.

Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in nova:
assignee: nobody → Takashi NATSUME (natsume-takashi)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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