yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #17135
[Bug 1226036] Re: Instance usage audit should be based on deleted_at not terminated_at
patch was abandoned.
** Changed in: nova
Status: In Progress => Opinion
--
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/1226036
Title:
Instance usage audit should be based on deleted_at not terminated_at
Status in OpenStack Compute (Nova):
Opinion
Bug description:
Currently the DB query used by the instance usage audit,
instance_get_active_by_window_joined() uses the terminated_at
timestamp.
terminated_at is normally set as part of the instance deletion
processing, however there are cases where an exception at the wrong
time could prevent terminated_at from being set. Also the recent bug
fixed by this change https://review.openstack.org/#/c/42534/ missed
out this update altogether, so instances created by a system with that
bug in-situ will now have large numbers of instances that will be
continually reported as existing even though the entry in the DB is
deleted.
Given that instance_usage_audit is meant to report on instances that
from the DB perspective existed on a host in the previous audit period
it would be more consistent to change
instance_get_active_by_window_joined() to use deleted_at - which is
set directly by the DB layer when the entry is deleted.
This would mean instances which have terminated_at set but not deleted
would be reported as existing - which is also more consistent with the
intended behviour of the audit.
The only case where terminated_at is not set as part of deletion is
already reported as a separate bug:
https://bugs.launchpad.net/nova/+bug/1189554
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1226036/+subscriptions