← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1260575] Re: security group quota usage is wrong when the security group is deleted by admin

 

** Changed in: nova
       Status: Fix Committed => 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/1260575

Title:
  security group quota usage is wrong when the security group is deleted
  by admin

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  The quota usage for security group do not decrease when the security
  group is deleted by admin.

  Use the attachment script to reproduce, here is what i got:

  + new_user
  + ATTEMPT_ID=27449
  + TENANT_NAME=tanant-27449
  ++ awk '/id/{print $4}'
  ++ keystone tenant-create --name tanant-27449
  + TENANT_ID=8e37a593f3234b6582f9e436a1b044c4
  + USER_NAME=user-27449
  ++ awk '/id/{print $4}'
  ++ keystone user-create --name user-27449 --tenant-id 8e37a593f3234b6582f9e436a1b044c4 --pass secret
  + USER_ID=373d946636324d53ba6161e065f68572
  + as_user nova quota-show
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova quota-show
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | 10    |
  | cores                       | 20    |
  | ram                         | 51200 |
  | floating_ips                | 10    |
  | fixed_ips                   | -1    |
  | metadata_items              | 128   |
  | injected_files              | 5     |
  | injected_file_content_bytes | 10240 |
  | injected_file_path_bytes    | 255   |
  | key_pairs                   | 100   |
  | security_groups             | 10    |
  | security_group_rules        | 20    |
  +-----------------------------+-------+
  + (( i=0 ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-0 by user-27449 **'
  ** Creating security group sec-27449-0 by user-27449 **
  + as_user nova secgroup-create sec-27449-0 sec-27449-0
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-0 sec-27449-0
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 39 | sec-27449-0 | sec-27449-0 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-1 by user-27449 **'
  ** Creating security group sec-27449-1 by user-27449 **
  + as_user nova secgroup-create sec-27449-1 sec-27449-1
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-1 sec-27449-1
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 40 | sec-27449-1 | sec-27449-1 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-2 by user-27449 **'
  ** Creating security group sec-27449-2 by user-27449 **
  + as_user nova secgroup-create sec-27449-2 sec-27449-2
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-2 sec-27449-2
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 41 | sec-27449-2 | sec-27449-2 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-3 by user-27449 **'
  ** Creating security group sec-27449-3 by user-27449 **
  + as_user nova secgroup-create sec-27449-3 sec-27449-3
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-3 sec-27449-3
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 42 | sec-27449-3 | sec-27449-3 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-4 by user-27449 **'
  ** Creating security group sec-27449-4 by user-27449 **
  + as_user nova secgroup-create sec-27449-4 sec-27449-4
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-4 sec-27449-4
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 43 | sec-27449-4 | sec-27449-4 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-5 by user-27449 **'
  ** Creating security group sec-27449-5 by user-27449 **
  + as_user nova secgroup-create sec-27449-5 sec-27449-5
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-5 sec-27449-5
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 44 | sec-27449-5 | sec-27449-5 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-6 by user-27449 **'
  ** Creating security group sec-27449-6 by user-27449 **
  + as_user nova secgroup-create sec-27449-6 sec-27449-6
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-6 sec-27449-6
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 45 | sec-27449-6 | sec-27449-6 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-7 by user-27449 **'
  ** Creating security group sec-27449-7 by user-27449 **
  + as_user nova secgroup-create sec-27449-7 sec-27449-7
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-7 sec-27449-7
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 46 | sec-27449-7 | sec-27449-7 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-8 by user-27449 **'
  ** Creating security group sec-27449-8 by user-27449 **
  + as_user nova secgroup-create sec-27449-8 sec-27449-8
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-8 sec-27449-8
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 47 | sec-27449-8 | sec-27449-8 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  + echo '** Creating security group sec-27449-9 by user-27449 **'
  ** Creating security group sec-27449-9 by user-27449 **
  + as_user nova secgroup-create sec-27449-9 sec-27449-9
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-9 sec-27449-9
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 48 | sec-27449-9 | sec-27449-9 |
  +----+-------------+-------------+
  + (( i++ ))
  + (( i<10 ))
  ++ as_admin nova secgroup-list --all-tenants
  ++ OS_USERNAME=admin
  ++ OS_TENANT_NAME=admin
  ++ OS_PASSWORD=123123
  ++ nova secgroup-list --all-tenants
  ++ awk '-F|' '{print $2}'
  ++ grep 8e37a593f3234b6582f9e436a1b044c4
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 38 by admin. **'
  ** Deleting security group 38 by admin. **
  + as_admin nova secgroup-delete 38
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 38
  ERROR: Unable to delete system group 'default' (HTTP 400) (Request-ID: req-7859a690-629d-4c5b-9da9-776132adf2e8)
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 39 by admin. **'
  ** Deleting security group 39 by admin. **
  + as_admin nova secgroup-delete 39
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 39
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 39 | sec-27449-0 | sec-27449-0 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 40 by admin. **'
  ** Deleting security group 40 by admin. **
  + as_admin nova secgroup-delete 40
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 40
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 40 | sec-27449-1 | sec-27449-1 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 41 by admin. **'
  ** Deleting security group 41 by admin. **
  + as_admin nova secgroup-delete 41
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 41
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 41 | sec-27449-2 | sec-27449-2 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 42 by admin. **'
  ** Deleting security group 42 by admin. **
  + as_admin nova secgroup-delete 42
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 42
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 42 | sec-27449-3 | sec-27449-3 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 43 by admin. **'
  ** Deleting security group 43 by admin. **
  + as_admin nova secgroup-delete 43
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 43
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 43 | sec-27449-4 | sec-27449-4 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 44 by admin. **'
  ** Deleting security group 44 by admin. **
  + as_admin nova secgroup-delete 44
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 44
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 44 | sec-27449-5 | sec-27449-5 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 45 by admin. **'
  ** Deleting security group 45 by admin. **
  + as_admin nova secgroup-delete 45
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 45
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 45 | sec-27449-6 | sec-27449-6 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 46 by admin. **'
  ** Deleting security group 46 by admin. **
  + as_admin nova secgroup-delete 46
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 46
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 46 | sec-27449-7 | sec-27449-7 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 47 by admin. **'
  ** Deleting security group 47 by admin. **
  + as_admin nova secgroup-delete 47
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 47
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 47 | sec-27449-8 | sec-27449-8 |
  +----+-------------+-------------+
  + for id in '`as_admin nova secgroup-list --all-tenants|grep $TENANT_ID |awk -F'\''|'\'' '\''{print $2}'\''`'
  + echo '** Deleting security group 48 by admin. **'
  ** Deleting security group 48 by admin. **
  + as_admin nova secgroup-delete 48
  + OS_USERNAME=admin
  + OS_TENANT_NAME=admin
  + OS_PASSWORD=123123
  + nova secgroup-delete 48
  +----+-------------+-------------+
  | Id | Name        | Description |
  +----+-------------+-------------+
  | 48 | sec-27449-9 | sec-27449-9 |
  +----+-------------+-------------+
  + echo '** Creating security group sec-27449-10 by user-27449 **'
  ** Creating security group sec-27449-10 by user-27449 **
  + as_user nova secgroup-create sec-27449-10 sec-27449-10
  + OS_USERNAME=user-27449
  + OS_TENANT_NAME=tanant-27449
  + OS_PASSWORD=secret
  + nova secgroup-create sec-27449-10 sec-27449-10
  ERROR: Quota exceeded, too many security groups. (HTTP 413) (Request-ID: req-00ee6c83-232d-4fdf-94d1-cc950aacaba5)
  + set +x

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


References