Upgrade from bionic to focal broke for this system which has chrony installed.
After do-release-upgrade exited (warning that the system was in an indeterminate state) I was unable to fix the system initially. It seemed that systemd-timesyncd was somehow interacting badly with chrony:
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libboost-filesystem1.65.1 libboost-iostreams1.65.1 libboost-system1.65.1 libcwidget3v5 libip4tc2 libnspr4 libnss3 python3.6 python3.6-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libboost-iostreams1.71.0 libcwidget4 libxapian30
Suggested packages:
libcwidget-dev xapian-tools
The following packages will be REMOVED:
chrony
The following NEW packages will be installed:
libboost-iostreams1.71.0 libcwidget4
The following packages will be upgraded:
libxapian30
1 upgraded, 2 newly installed, 1 to remove and 439 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1204 kB of archives.
After this operation, 3022 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 171920 files and directories currently installed.)
Removing chrony (3.2-4ubuntu4.2) ...
Job for systemd-timesyncd.service failed because the control process exited with error code.
See "systemctl status systemd-timesyncd.service" and "journalctl -xe" for details.
dpkg: error processing package chrony (--remove):
installed chrony package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
chrony
E: Sub-process /usr/bin/dpkg returned an error code (1)
I turned off the systemd-timesync ntp and that then allowed chrony to be removed (not quite what I wanted but that is another story):
mark@bigben:/var/log/chrony$ sudo timedatectl status Local time: Sat 2020-04-11 10:55:31 UTC Universal time: Sat 2020-04-11 10:55:31 UTC RTC time: Sat 2020-04-11 10:55:31 Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
systemd-timesyncd.service active: yes RTC in local TZ: no
mark@bigben:/var/log/chrony$ sudo timedatectl set-ntp false
mark@bigben:/var/log/chrony$ sudo timedatectl status Local time: Sat 2020-04-11 10:55:50 UTC Universal time: Sat 2020-04-11 10:55:50 UTC RTC time: Sat 2020-04-11 10:55:50 Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
systemd-timesyncd.service active: no RTC in local TZ: no
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libboost-filesystem1.65.1 libboost-iostreams1.65.1 libboost-system1.65.1 libcwidget3v5 libip4tc2 libnspr4 libnss3 python3.6 python3.6-minimal
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libboost-iostreams1.71.0 libcwidget4 libxapian30
Suggested packages:
libcwidget-dev xapian-tools
The following packages will be REMOVED:
chrony
The following NEW packages will be installed:
libboost-iostreams1.71.0 libcwidget4
The following packages will be upgraded:
libxapian30
1 upgraded, 2 newly installed, 1 to remove and 439 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1204 kB of archives.
After this operation, 3022 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 171920 files and directories currently installed.)
Removing chrony (3.2-4ubuntu4.2) ...
And then installing chrony again worked.
So it looks like we need to harden the chrony packaging for the world of systemd-timesync in general if we want upgrades to focal with chrony not to have problems.
Upgrade from bionic to focal broke for this system which has chrony installed.
After do-release-upgrade exited (warning that the system was in an indeterminate state) I was unable to fix the system initially. It seemed that systemd-timesyncd was somehow interacting badly with chrony:
$ sudo apt --fix-broken install filesystem1. 65.1 libboost- iostreams1. 65.1 libboost- system1. 65.1 libcwidget3v5 libip4tc2 libnspr4 libnss3 python3.6 python3.6-minimal iostreams1. 71.0 libcwidget4 libxapian30 iostreams1. 71.0 libcwidget4 timesyncd. service failed because the control process exited with error code. timesyncd. service" and "journalctl -xe" for details.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libboost-
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libboost-
Suggested packages:
libcwidget-dev xapian-tools
The following packages will be REMOVED:
chrony
The following NEW packages will be installed:
libboost-
The following packages will be upgraded:
libxapian30
1 upgraded, 2 newly installed, 1 to remove and 439 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1204 kB of archives.
After this operation, 3022 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 171920 files and directories currently installed.)
Removing chrony (3.2-4ubuntu4.2) ...
Job for systemd-
See "systemctl status systemd-
dpkg: error processing package chrony (--remove):
installed chrony package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
chrony
E: Sub-process /usr/bin/dpkg returned an error code (1)
I turned off the systemd-timesync ntp and that then allowed chrony to be removed (not quite what I wanted but that is another story):
mark@bigben: /var/log/ chrony$ sudo timedatectl status
Local time: Sat 2020-04-11 10:55:31 UTC
Universal time: Sat 2020-04-11 10:55:31 UTC
RTC time: Sat 2020-04-11 10:55:31
Time zone: Etc/UTC (UTC, +0000) timesyncd. service active: yes
RTC in local TZ: no /var/log/ chrony$ sudo timedatectl set-ntp false /var/log/ chrony$ sudo timedatectl status
Local time: Sat 2020-04-11 10:55:50 UTC
Universal time: Sat 2020-04-11 10:55:50 UTC
RTC time: Sat 2020-04-11 10:55:50
Time zone: Etc/UTC (UTC, +0000) timesyncd. service active: no
RTC in local TZ: no
System clock synchronized: yes
systemd-
mark@bigben:
mark@bigben:
System clock synchronized: yes
systemd-
$ sudo apt --fix-broken install filesystem1. 65.1 libboost- iostreams1. 65.1 libboost- system1. 65.1 libcwidget3v5 libip4tc2 libnspr4 libnss3 python3.6 python3.6-minimal iostreams1. 71.0 libcwidget4 libxapian30 iostreams1. 71.0 libcwidget4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libboost-
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libboost-
Suggested packages:
libcwidget-dev xapian-tools
The following packages will be REMOVED:
chrony
The following NEW packages will be installed:
libboost-
The following packages will be upgraded:
libxapian30
1 upgraded, 2 newly installed, 1 to remove and 439 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1204 kB of archives.
After this operation, 3022 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 171920 files and directories currently installed.)
Removing chrony (3.2-4ubuntu4.2) ...
And then installing chrony again worked.
So it looks like we need to harden the chrony packaging for the world of systemd-timesync in general if we want upgrades to focal with chrony not to have problems.