#1586 kojid buildroot cleanup delay too long due to timezone
Closed: Fixed by mikem. Opened by ywtan0811.

Buildroots of passing builds are taking far too long to be cleaned up, despite a delay of only 2 minutes being defined in koji/daemon.py [1]. Instead, the logs show that cleanup only occurs after approximately 8h2m. The extra 8h coincides with the number of hours by which my timezone (Asia/Kuala_Lumpur) is ahead of GMT.

From koji call getBuildroot:

{
 ...
 'retire_event_id': 52964,
 'retire_event_time': '2019-07-27 18:45:36.655608',
 'retire_ts': 1564253136.65561,
 ...
}

retire_event_time is correct when treated as local time, and is consistent with that displayed in the web UI. However, date -d @1564253136.65561 returns Sun 28 Jul 2019 02:45:36 AM +08, 8h ahead of retire_event_time.

kojid calulates buildroot age as time.time() - br['retire_ts'], where time() is the epoch in UTC [2]. Due to the above quirk in retire_ts, it takes 8h before kojid catches up to a retired buildroot.

koji 1.15.2
postgresql 9.6.13


Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue tagged with: bug

This should have been fixed by #2160

Metadata Update from @mikem:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/1586

Please continue any further discussion there.

Metadata