From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor?= Boskovits Subject: bug#33270: [SHEPHERD] Wrong error message when missing priviledge Date: Tue, 6 Nov 2018 08:55:49 +0100 Message-ID: References: <87muqnwbj0.fsf@elephly.net> <20181105234944.305ce816@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJwEd-0006Tr-Lz for bug-guix@gnu.org; Tue, 06 Nov 2018 02:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJwEZ-0006JY-LR for bug-guix@gnu.org; Tue, 06 Nov 2018 02:57:15 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJwEP-00067u-JF for bug-guix@gnu.org; Tue, 06 Nov 2018 02:57:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJwEP-0004Lf-H8 for bug-guix@gnu.org; Tue, 06 Nov 2018 02:57:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20181105234944.305ce816@scratchpost.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 33270@debbugs.gnu.org Hello Danny, Danny Milosavljevic ezt =C3=ADrta (id=C5=91pont: 2= 018. nov. 5., H, 23:49): > > Hi Gabor, > > On Mon, 5 Nov 2018 22:57:15 +0100 > G=C3=A1bor Boskovits wrote: > > > > sdb@komputilo ~$ herd status > > > > error: connect: /run/user/30011/shepherd/socket: No such file or di= rectory > > > > 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 con= nect > 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=E2=80=99s instance is not run= ning 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 c= an't > find the stuff in the user shepherd, but I'm not sure I'd like it. I would not like this either. > > Better, we could add "--user" and "--system" options to force herd to con= nect to > some specific shepherd regardless of user, at the cost of hard-coding tha= t 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 w= here > exactly you run it). Could we instead just give a hint like, "if you intended to communicate wit= h the system shepherd, please specify -s system_sepherd_socket_name_here on you command"? > > 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).