Ask Your Question
0

Is there any way to find the creation date of a tenant?

asked 2015-02-09 08:27:15 -0500

ana.oprita gravatar image

Hi,

I need to identify the creation date for a tenant. I checked the db of tenant and user and i cannot find any date. Is there any way to find out how "old" is a tenant?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-02-09 10:03:51 -0500

tim-bell gravatar image

Could you give more details on the use case ? I think adding a created_at would be a useful function (sometimes it is easy to forget) but a concrete use case could lead to an enhancement request.

edit flag offensive delete link more
1

answered 2015-02-09 08:36:56 -0500

larsks gravatar image

I don't think there is a way to do this authoritatively. There is no timestamp information stored in the database, and keystone doesn't log any details about tenant creation/deletion.

You might be able to get an approximate value for this by looking at the the Nova instances table; for each instance, there is a created_at and project_id value, and these database entries are typically not deleted even when you delete the instance. So, for example, on my system I can run:

MariaDB [nova]> select created_at, project_id from instances limit 5;

And get:

+---------------------+----------------------------------+
| created_at          | project_id                       |
+---------------------+----------------------------------+
| 2014-07-17 20:49:45 | 4dfe8e38f68449b6a0c9cd73037726f7 |
| 2014-07-18 22:02:10 | 4dfe8e38f68449b6a0c9cd73037726f7 |
| 2014-12-29 21:09:29 | 95d9bbd9b446438a89a353d8adb60704 |
| 2015-01-10 03:22:30 | 95d9bbd9b446438a89a353d8adb60704 |
| 2015-01-21 04:34:45 | 95d9bbd9b446438a89a353d8adb60704 |
+---------------------+----------------------------------+

If you are keeping regular backups of your database, you can of course investigate your backups to determine when the tenant first appeared. This is probably the most accurate method of finding when the tenant was created, but it requires both that you have a backup procedure in place and that your retention policy is long enough to find the required data.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-02-09 08:27:15 -0500

Seen: 704 times

Last updated: Feb 09 '15