← Back to team overview

freeipa team mailing list archive

[Bug 1966181] Re: ipa-client-install fails on restarting non-existing chrony.service

 

A-ha! I wasn't seeing things after all. Our test images install the
"systemd-timesyncd" package (as we also run tests against that), and
that removes the chrony package and installs the mask:

# apt install systemd-timesyncd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  chrony
The following NEW packages will be installed:
  systemd-timesyncd
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 30.8 kB of archives.
After this operation, 364 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 systemd-timesyncd amd64 248.3-1ubuntu8.2 [30.8 kB]
Fetched 30.8 kB in 0s (82.3 kB/s)      
dpkg: chrony: dependency problems, but removing anyway as you requested:
 systemd depends on systemd-timesyncd | time-daemon; however:
  Package systemd-timesyncd is not installed.
  Package time-daemon is not installed.
  Package systemd-timesyncd which provides time-daemon is not installed.
  Package chrony which provides time-daemon is to be removed.


# ls -l /etc/systemd/system/chrony.service 
lrwxrwxrwx 1 root root 9 Mar 24 12:16 /etc/systemd/system/chrony.service -> /dev/null


Mystery solved!

So, sorry for the noise!

** Changed in: freeipa (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of FreeIPA,
which is subscribed to freeipa in Ubuntu.
https://bugs.launchpad.net/bugs/1966181

Title:
  ipa-client-install fails on restarting non-existing chrony.service

Status in freeipa package in Ubuntu:
  Invalid
Status in freeipa package in Debian:
  New

Bug description:
  DistroRelease: Ubuntu 21.10
  Package: freeipa-client 4.8.6-1ubuntu6

  This is a bug that just doesn't want to die -- the package *really*
  should grow an autopkgtest that checks if a basic ipa-client-install
  actually works. It's very similar to bug 1890786 except that it now
  fails on "chrony.service", not "chronyd.service":

  
  # ipa-client-install --domain cockpit.lan --realm COCKPIT.LAN --principal admin -W
  This program will set up FreeIPA client.
  Version 4.8.6

  WARNING: conflicting time&date synchronization service 'ntp' will be
  disabled in favor of chronyd

  Discovery was successful!
  Do you want to configure chrony with NTP server or pool address? [no]: 
  Client hostname: x0.cockpit.lan
  Realm: COCKPIT.LAN
  DNS Domain: cockpit.lan
  IPA Server: f0.cockpit.lan
  BaseDN: dc=cockpit,dc=lan

  Continue to configure the system with these values? [no]: yes
  Synchronizing time
  No SRV records of NTP servers found and no NTP server or pool address was provided.
  Using default chrony configuration.
  CalledProcessError(Command ['/bin/systemctl', 'restart', 'chrony.service'] returned non-zero exit status 5: 'Failed to restart chrony.service: Unit chrony.service not found.\n')
  The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information


  This also happens if I say "yes" to the NTP question.

  
  Now, the chrony package is indeed rather weird/broken:

  | root@x0:~# find /etc/systemd -name '*chrony*' | xargs ls -l
  | lrwxrwxrwx 1 root root  9 Mar 24 05:54 /etc/systemd/system/chrony.service -> /dev/null
  | lrwxrwxrwx 1 root root 34 Mar 23 04:31 /etc/systemd/system/chronyd.service -> /lib/systemd/system/chrony.service
  | lrwxrwxrwx 1 root root 34 Mar 23 04:31 /etc/systemd/system/multi-user.target.wants/chrony.service -> /lib/systemd/system/chrony.service

  | # systemctl status chrony chronyd
  | Warning: The unit file, source configuration file or drop-ins of chronyd.service changed on disk. Run 'systemctl daemon-reload' to relo>
  | ○ chrony.service
  |      Loaded: masked (Reason: Unit chrony.service is masked.)
  |      Active: inactive (dead)
  |
  | ○ chronyd.service
  |      Loaded: error (Reason: Unit chronyd.service failed to load properly, please adjust/correct and reload service manager: File exists)
  |      Active: inactive (dead)

  Again, this is unconfigured and out of the box -- the idea is that FreeIPA
  sets up everything and configures NTP/chrony/etc. to listen to the FreeIPA
  server.

  Purging chrony doesn't really help, though:

  | dpkg -P chrony
  | # no '*chrony*' files in /etc any more

  Exactly the same failure, and it still tries to configure chrony even though
  it's not there any more:

  | WARNING: conflicting time&date synchronization service 'ntp' will be disabled in favor of chronyd
  |
  | Discovery was successful!
  | Do you want to configure chrony with NTP server or pool address? [no]: yes
  | Enter NTP source server addresses separated by comma, or press Enter to skip:
  | Enter a NTP source pool address, or press Enter to skip:
  | Client hostname: x0.cockpit.lan
  | Realm: COCKPIT.LAN
  | DNS Domain: cockpit.lan
  | IPA Server: f0.cockpit.lan
  | BaseDN: dc=cockpit,dc=lan
  |
  | Continue to configure the system with these values? [no]: yes
  | Synchronizing time
  | No SRV records of NTP servers found and no NTP server or pool address was provided.
  | Using default chrony configuration.
  | CalledProcessError(Command ['/bin/systemctl', 'restart', 'chrony.service'] returned non-zero exit status 5: 'Failed to restart chrony.service: Unit chrony.service
  +not found.\n')
  | The ipa-client-install command failed. See /var/log/ipaclient-install.log for more information

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/freeipa/+bug/1966181/+subscriptions



References