[wallaby][nova] Change Time Zone
Hi, I am using Openstack Wallaby release on Ubuntu 20.04. When I try to list openstack compute services the time zone in 'Updated At' column is in UTC. root@controller-khi01 ~(keystone)# openstack compute service list +----+----------------+------------------+----------+---------+-------+----------------------------+ | ID | Binary | Host | Zone | Status | State | Updated At | +----+----------------+------------------+----------+---------+-------+----------------------------+ | 4 | nova-conductor | controller-khi01 | internal | enabled | up | 2021-06-03T11:59:59.000000 | | 5 | nova-scheduler | controller-khi01 | internal | enabled | up | 2021-06-03T12:00:08.000000 | | 8 | nova-compute | kvm03-a1-khi01 | nova | enabled | up | 2021-06-03T12:00:02.000000 | | 9 | nova-compute | kvm01-a1-khi01 | nova | enabled | up | 2021-06-03T12:00:02.000000 | +----+----------------+------------------+----------+---------+-------+----------------------------+ I want to change it to some other time zone. Is there a way to do it? I would really appreciate any input in this regard. Thank you. Regards, Malik Obaid
On Thu, 2021-06-03 at 17:01 +0500, Malik Obaid wrote:
Hi,
I am using Openstack Wallaby release on Ubuntu 20.04.
When I try to list openstack compute services the time zone in 'Updated At' column is in UTC. i suspect that that is based on the default timzone of the server where the conductor is running or perhaps the individual services. nova does not have any configuration for this and the updated_at time filed is generally provded by the NovaPersistentObject mixin https://github.com/openstack/nova/blob/master/nova/objects/base.py#L134-L149
for the compute nodes table its set by https://github.com/openstack/nova/blob/da57eebc9e1ab7e48d4c4ef6ec1eeba80d867... and we are converting explitly to utc ltaher here https://github.com/openstack/nova/blob/da57eebc9e1ab7e48d4c4ef6ec1eeba80d867... while i have not explictly found where the compute service record update_at is set i would guess it a deliberate design descisn to only store data information in utc format and leave it to the clinets to convert to local timezones if desired. i think that is proably the correct approch to take. although i guess you could confvert it at the api potentially though im not sure that would genrelaly be a good impromenbt to make
root@controller-khi01 ~(keystone)# openstack compute service list +----+----------------+------------------+----------+---------+-------+----------------------------+
ID | Binary | Host | Zone | Status | State | Updated At | +----+----------------+------------------+----------+---------+-------+----------------------------+ 4 | nova-conductor | controller-khi01 | internal | enabled | up | 2021-06-03T11:59:59.000000 | 5 | nova-scheduler | controller-khi01 | internal | enabled | up | 2021-06-03T12:00:08.000000 | 8 | nova-compute | kvm03-a1-khi01 | nova | enabled | up | 2021-06-03T12:00:02.000000 | 9 | nova-compute | kvm01-a1-khi01 | nova | enabled | up | 2021-06-03T12:00:02.000000 | +----+----------------+------------------+----------+---------+-------+----------------------------+
I want to change it to some other time zone. Is there a way to do it? not that i am aware no. I would really appreciate any input in this regard.
Thank you.
Regards, Malik Obaid
participants (2)
-
Malik Obaid
-
Sean Mooney