unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: 33270@debbugs.gnu.org
Subject: bug#33270: [SHEPHERD] Wrong error message when missing priviledge
Date: Mon, 5 Nov 2018 23:49:44 +0100	[thread overview]
Message-ID: <20181105234944.305ce816@scratchpost.org> (raw)
In-Reply-To: <CAE4v=phMy1QLf+T5VyP+9h8wN5xG+xrXHVqcAWQTUgiP9Rhi2g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

Hi Gabor,

On Mon, 5 Nov 2018 22:57:15 +0100
Gábor Boskovits <boskovits@gmail.com> wrote:
> > > sdb@komputilo ~$ herd status
> > > error: connect: /run/user/30011/shepherd/socket: No such file or directory  
> 
> Actually this seems to be a message that can be translated to
> 'shepherd user instance is not running' am I correct?

Yes, that's what it means.  For a UNIX error message, what it's saying
is actually quite close to what it really means. :)

I would suggest to keep the file name in the error message anyway,
but no harm in adding some extra information (it will slightly complicate
the socket discovery code, but that's okay.  Also, right now profiles can
actually set up XDG_RUNTIME_DIR to point somewhere else and make herd connect
to the profile's shepherd's socket - which is nice, but is not really a *user"
shepherd then anymore).

Also, we should suppress the stack trace for this specific error since it
really doesn't add anything useful.

> > The error could be that either the user’s instance is not running or
> > that the user meant to communicate with the init system.  It is not
> > obvious to me how to distinguish these two errors.

I don't think it's possible to distinguish these.

It would be possible to make herd fallback to the system shepherd if it can't
find the stuff in the user shepherd, but I'm not sure I'd like it.

Better, we could add "--user" and "--system" options to force herd to connect to
some specific shepherd regardless of user, at the cost of hard-coding that there
are only these two (which is not actually the case - shepherd is meant to be
used in a modular way and doesn't care one way or another how often and where
exactly you run it).

It's kinda weird to have different endpoints depending on whether one is root or
not, but as a default it has precedent in both dbus and systemd.

I think people can get used to it (we should document it).

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-11-05 22:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05  9:55 bug#33270: [SHEPHERD] Wrong error message when missing priviledge swedebugia
2018-11-05 19:48 ` Ricardo Wurmus
2018-11-05 21:57   ` Gábor Boskovits
2018-11-05 22:49     ` Danny Milosavljevic [this message]
2018-11-06  7:55       ` Gábor Boskovits

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181105234944.305ce816@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=33270@debbugs.gnu.org \
    --cc=boskovits@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).