From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#33270: [SHEPHERD] Wrong error message when missing priviledge Date: Mon, 5 Nov 2018 23:49:44 +0100 Message-ID: <20181105234944.305ce816@scratchpost.org> References: <87muqnwbj0.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/taKn3+hmf50MIS2Fjd5S07T"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJniD-0007b9-8k for bug-guix@gnu.org; Mon, 05 Nov 2018 17:51:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJnh4-0008N7-Am for bug-guix@gnu.org; Mon, 05 Nov 2018 17:50:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJnh3-0008Mo-P6 for bug-guix@gnu.org; Mon, 05 Nov 2018 17:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJnh3-0007oi-Mi for bug-guix@gnu.org; Mon, 05 Nov 2018 17:50:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: 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: =?UTF-8?Q?G=C3=A1bor?= Boskovits Cc: 33270@debbugs.gnu.org --Sig_/taKn3+hmf50MIS2Fjd5S07T Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 dire= ctory =20 >=20 > 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 conne= ct to the profile's shepherd's socket - which is nice, but is not really a *us= er" 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 runni= ng 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 conne= ct 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 whe= re exactly you run it). It's kinda weird to have different endpoints depending on whether one is ro= ot 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). --Sig_/taKn3+hmf50MIS2Fjd5S07T Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlvgyQgACgkQ5xo1VCww uqVEJgf8DgYKMpzG5xnIts6tYIHru/Y6kRlKzwmAeQIo6TC6pI/cPhTwXCEHROZd zKoCxjaUxJ8U2PHRP+Rv0Z6q7AjTcSY8QNTnI6pC6rRa6L6b4rVeOWzViF2rpbj+ oPtZQzMHxuNdx0sMjRmc1s96oljQ1LEXa37gzo1jJMapAOXWQHvX0oqkq3twXW8s c/fix57cZx3wBFca9sFgz1qSUX0AQRkQevmN4EBEca6TKnd/6WEQIEbBea5XhBEt E6FO2b0HIfp1cctIaI2FFxMJW1bUsQCUod3hPvYcwpHrz3zw9ASbfjtpEW+SvKuH bjSqNtMoI10N3vKJTqR0dKNf/mMlOA== =giCs -----END PGP SIGNATURE----- --Sig_/taKn3+hmf50MIS2Fjd5S07T--