Wrong service name used for chrony when restarting service
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Ryan Harper |
Bug Description
service is called chronyd and not chrony in CentOS/RH. Have been tested with lated CentOS cloud image + all latest updates (with epel enabled).
[root@myhostname ~]# uname -a
Linux myhostname 3.10.0-
[root@myhostname ~]# cat /etc/centos-release
CentOS Linux release 7.8.2003 (Core)
[root@myhostname ~]# cloud-init single --name cc_ntp
Cloud-init v. 18.5 running 'single' at Wed, 01 Jul 2020 19:16:33 +0000. Up 54.51 seconds.
2020-07-01 19:16:34,023 - cc_ntp.py[ERROR]: Failed to reload/start ntp service: Unexpected error while running command.
Command: ['systemctl', 'reload-
Exit code: 5
Reason: -
Stdout:
Stderr: Failed to reload-or-restart chrony.service: Unit not found.
Traceback (most recent call last):
File "/usr/lib/
systemd=
File "/usr/lib/
util.subp(cmd, capture=True)
File "/usr/lib/
cmd=args)
ProcessExecutio
Command: ['systemctl', 'reload-
Exit code: 5
Reason: -
Stdout:
Stderr: Failed to reload-or-restart chrony.service: Unit not found.
2020-07-01 19:16:34,025 - util.py[WARNING]: Running module cc_ntp (<module 'cloudinit.
2020-07-01 19:16:34,040 - main.py[WARNING]: Ran cc_ntp but it failed!
Centos/ Rhel/Fedora/ SuSE all use chronyd.service.