From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2516 Path: news.gmane.org!.POSTED.blaine.gmane.org!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: Wed, 13 Mar 2019 13:32:56 -0700 Message-ID: References: <20190108081147.11948.qmail@83e0cb8f62b7f0.315fe32.mid.smarden.org> <20190313080407.5662.qmail@f0acb20213ddef.315fe32.mid.smarden.org> Reply-To: David Mountney Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009df38d0583ffb64c" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="126726"; mail-complaints-to="usenet@blaine.gmane.org" To: supervision@list.skarnet.org Original-X-From: supervision-return-2106-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Mar 13 21:33: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.89) (envelope-from ) id 1h4AYq-000WmH-0J for gcsg-supervision@m.gmane.org; Wed, 13 Mar 2019 21:33:12 +0100 Original-Received: (qmail 5123 invoked by uid 89); 13 Mar 2019 20:33:36 -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 5116 invoked from network); 13 Mar 2019 20:33:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gitlab.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KH53Y36dOsT4yq7+poymIOdUByD4FTUoK2xK9O7tBtQ=; b=V6J/dxYXYugovHujFVxoJgK5a5YjzjtWUipKEOR5xhx+qPUPZK9ader/kLFPzHnaY1 gSLSAJxiOAXwjzCMzsBiFqgAK5xp5iOz+YdPndiZQpuiVl0Gy6zdGtLTVMIwh4/IgOuh KEIK68xIitsBn80HQ8yNe3LoOwTiZvTaN0cl0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KH53Y36dOsT4yq7+poymIOdUByD4FTUoK2xK9O7tBtQ=; b=JImCSoyq2YqP+7XWSy+l/IXoecTqcw0F0UVHotB888J8X8/tO6kHSDdxovSmtA8dgc jzCIlSANYapEKhmDgM/inA79WBgPwDXKBI9/X9ldDXt+vlg0642rH5mSbj+xTbFn+s/v dTypvsNTLU2nwdAtRwa9JTDb3Rq0LyL0quv5xgcHbvN8+3OWCFAOvCAPIPEQRWRTA32b cq6e8xAPY7S7JF/7MOTTicxuNkG/vsbP1D2+v7zFl3czCon8qluEFmJTNrC+WHIUDDdI FMb6g8jG3ynL5CpmVnWk/fD0UQyhd+oxHriJZEK8EhyIqwfIaAODsecZzmX746GCjXyk m2wA== X-Gm-Message-State: APjAAAXJuTJVZXF0IlllnY9vkkfnie11prN0nEUwYpqwRir7kLceSW/K 9enUKFqPxKjwRBRt++tP3Ao5hJ34mfYF/wvVJpAmfIO/k6c= X-Google-Smtp-Source: APXvYqxkDnzIPAp2uwfv8ZGymiFCctqB+tRarWUf7VP/0dEnkzHIxKkB5ooXJCdkfTvwqoismT6/vXXSeDiwjNVgK6U= X-Received: by 2002:a25:81c3:: with SMTP id n3mr24180141ybm.51.1552509187246; Wed, 13 Mar 2019 13:33:07 -0700 (PDT) In-Reply-To: <20190313080407.5662.qmail@f0acb20213ddef.315fe32.mid.smarden.org> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2516 Archived-At: --0000000000009df38d0583ffb64c Content-Type: text/plain; charset="UTF-8" We went ahead and applied the patch in GitLab back in January: https://gitlab.com/gitlab-org/omnibus-gitlab/commit/cdecb4ecc52f8f9aa845df5e73473f2b3af291b0 And it's worked fine for our use of it there. On Wed, Mar 13, 2019 at 1:11 AM Gerrit Pape wrote: > On Tue, Jan 08, 2019 at 08:19:30AM -0800, David Mountney via supervision > wrote: > > The error was introduced in commit > 5fe1bc773c2d979093fe4b1f3ecbbed5e6acdaf0 > > "sv.c: properly format status command's output on failure cases." > > > > Where the log status is being saved to the same variable as the service > > status. The quick fix would be to not record the log status for now: > > > > $ git diff src/sv.c > > diff --git a/src/sv.c b/src/sv.c > > index 9003142..1676227 100644 > > --- a/src/sv.c > > +++ b/src/sv.c > > @@ -167,7 +167,7 @@ int status(char *unused) { > > } > > else { > > outs("; "); > > - if (svstatus_get()) { rc =svstatus_print("log"); outs("\n"); } > > + if (svstatus_get()) { svstatus_print("log"); outs("\n"); } > > } > > islog =0; > > flush(""); > > $ > > Thanks for the patch, David. > > I'm looking forward to do a maintenance release of runit eventually and > am collecting patches. I'm about to apply this one, has anyone applied > it already and can provide feedback? > > Regards, Gerrit. > --0000000000009df38d0583ffb64c--