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 2020年7月01日 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/
It also turns out there's no templates/
This bug is believed to be fixed in cloud-init in version 22.3. If this is still a problem for you, please make a comment and set the state back to New
Thank you.
Tracked in Github Issues as https:/
Also affects Rocky Linux