Bug 1018335 - various timing parameters have an incorrect USec suffix in systemctl show output, such as RestartUSec, TimeoutUSec, etc.
various timing parameters have an incorrect USec suffix in systemctl show out...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-11 13:38 EDT by Andrew J. Schorr
Modified: 2015-04-27 09:40 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-13 14:11:52 EDT
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 Andrew J. Schorr 2013-10-11 13:38:45 EDT
Description of problem: When you run "systemctl show", various timing parameters have the wrong name.  For example:

bash-4.2$ systemctl show unbound | grep USec
JobTimeoutUSec=0
RestartUSec=100ms
TimeoutUSec=1min 30s
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
WatchdogUSec=0

The suffix in all cases should be "Sec", not "Usec".  Please refer to
the man page.  Compare this to what's in the service files:

bash-4.2$ awk -F= '$1 ~ /Sec$/ {print $1}' /usr/lib/systemd/system/*.service | sort -u
#RestartSec
RestartSec
TimeoutSec
TimeoutStopSec






Version-Release number of selected component (if applicable):
systemd-204-16.fc19.x86_64



How reproducible: Just look at the output from "systemctl show"


Steps to Reproduce:
1. systemctl show unbound | grep USec
2.
3.

Actual results:
JobTimeoutUSec=0
RestartUSec=100ms
TimeoutUSec=1min 30s
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
WatchdogUSec=0



Expected results:
JobTimeoutSec=0
RestartSec=100ms
TimeoutSec=1min 30s
TimeoutStartSec=1min 30s
TimeoutStopSec=1min 30s
WatchdogSec=0



Additional info:
Comment 1 Lennart Poettering 2013-10-13 14:11:52 EDT
Well, "systemctl show" shows low-level properties, as exposed on the bus. They use usec as base unit. The user friendly versions you can specify on unit files however use seconds as base unit. This assymetry is simply because one is a low-level interface, primarily intended for usage in tools, the other being a user-friendly interface for humans.
Comment 2 Andrew J. Schorr 2013-10-13 14:19:19 EDT
That would make sense if the actual values reported were in microsecond units.
But how does it make sense to say:

TimeoutStartUSec=1min 30s

??

I think either of these makes sense:

TimeoutStartUSec=90000000

or

TimeoutStartSec=1min 30s

But the choice you have made seems very strange to me.  I obviously have zero votes in this matter, but the current behavior is very counterintuitive.

Regards,
Andy
Comment 3 Andrew J. Schorr 2013-10-13 14:20:39 EDT
Actually, on 2nd thought, what would make more sense is to avoid having a unit of time in the parameter's name.  Shouldn't it simply be:

TimeoutStartTime=1min 30s

?

That makes infinitely more sense to me.

Regards,
Andy
Comment 4 Lennart Poettering 2013-10-13 14:23:33 EDT
Well, we really shouldn't rename the bus properties in systemctl show. If you want the rawest values possible you can use "gdbus introspect" on the units, which will show you the usec values actually as integers.

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