After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781173 - systemd: Throw a descriptive warning if badly setup
systemd: Throw a descriptive warning if badly setup
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-11 10:17 UTC by Bastien Nocera
Modified: 2017-05-30 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
systemd: Throw a descriptive warning if badly setup (1.46 KB, patch)
2017-04-11 10:17 UTC, Bastien Nocera
committed Details | Review
systemd: Add more details to systemd setup error (1.28 KB, patch)
2017-05-30 10:08 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2017-04-11 10:17:32 UTC
.
Comment 1 Bastien Nocera 2017-04-11 10:17:48 UTC
Created attachment 349663 [details] [review]
systemd: Throw a descriptive warning if badly setup

Instead of throwing:
GLib-GIO-CRITICAL: g_dbus_connection_call_internal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed
Throw a warning explaining why we got into this situation.

Experienced while working on gnome-settings-daemon's power test suite.
The new error message is more descriptive than the original
warning/assertion.
Comment 2 Ray Strode [halfline] 2017-04-11 17:27:25 UTC
Review of attachment 349663 [details] [review]:

this is probably fine, but one thing i'm worried about is the message potentially getting printed over and over again. it looks like we already warn up front, though:

        if (manager->priv->session_id == NULL) {•
                g_warning ("Could not get session id for session. Check that logind is "•
                           "properly installed and pam_systemd is getting used at login.");•
                return;•


So maybe just return without the g_warning? but whatever you want to do.
Comment 3 Bastien Nocera 2017-05-30 10:00:51 UTC
(In reply to Ray Strode [halfline] from comment #2)
> Review of attachment 349663 [details] [review] [review]:
> 
> this is probably fine, but one thing i'm worried about is the message
> potentially getting printed over and over again.

I think you'd find out pretty fast that gnome-session wasn't working, and it replaces an inscrutable looping warning with a readable one. So I'll push that, and we'll see if somebody complains about it later.
Comment 4 Bastien Nocera 2017-05-30 10:08:42 UTC
Created attachment 352861 [details] [review]
systemd: Add more details to systemd setup error

By adding the contents of the error reported.
Comment 5 Bastien Nocera 2017-05-30 10:10:19 UTC
Attachment 349663 [details] pushed as 015c142 - systemd: Throw a descriptive warning if badly setup
Attachment 352861 [details] pushed as fd122ed - systemd: Add more details to systemd setup error