[systemd-bugs] [Bug 80665] New: systemd-analyze plot as root missing hostnamed data
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jun 29 00:59:06 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=80665
Priority: medium
Bug ID: 80665
Assignee: systemd-bugs at lists.freedesktop.org
Summary: systemd-analyze plot as root missing hostnamed data
QA Contact: systemd-bugs at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: steven at uplinklabs.net
Hardware: All
Status: NEW
Version: unspecified
Component: general
Product: systemd
I've noticed that "systemd-analyze plot" is failing to read data owned by
systemd-hostnamed when run as the root user:
$ systemd-analyze plot | grep Linux
<text x="20" y="50">Startup finished in 6.382s (kernel) + 7.912s (userspace) =
14.295s</text><text x="20" y="30">Arch Linux loki (Linux 3.15.2-1-ec2 #1 SMP
Fri Jun 27 04:10:09 UTC 2014) x86-64 </text><g
transform="translate(20.000,100)">
$ sudo systemd-analyze plot | grep Linux
<text x="20" y="50">Startup finished in 6.382s (kernel) + 7.912s (userspace) =
14.295s</text><text x="20" y="30">Linux ( ) x86-64 </text><g
transform="translate(20.000,100)">
Note the lack of kernel version, distribution, hostname, etc. in the latter
case.
hostnamectl correctly reads this data when run as either root or a
non-privileged user.
The difference, from what I can find, is that hostnamectl uses
bus_open_transport() while systemd-analyze uses bus_open_transport_systemd().
This changes which dbus address is used.
bus_open_transport() always sets the address to
"unix:path=/var/run/dbus/system_bus_socket".
When run as an unprivileged user, bus_open_transport_systemd() does the same.
But when run as uid 0, bus_open_transport_systemd() sets the bus address to
"unix:path=/run/systemd/private", which isn't the right address to talk to
systemd-hostnamed.
Commit 1f89214e introduced the use of bus_open_transport_systemd() in
systemd-analyze to allow for "systemd-analyze --user" to function correctly, so
I don't think it's appropriate to just use bus_open_transport() here. I've
confirmed that "systemd-analyze --user" doesn't work without that change.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140629/2c662a94/attachment.html>
More information about the systemd-bugs
mailing list