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

Add package and service name for Debian 12 'ntpsec' #700

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FrankVanDamme
Copy link

Summary

Added one file in data to match Debian-12 hosts.

Additional Context

"ntp" is now a transitional dummy package in Debian and a Puppet run with the service enabled will fail since the service "ntp" is renamed to "ntpsec".

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Frank Van Damme seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@octomike
Copy link

octomike commented Oct 2, 2023

Can't really reproduce on an upgraded system (from 11 to 12):

# puppet resource service ntp ensure=stopped
Notice: /Service[ntp]/ensure: ensure changed 'running' to 'stopped'
service { 'ntp':
  ensure   => 'stopped',
  provider => 'systemd',
}
# puppet resource service ntpsec
service { 'ntpsec':
  ensure   => 'stopped',
  enable   => 'true',
  provider => 'systemd',
}

# puppet resource service ntp
service { 'ntp':
  ensure   => 'stopped',
  enable   => 'true',
  provider => 'systemd',root@lip-vault:~
}

# ls -la /etc/systemd/system/ntp*
lrwxrwxrwx 1 root root 34 Sep 28 17:02 /etc/systemd/system/ntpd.service -> /lib/systemd/system/ntpsec.service
lrwxrwxrwx 1 root root  9 Sep 28 17:02 /etc/systemd/system/ntpsec.timer -> /dev/null
lrwxrwxrwx 1 root root 34 Sep 28 17:02 /etc/systemd/system/ntp.service -> /lib/systemd/system/ntpsec.service

@smoeding
Copy link

smoeding commented Feb 17, 2024

Well, it works using the service name ntp because the real service ntpsec installs these aliases to remain backwards compatible. Check /usr/lib/systemd/system/ntpsec.service to find the following snippet:

[Install]
Alias=ntp.service
Alias=ntpd.service

This causes systemd to create these files in addition to the real service files:

# ls -la /etc/systemd/system/ntp*
lrwxrwxrwx 1 root root 34 Sep 28 17:02 /etc/systemd/system/ntpd.service -> /lib/systemd/system/ntpsec.service
lrwxrwxrwx 1 root root 34 Sep 28 17:02 /etc/systemd/system/ntp.service -> /lib/systemd/system/ntpsec.service

Sticking with ntp as the service name will probably cause a problem when Debian decides to remove this compatibility shim. I would vote to update both the package and the service name to match the system state.

Copy link
Collaborator

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not the same package (ntpsec is available in other releases), but is a fork of the legacy package and somewhat compatible.

This page list differences,
https://docs.ntpsec.org/latest/ntpsec.html

This look backwards compatible, probably the unit test will confirm this when they run. Rebasing on top of the main branch may help. Maybe the missing CLA signature is blocking too.

@tdb
Copy link

tdb commented Jun 12, 2024

The same is true of Ubuntu 24.04, so a data/Ubuntu-24.04.yaml with the same content would be useful at the same time.

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

Successfully merging this pull request may close these issues.

None yet

7 participants