yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #30493
[Bug 1436643] [NEW] nova usage-list doesn't show all instance
Public bug reported:
nova usage-list (os-simple-tenant-usage) will query a period instance
it will return 2 kinds of instances:
query = query.filter(or_(models.Instance.terminated_at == null(),
models.Instance.terminated_at > begin))
in my devstack environment, query from db I see there are some instance
which
mysql> select count(*) from instances where launched_at is NULL;
+----------+
| count(*) |
+----------+
| 3 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from instances ;
+----------+
| count(*) |
+----------+
| 22 |
+----------+
but usage-list doesn't show 22, it doesn't count the instance which launched_at is NULL
(I don't know why they are NULL , maybe live-migration failed)
Usage from 2015-02-26 to 2015-03-27:
+----------------------------------+---------+--------------+-----------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+-----------+---------------+
| 0d028ada663f41cd869acc5cdb488ad6 | 19 | 229321.36 | 447.89 | 447.89 |
+----------------------------------+---------+--------------+-----------+---------------+
do we need to count launched_at instances ?
** Affects: nova
Importance: Undecided
Assignee: Eli Qiao (taget-9)
Status: New
** Changed in: nova
Assignee: (unassigned) => Eli Qiao (taget-9)
--
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/1436643
Title:
nova usage-list doesn't show all instance
Status in OpenStack Compute (Nova):
New
Bug description:
nova usage-list (os-simple-tenant-usage) will query a period instance
it will return 2 kinds of instances:
query = query.filter(or_(models.Instance.terminated_at == null(),
models.Instance.terminated_at > begin))
in my devstack environment, query from db I see there are some
instance which
mysql> select count(*) from instances where launched_at is NULL;
+----------+
| count(*) |
+----------+
| 3 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from instances ;
+----------+
| count(*) |
+----------+
| 22 |
+----------+
but usage-list doesn't show 22, it doesn't count the instance which launched_at is NULL
(I don't know why they are NULL , maybe live-migration failed)
Usage from 2015-02-26 to 2015-03-27:
+----------------------------------+---------+--------------+-----------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+-----------+---------------+
| 0d028ada663f41cd869acc5cdb488ad6 | 19 | 229321.36 | 447.89 | 447.89 |
+----------------------------------+---------+--------------+-----------+---------------+
do we need to count launched_at instances ?
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1436643/+subscriptions
Follow ups
References