From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2432 Path: news.gmane.org!.POSTED!not-for-mail From: "David Mountney via supervision" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: wrong exit code for sv status in lsb mode Date: Fri, 4 Jan 2019 17:10:13 -0800 Message-ID: Reply-To: David Mountney NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000009d8f5057eaba9ce" X-Trace: blaine.gmane.org 1546650499 28963 195.159.176.226 (5 Jan 2019 01:08:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 5 Jan 2019 01:08:19 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2022-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jan 05 02:08:15 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gfaRi-0007RQ-MV for gcsg-supervision@m.gmane.org; Sat, 05 Jan 2019 02:08:15 +0100 Original-Received: (qmail 5669 invoked by uid 89); 5 Jan 2019 01:10:52 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5662 invoked from network); 5 Jan 2019 01:10:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gitlab.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=63eDNtScERUyI83bmrfuLP07ht2HsCSnIRwtlGV9Q2E=; b=UHV5LNqHNm+zMBz/POxBEDwhuo/1K55QU11PpLkLn8LhJV+C1MiABND0nphdEbsIuv jzn7chIBGbT8Lnd3pxz6M2+djpqyAKR7fXQTpRmAj8p1jkHyfsk3q8jhp7u8xGHpNeta mFP0D8BZ5tY11ti7OhO91hXnh5PGpd0Jv9eko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=63eDNtScERUyI83bmrfuLP07ht2HsCSnIRwtlGV9Q2E=; b=IT3aC4x1+6sfbToL2AETzR27Uou14+lz/stutkITeN7nlPhc2ESLWBD8GENIFy2n4D HgGLFp1GI0j7waoDmxsCrn9K/3wxIq628gmhy77N60lo87Q2pn4ZTdpt/Qco8Lk6jLLe nkIoFS40/geTMLjaaJUrIVGvVH9WPvvxWhrNolywrTtUP1Qec4BE+zaT4zbOqPwa1pXY nbuKtEutSpnDEtMzRnugtm03NHR3VnSpO3NwkF5UmHytJ/q3NsRQC6TP9TLuQD7FzArI StVpQuqckJEfXxYiELyJCGVGGkRETZCafGQUqeVRfkuVMi5p3hWGmZpTuy3KSsACveSJ V75Q== X-Gm-Message-State: AJcUukfE0tGS+6Kp8xhkoLnMszoyP8HHG9O3QTaS+zbQPeEeHxP3+YfR ER2m/2aiHHy/51UfiL6cU+9OrC6TEpXiuY/bS6RC5U+QM0giRQ== X-Google-Smtp-Source: ALg8bN6jAS+EZbP8EPe3GwHQR0z/E5ByUIrrTHZ+zwMIj+19dqAdachP/i6h6v80hCPLmiVLGp0KVgR+jDbKhKnlXxo= X-Received: by 2002:a9d:3a0a:: with SMTP id j10mr36258381otc.229.1546650624044; Fri, 04 Jan 2019 17:10:24 -0800 (PST) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2432 Archived-At: --00000000000009d8f5057eaba9ce Content-Type: text/plain; charset="UTF-8" This looks like it's still a problem introduced in runit 2.1.2 If you have defined a log handler, only the status of the log handler is returned by sv status. Its not clear to me from the changelog why this change was made. I guess, ideally if the service status was successful, you could then also check the log status, but as it is now, if the service is down, but the log is up, sv status reports all is well for its exit codes. I've seen other references to this bug, where projects have reverted to the previous runit version: https://github.com/chef/omnibus-software/pull/793 It would be ideal if we could just get this fixed. > From: Fabian Ruff > Date: Tue, 18 Aug 2015 23:33:50 +0200 > Tue, 18 Aug 2015 23:33:50 +0200 > Hi, > I just noticed that the exit code of sv status in "lsb" mode is not 3 in > all cases when > the service is "down". > The problem arises when a service defines a log handler. In that case the > return code > of svstatus print for the log process overwrites the return code of > svstatus print of > the actual supervised process (line 170 of sv.c). > Is this intentional? Looks like a bug to me. > Kind regards, --00000000000009d8f5057eaba9ce--