Reviewed:  https://review.openstack.org/370567
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=43826e458eefc4157b45d8a04422cbdcdec4f7ff
Submitter: Jenkins
Branch:    master

commit 43826e458eefc4157b45d8a04422cbdcdec4f7ff
Author: yuntongjin <yuntong....@intel.com>
Date:   Tue Mar 1 16:00:16 2016 +0800

    Add members in InstanceGroup object members field
    
    In InstanceGroup object, add_members method doesn't add members
    into object members field, which causes
    objects.Quotas.count(server_group_members) won't increase, and
    instance group quota check invalid. This makes an issue that user
    could spawn with one call more instances in server group than
    was allowed in quota_server_group_members is it was below
    instances quota settting.
    
    Co-authored-by: yuntongjin <yuntong....@intel.com>
    
    Change-Id: Icdd8aef688776f00fef6ede6e1bed01af29f9917
    Closes-bug: #1538169


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  Quota_server_group_members parameter is not respected with
  min_count/max_count

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  When I create instances which I want to be in the same server group
  (--hint group=<UUID>)  with parameter: --num-instances or --min-count
  /--max-count   and I have quota_server_group_members set to 5, nova is
  spawning all instances regardless quota.

   Example:
  nova boot --image $image --flavor small  --hint 
group=528ff1e3-5a6d-475c-826e-c70d7a56e769 --nic net-id=<UUID> --min-count=2 
--max-count=10  test-instance

  All Instances has spawned correct. In next request I have an error:
  ERROR (Forbidden): Quota exceeded, too many servers in group (HTTP 403) 
(Request-ID: req-f8aa39cd-2a14-486d-95a9-747ed9eecbfc)

  
  Normally request which should spawn 10 instances (but quota is set to 5) 
should give an error with Quota exceeded.
  The same situation is with  --num-instances parameter.

  
  I check it many times in Juno release and on devstack using nova master 
branch.

  
  I added simple patch to forbidden creating new instances over quota, but it's 
should be changed and it's not working correctly with --min-count/--max-count 
parameter.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1538169/+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

Reply via email to