Bug 1254287 - Option "--all" in "systemctl --all list-timers" doesn't list inactive timers
Option "--all" in "systemctl --all list-timers" doesn't list inactive timers
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
22
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-17 11:47 EDT by Edgar Hoch
Modified: 2016-02-10 09:47 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-10 09:47:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Edgar Hoch 2015-08-17 11:47:49 EDT
Description of problem:
Option "--all" in "systemctl --all list-timers" doesn't list inactive timers.
See description 

Here the definition of option "--all" from "man systemctl":
           When listing units, show all loaded units, regardless of their state, including inactive units. When showing unit/job/manager properties, show all properties regardless whether they are set or not.


Version-Release number of selected component (if applicable):
systemd-219-21.fc22.x86_64

How reproducible:
Alwaysx.

Steps to Reproduce:
1. Call "systemctl list-timers" in a (root) shell 
2. Call "systemctl --all list-timers" in a (root) shell.
3. Note of there is a difference in the output.
4. Compare the output with the files in /usr/lib/systemd/system/*.timer
   or the output of "systemctl list-unit-files | grep timer"
5. If you want to test a specific timer,
   install for example package dnf-automatic,
   then call the following commands:
   dnf install dnf-automatic
   systemctl --all list-timers
   systemctl enable dnf-automatic.timer
   systemctl --all list-timers
   systemctl disable dnf-automatic.timer
   systemctl --all list-timers


Actual results:
The output of step 1 and 2 are the same.
Inactive timers are not listet in step 1 and step 2.
In step 5 dnf-automatic.timer is listed only if it was enabled.

Expected results:
The output of step 1 and 2 should differ
if there are inactive timers.
Inactive timers should be listet in step 2, but not in step 1.
In step 5 dnf-automatic.timer should be always listed.

Additional Information:
The timer is listed if it is enabled or is active.

The timer is loaded, but not listed if it is disabled or inactive.

# systemctl status dnf-automatic.timer 
● dnf-automatic.timer - dnf-automatic timer
   Loaded: loaded (/usr/lib/systemd/system/dnf-automatic.timer; disabled; vendor preset: disabled)
   Active: inactive (dead)
Comment 1 Lennart Poettering 2016-02-10 09:47:04 EST
See the man page of "systemctl":

       -a, --all
           When listing units, show all loaded units, regardless of their state, including inactive units. […]

           To list all units installed on the system, use the list-unit-files command instead.

Basically, --all doesn't do what you think it does. Use "systemctl list-unit-files" if you want to see all unit files on disk, which includes timers which aren't enabled.

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