Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openSUSE broken on recent versions of facter #688

Open
mattqm opened this issue Jun 17, 2023 · 3 comments
Open

openSUSE broken on recent versions of facter #688

mattqm opened this issue Jun 17, 2023 · 3 comments

Comments

@mattqm
Copy link

mattqm commented Jun 17, 2023

Describe the Bug

Error: Systemd start for ntp failed!
journalctl log for ntp:
-- No entries --

Error: /Stage[main]/Ntp::Service/Service[ntp]/ensure: change from 'stopped' to 'running' failed: Systemd start for ntp failed!
journalctl log for ntp:
-- No entries --

When running a recent version of facter on opensuse, the ntp service name is not correctly matched because facter is now returning a string with different case so the hiera data file does not get matched. The string used to be "OpenSuSE" (facter 3.14.12) and now it is "openSUSE" (facter 4.4.1)

Expected Behavior

Correct service name of "ntpd" to be found by hiera and service started correctly.

Steps to Reproduce

Steps to reproduce the behavior:

  1. upgrade facter to version 4.4 or so
  2. run puppet on opensuse system

Environment

  • Version Puppet 6.29.0, Facter 4.4.1
  • Platform OpenSuse 15.5

Additional Context

I suppose the easiet solution is just to duplicate the hiera data file to match both cases. Pity we cannot just downcase all the facts as a more elegant solution.

@mattqm
Copy link
Author

mattqm commented Jun 17, 2023

Setting 'ntpd' service name in data/Suse-family.yaml also fixes the problem. Does anyone know why this is different to opensuse - is/was sles using a different service name to opensuse?

@mattqm
Copy link
Author

mattqm commented Jun 17, 2023

seems SLES recommends Chrony - I could switch to that too - I've been upgrading these systems for about 10 years, so probably time to switch to Chrony.

@mattqm
Copy link
Author

mattqm commented Jun 17, 2023

I've switched to Chrony now, so this can be closed if no one else cares if this is broken.

    class { 'chrony':
      servers => $ntp_servers,
    }
    service { 'ntpd':
      ensure => 'stopped',
      enable => false,
      before => Class['Chrony'],
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants