Open leeclemens opened 10 months ago
It seems to me that timezone.get_zone
should be the source of truth in determining the current timezone rather than have duplicated (or worse, different) methods determining the same fact.
Regarding the hash check in timezone.compare_zone
, is that adding value? timedatetectl
returns a name, would it ever differ from the binary tzfile it loaded? Would /etc/localtime
, usually a symlink in my experience, ever differ from the file it links to (but where the names match)?
Description Unable to apply
timezone.system
on new AlmaLinux 9 system because/etc/localtime
does not exist.Setup
Please be as specific as possible and give set-up details.
AWS AlmaLinux 9 x86_64 AMI
Steps to Reproduce the behavior Try to apply the state on a clean system from the AMI
Expected behavior
timedatectl
does return the correct timezone, so I expected salt to be able to determine the timezone; or at the last configure it as specified in the state.Screenshots N/A
Versions Report
Minion
```yaml Salt Version: Salt: 3006.5 Python Version: Python: 3.10.13 (main, Nov 15 2023, 04:34:27) [GCC 11.2.0] Dependency Versions: cffi: 1.14.6 cherrypy: 18.6.1 dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.2 libgit2: Not Installed looseversion: 1.0.2 M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.2 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 22.0 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.9.8 pygit2: Not Installed python-gnupg: 0.4.8 PyYAML: 6.0.1 PyZMQ: 23.2.0 relenv: 0.14.2 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: almalinux 9.3 Shamrock Pampas Cat locale: utf-8 machine: x86_64 release: 5.14.0-362.8.1.el9_3.x86_64 system: Linux version: AlmaLinux 9.3 Shamrock Pampas Cat ```Master
```yaml Salt Version: Salt: 3006.5 Python Version: Python: 3.10.13 (main, Nov 15 2023, 04:34:27) [GCC 11.2.0] Dependency Versions: cffi: 1.14.6 cherrypy: unknown dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 3.1.2 libgit2: Not Installed looseversion: 1.0.2 M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.2 msgpack-pure: Not Installed mysql-python: Not Installed packaging: 22.0 pycparser: 2.21 pycrypto: Not Installed pycryptodome: 3.9.8 pygit2: Not Installed python-gnupg: 0.4.8 PyYAML: 6.0.1 PyZMQ: 23.2.0 relenv: 0.14.2 smmap: Not Installed timelib: 0.2.4 Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: centos 7.9.2009 Core locale: utf-8 machine: x86_64 release: 3.10.0-1160.105.1.el7.x86_64 system: Linux version: CentOS Linux 7.9.2009 Core ```Additional context I also tried calling
timedatectl set-timezone UTC
explicitlely - same issue.Output from
timedatectl
(no change):