Bug 1691492 - timedatectl list-timezones fails with No such method “ListTimezones”
Summary: timedatectl list-timezones fails with No such method “ListTimezones”
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: timedatex
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1733511 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-21 18:00 UTC by Matej Marušák
Modified: 2019-08-09 01:02 UTC (History)
14 users (show)

Fixed In Version: timedatex-0.6-1.fc30
Clone Of:
Environment:
Last Closed: 2019-08-09 01:02:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matej Marušák 2019-03-21 18:00:45 UTC
Description of problem:
Executing `timedatectl list-timezones` fails with `No such method "ListTimezones"`

Version-Release number of selected component (if applicable):

systemd-241-3.gitc1f8ff8.fc30.x86_64

How reproducible:
100% on Fedora 30

$ /usr/bin/timedatectl list-timezones
Failed to request list of time zones: No such method “ListTimezones”


Additional info:
I am not sure if upstream is affected as well. I tried building current upstream on F29 and it worked just fine. Also related changes to ListTimezones were introduced almost 3 months ago and it works fine on debian testing with systemd 241-1. Therefore opening BZ as it seems to me only Fedora is affected.

Comment 1 Matej Marušák 2019-03-22 07:50:36 UTC
Problem with this is that service `systemd-timedated.service` is inactive but `timedatex.service` is active. It seems that this is default configuration on F30 (I used this iso: https://dl.fedoraproject.org/pub/fedora/linux/development/30/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-30-20190321.n.0.iso and only booted it without any changes)
If I switch the services around it works as expected.

Comment 2 Artem S. Tashkinov 2019-04-12 10:02:02 UTC
Confirming. I've upgraded from F28.

systemctl stop timedatex.service
systemctl disable timedatex.service

"fixed" the issue while breaking NTP.

So you have to reenable everything and there's no fix at least for me 'cause Fedora says systemd-timedated.service is masked.

Comment 3 Nikolaos Perrakis 2019-06-08 16:11:41 UTC
This also affects me after a fresh install of Fedora MATE 30 after having updated all packages.

Comment 4 Fernando Viñan-Cano 2019-06-21 11:28:05 UTC
I confirm, I was forced to reinstall my Fedora 30 server to a new box this week and found the same issue. No idea if it was affecting my previous machine which was an upgrade from 28->29->30 and no way for me to check.

FYI, this also affects the Cockpit GUI as its drop down for time-zones remains empty and the option for "Automatically using specific NTP servers" is greyed out - this was how I first notice the problem.

Comment 5 Gary Gatling 2019-06-28 00:01:45 UTC
I have a fedora 30 MATE install that was done a couple of days ago on a DELL desktop that has this issue and I have a laptop that was installed with fedora 30 MATE spin around May 8th that is also affected.

Comment 6 gnk 2019-07-07 09:38:01 UTC
systemctl unmask systemd-timedated
systemctl start systemd-timedated

systemctl enable systemd-timedated


timedatectl list-timezones

Comment 7 Fernando Viñan-Cano 2019-07-08 14:13:22 UTC
(In reply to kongdeyuan from comment #6)
> systemctl unmask systemd-timedated
> systemctl start systemd-timedated
> 
> systemctl enable systemd-timedated
> 
> 
> timedatectl list-timezones

Doesn't help

[root@MAGGIE ~]# systemctl unmask systemd-timedated
Removed /etc/systemd/system/systemd-timedated.service.
[root@MAGGIE ~]# systemctl start systemd-timedated
Failed to start systemd-timedated.service: Unit systemd-timedated.service failed to load properly: File exists.
See system logs and 'systemctl status systemd-timedated.service' for details.
[root@MAGGIE ~]# systemctl enable systemd-timedated
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

Comment 8 Zbigniew Jędrzejewski-Szmek 2019-07-21 09:57:21 UTC
Technically, this is a problem with timedatex not implementing the full systemd-timedated interface.
But the best solution would be to simply retire timedatex.
Systemd dropped the support for multiple ntp services, which lead to the need for timedatex, but
that has been since reverted. In fact, the revert commit is in all Fedora versions:
https://github.com/systemd/systemd/commit/5d280742b6.

OK, let's start the procedure to retire timedatex in F30+:
1. add Obsoletes timedatex < 0.6 to systemd
2. retire timedatex package in F31
@mlichvar, are you OK with that?

Comment 9 Zbigniew Jędrzejewski-Szmek 2019-07-22 10:08:57 UTC
I now see that 5d280742b6 added a different interface that doesn't use the .list files.
I'll submit a PR to add back the support for those. So no changes in F<=30 would be done,
and the this bug would only be fixed in F31+.

Comment 10 Miroslav Lichvar 2019-07-22 10:24:32 UTC
I can try to fix this in timedatex, even if it will be for <=F30 only.

If systemd doesn't support the .list interface, we could update the packages providing the NTP services to use the new interface.

In any case, maybe it would be better to propose it on fedora devel first. What are the pros and cons. IIRC there may be some minor regressions wrt chrony support.

Comment 11 Fedora Update System 2019-07-23 09:06:43 UTC
FEDORA-2019-04c25e21ba has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-04c25e21ba

Comment 12 Fedora Update System 2019-07-24 01:44:27 UTC
timedatex-0.6-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-04c25e21ba

Comment 13 Zbigniew Jędrzejewski-Szmek 2019-07-24 12:40:43 UTC
Thanks for the quick response. The PR to add back support for ntp-units.d/ was merged
and should be available in F31+. My understanding is that timedated will then again 
implement full functionality of timedatex, and timedatex can be retired. I'll open
a new ticket for this.

Comment 14 Zbigniew Jędrzejewski-Szmek 2019-07-26 10:45:01 UTC
*** Bug 1733511 has been marked as a duplicate of this bug. ***

Comment 15 Fedora Update System 2019-08-09 01:02:41 UTC
timedatex-0.6-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.