saltstack-formulas / timezone-formula

Setup and configure timezone.
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Apache License 2.0
7 stars 67 forks source link

[BUG] failure on Centos8 #25

Open noelmcloughlin opened 4 years ago

noelmcloughlin commented 4 years ago

Your setup

Formula commit hash / release tag

Versions reports (master & minion)

Pillar / config used

timezone:
  name: 'Europe/Berlin'
  utc: True

Bug details

Describe the bug

[ERROR   ] Command '['timedatectl', 'set-local-rtc', 'false']' failed with return code: 1
[ERROR   ] stdout: Failed to set local RTC: hwclock failed: Child process exited with code 1
[ERROR   ] retcode: 1
[ERROR   ] {'timezone': 'Europe/Berlin'}

          ID: timezone_setting
    Function: timezone.system
        Name: Europe/Berlin
      Result: False
     Comment: Set timezone Europe/Berlin, Failed to set UTC to True
     Started: 10:45:32.901511
    Duration: 123.419 ms
     Changes:
              ----------
              timezone:
                  Europe/Berlin

Steps to reproduce the bug

Expected behaviour

Attempts to fix the bug

Additional context

javierbertoli commented 4 years ago

Hi @noelmcloughlin . Just out of curiosity and to better understand, this is on 'real' hardware, right? not VMs/cloud? Because on the latter you can't set the HWclock (only the host can do it, if I'm not wrong). One way or the other, I think detecting it would be a nice feature of this formula, though :smile:

noelmcloughlin commented 4 years ago

Hello @javierbertoli good point. Perhaps it throws silent error on Cent7 but borks in Cent8. I never saw the error before and the pillars are just test pillars I use!

Yes, Could be improvement since state fails ;-)