← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1078668] Re: wrong quota_usages updated when admin deletes instance of common user

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => grizzly-3

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

Title:
  wrong quota_usages updated when admin deletes instance of common user

Status in Cinder:
  In Progress
Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When admin with admin project delete a instance of common user, QUOTA
  will update the admin project quota_usages,  but I except QUOTA to
  update the quota_usages  common user project. Below is my tests in
  devstack.

  
  "the demo project _id is f293f8518b67465bb47af717c075e619.
  "the admin project_id is 69d65864ae8242b580649252cacedaa3.

  $ source openrc demo demo
  $ nova boot --flavor=1 --image=89a0484b-a539-4c7b-b549-36c3c56fdcff test1
  "the instance of demo project is e74c9b03-07d4-4988-96eb-ab7bc75411b1.

  $ source openrc admin admin
  $ nova boot --flavor=1 --image=89a0484b-a539-4c7b-b549-36c3c56fdcff test2
  "the instance of admin project is 627f8491-9425-4364-aa1b-ec02a42f946b.

  $ nova list --all-tenants=1
  +--------------------------------------+-------+--------+------------------+
  | ID                                   | Name  | Status | Networks         |
  +--------------------------------------+-------+--------+------------------+
  | e74c9b03-07d4-4988-96eb-ab7bc75411b1 | test1 | ACTIVE | private=10.0.0.2 |
  | 627f8491-9425-4364-aa1b-ec02a42f946b | test2 | ACTIVE | private=10.0.0.3 |
  +--------------------------------------+-------+--------+------------------+

  $ source openrc admin admin
  $ nova delete e74c9b03-07d4-4988-96eb-ab7bc75411b1
  $ nova list --all-tenants=1
  +--------------------------------------+-------+--------+------------------+
  | ID                                   | Name  | Status | Networks         |
  +--------------------------------------+-------+--------+------------------+
  | 627f8491-9425-4364-aa1b-ec02a42f946b | test2 | ACTIVE | private=10.0.0.3 |
  +--------------------------------------+-------+--------+------------------+

  
  mysql> select * from quota_usages;
  +---------------------+---------------------+------------+---------+----+----------------------------------+-----------+--------+----------+---------------+
  | created_at          | updated_at          | deleted_at | deleted | id | project_id                       | resource  | in_use | reserved | until_refresh |
  +---------------------+---------------------+------------+---------+----+----------------------------------+-----------+--------+----------+---------------+
  | 2012-11-08 10:58:51 | 2012-11-14 11:08:01 | NULL       |       0 |  1 | f293f8518b67465bb47af717c075e619 | instances |      1 |        0 |          NULL |
  | 2012-11-08 10:58:51 | 2012-11-14 11:08:01 | NULL       |       0 |  2 | f293f8518b67465bb47af717c075e619 | ram       |    512 |        0 |          NULL |
  | 2012-11-08 10:58:51 | 2012-11-14 11:08:01 | NULL       |       0 |  3 | f293f8518b67465bb47af717c075e619 | cores     |      1 |        0 |          NULL |
  | 2012-11-13 16:56:47 | 2012-11-14 11:09:45 | NULL       |       0 |  4 | 69d65864ae8242b580649252cacedaa3 | instances |      0 |        0 |          NULL |
  | 2012-11-13 16:56:47 | 2012-11-14 11:09:45 | NULL       |       0 |  5 | 69d65864ae8242b580649252cacedaa3 | ram       |      0 |        0 |          NULL |
  | 2012-11-13 16:56:47 | 2012-11-14 11:09:45 | NULL       |       0 |  6 | 69d65864ae8242b580649252cacedaa3 | cores     |      0 |        0 |          NULL |
  +---------------------+---------------------+------------+---------+----+----------------------------------+-----------+--------+----------+---------------+
  6 rows in set (0.00 sec)

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