Ask Your Question
0

latest version of ntp module breaks

asked 2016-11-22 00:26:21 -0500

BellaXie gravatar image

Puppet run on Ubuntu server shows error "Error: /Stage[main]/Ntp::Service/Service[ntp]: Could not evaluate: Could not find init script or upstart conf file for 'ntpd'" after ntp module been upgraded to the latest version.

After a bit of dig, I found ntp reads the servicename from ntp/data/common.yaml which has the value 'ntpd'. There are OS based yaml file in data directory, and the one for Debian actually defined the right servicename 'ntp'. However, ntp seemed never touched the debian.yaml, and there has no hiera data lookup in the ntp module at all which is strange, I wondered how it reads from common.yaml.

There are many ways to avoid the error msg, I'm just curious as it is obvious that the ntp module has been updated to get rid of params and use hiera in the new version, why doesn't it work?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-11-22 17:50:07 -0500

BellaXie gravatar image

updated 2016-11-22 17:59:47 -0500

There has no format in the comments, I'll just make it an answer to get the format. I'm using Puppet Enterprise, here is the version and os.family:

root@puppet:/var/tmp# puppet --version

4.5.2

root@puppet:/var/tmp# facter os.family

Debian

The version of the ntp module I downloaded is 6.0.0, Debian.yaml exists in the data directory

edit flag offensive delete link more
0

answered 2016-11-22 13:34:14 -0500

stivesso gravatar image

Hello,

I'm wondering about the Puppet Version you're using, check that version and make sure of the compatibility with the latest NTP module. The other thing you may try is to create "%{facts.os.name}".yaml (in your case, that should be ubuntu.yaml) with the needed content under data folder (check what you got from facter os.name)

Suggesting that because I also had a look on the same Module Code and as you well noticed, it's making use of Hiera as default back ends (instead of beloved "params.pp" pattern), In that Hiera hierarchy, I see that facts.os,name is coming before "%{facts.os.family}" and common.yaml...

---
version: 4
datadir: data
hierarchy:
  - name: "Full Version"
    backend: yaml
    path: "%{facts.os.name}-%{facts.os.release.full}"

  - name: "Major Version"
    backend: yaml
    path: "%{facts.os.name}-%{facts.os.release.major}"

  - name: "Distribution Name"
    backend: yaml
    path: "%{facts.os.name}"

  - name: "Operating System Family"
    backend: yaml
    path: "%{facts.os.family}"

  - name: "common"
    backend: yaml
edit flag offensive delete link more

Comments

Thanks Stivesso. I'm using Puppet Enterprise, here is the version and os.family: root@puppet:/var/tmp# puppet --version 4.5.2 root@puppet:/var/tmp# facter os.family Debian The version of the ntp module I downloaded is 6.0.0, Debian.yaml exists in the data directory.

BellaXie gravatar imageBellaXie ( 2016-11-22 17:47:33 -0500 )edit

Hello Bellaxie, Was asking the os.family on your Puppet client (unless u're facing the same NTP Issue when classifying ur Puppet Server's client). Anyway, have you tried to create "%{facts.os.name}".yaml ?

stivesso gravatar imagestivesso ( 2016-11-22 21:50:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2016-11-22 00:26:21 -0500

Seen: 58 times

Last updated: Nov 22 '16