← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1885952] [NEW] Wrong service name used for chrony when restarting service

 

Public bug reported:

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-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[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-or-restart', 'chrony']
Exit code: 5
Reason: -
Stdout: 
Stderr: Failed to reload-or-restart chrony.service: Unit not found.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cloudinit/config/cc_ntp.py", line 547, in handle
    systemd=cloud.distro.uses_systemd())
  File "/usr/lib/python2.7/site-packages/cloudinit/config/cc_ntp.py", line 436, in reload_ntp
    util.subp(cmd, capture=True)
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2084, in subp
    cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['systemctl', 'reload-or-restart', 'chrony']
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.config.cc_ntp' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_ntp.pyc'>) failed
2020-07-01 19:16:34,040 - main.py[WARNING]: Ran cc_ntp but it failed!

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1885952

Title:
  Wrong service name used for chrony when restarting service

Status in cloud-init:
  New

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-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  [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-or-restart', 'chrony']
  Exit code: 5
  Reason: -
  Stdout: 
  Stderr: Failed to reload-or-restart chrony.service: Unit not found.
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/cloudinit/config/cc_ntp.py", line 547, in handle
      systemd=cloud.distro.uses_systemd())
    File "/usr/lib/python2.7/site-packages/cloudinit/config/cc_ntp.py", line 436, in reload_ntp
      util.subp(cmd, capture=True)
    File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2084, in subp
      cmd=args)
  ProcessExecutionError: Unexpected error while running command.
  Command: ['systemctl', 'reload-or-restart', 'chrony']
  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.config.cc_ntp' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_ntp.pyc'>) failed
  2020-07-01 19:16:34,040 - main.py[WARNING]: Ran cc_ntp but it failed!

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1885952/+subscriptions


Follow ups