watcher fails because of missing /etc/timezone

Bug #1860440 reported by Dincer Celik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
In Progress
Medium
Dincer Celik
Rocky
New
Medium
Unassigned
Stein
New
Medium
Unassigned
Train
New
Medium
Unassigned
Ussuri
In Progress
Medium
Dincer Celik

Bug Description

Trying to bring watcher up and running on stein but it fails with error below because /etc/timezone is not introduced into containers.

2020-01-21 16:34:06.790 6 INFO oslo.service.wsgi [req-fa0b6e56-fd10-45b5-b91e-bff53955f9ad - - - - -] watcher-api listening on 10.250.127.11:9322
2020-01-21 16:34:06.791 6 INFO watcher.cmd.api [req-fa0b6e56-fd10-45b5-b91e-bff53955f9ad - - - - -] serving on http://10.250.127.11:9322
2020-01-21 16:34:06.840 6 CRITICAL python-watcher [req-323a698f-5927-4cc2-afb5-2bb8652e22a0 - - - - -] Unhandled error: ValueError: Unable to determine the name of the local timezone -- you must explicitly specify the name of the local timezone. Please refrain from using timezones like EST to prevent problems with daylight saving time. Instead, use a locale based timezone name (such as Europe/Helsinki).
2020-01-21 16:34:06.840 6 ERROR python-watcher Traceback (most recent call last):
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/bin/watcher-api", line 8, in <module>
2020-01-21 16:34:06.840 6 ERROR python-watcher sys.exit(main())
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/watcher/cmd/api.py", line 50, in main
2020-01-21 16:34:06.840 6 ERROR python-watcher api_schedule.start()
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/watcher/api/scheduling.py", line 114, in start
2020-01-21 16:34:06.840 6 ERROR python-watcher seconds=CONF.periodic_interval)
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/apscheduler/schedulers/base.py", line 416, in add_job
2020-01-21 16:34:06.840 6 ERROR python-watcher 'trigger': self._create_trigger(trigger, trigger_args),
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/apscheduler/schedulers/base.py", line 918, in _create_trigger
2020-01-21 16:34:06.840 6 ERROR python-watcher return self._create_plugin_instance('trigger', trigger, trigger_args)
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/apscheduler/schedulers/base.py", line 903, in _create_plugin_instance
2020-01-21 16:34:06.840 6 ERROR python-watcher return plugin_cls(**constructor_kwargs)
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/apscheduler/triggers/interval.py", line 38, in __init__
2020-01-21 16:34:06.840 6 ERROR python-watcher self.timezone = astimezone(timezone)
2020-01-21 16:34:06.840 6 ERROR python-watcher File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/apscheduler/util.py", line 87, in astimezone
2020-01-21 16:34:06.840 6 ERROR python-watcher 'Unable to determine the name of the local timezone -- you must explicitly '
2020-01-21 16:34:06.840 6 ERROR python-watcher ValueError: Unable to determine the name of the local timezone -- you must explicitly specify the name of the local timezone. Please refrain from using timezones like EST to prevent problems with daylight saving time. Instead, use a locale based timezone name (such as Europe/Helsinki).

Revision history for this message
Dincer Celik (dincercelik) wrote :

Maybe we should introduce /etc/timezone to all containers by default.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Makes sense, almost all do some time operations.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/704258

Changed in kolla-ansible:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.