Bug 239124 - sysutils/nomad fix daemon to send output to syslog.
Summary: sysutils/nomad fix daemon to send output to syslog.
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: John Hixson
URL:
Keywords:
Depends on: 239144
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-11 00:08 UTC by Tara
Modified: 2020-07-11 06:36 UTC (History)
2 users (show)

See Also:
jhixson: maintainer-feedback+


Attachments
patch for nomad to use daemon -S -T nomad (560 bytes, text/plain)
2019-07-11 00:08 UTC, Tara
no flags Details
make a flag var for daemon output, so it can be re-configured in the future (621 bytes, patch)
2019-07-11 15:45 UTC, Tara
no flags Details | Diff
set rc_daemon_output_flags and allow override. (622 bytes, patch)
2019-07-11 16:21 UTC, Tara
no flags Details | Diff
make a flag var for daemon output, so it can be re-configured in the future (623 bytes, patch)
2019-07-11 16:26 UTC, Tara
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tara 2019-07-11 00:08:10 UTC
Created attachment 205678 [details]
patch for nomad to use daemon -S -T nomad

nomad runs daemon -f which forces all output of nomad to /dev/null, which makes it terrible to debug when something goes wrong at startup.

change this to daemon -S -T nomad, so logs go to syslog and tagged with 'nomad', so that it's much easier to tell when something is going wrong.

see attached diff.
Comment 1 Tara 2019-07-11 15:45:02 UTC
Created attachment 205694 [details]
make a flag var for daemon output, so it can be re-configured in the future

This is a possible today solution for #239144.
Comment 2 Tara 2019-07-11 16:21:30 UTC
Created attachment 205700 [details]
set rc_daemon_output_flags and allow override.

per IRC discussion #freebsd RhodiumToad and kevans91 got me schooled in :${foo=bar} so now an RC script can override rc_daemon_output_flags if needed, for example an easier way to debug which can be done outside of this script.
Comment 3 Tara 2019-07-11 16:26:18 UTC
Created attachment 205701 [details]
make a flag var for daemon output, so it can be re-configured in the future
Comment 4 Pietro Cerutti freebsd_committer freebsd_triage 2019-07-22 10:01:36 UTC
I made a comment on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239144#c3
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-07-25 03:37:09 UTC
A commit references this bug:

Author: jhixson
Date: Thu Jul 25 03:36:36 UTC 2019
New revision: 507310
URL: https://svnweb.freebsd.org/changeset/ports/507310

Log:
  sysutils/nomad: add nomad_debug rc flag to log to syslog if enabled

  PR:	239124
  Submitted by:	tara@anne.cat

Changes:
  head/sysutils/nomad/Makefile
  head/sysutils/nomad/files/nomad.in
Comment 6 John Hixson freebsd_committer freebsd_triage 2019-07-25 03:41:28 UTC
Committed with changes. Thanks!
Comment 7 Tara 2019-07-26 01:58:23 UTC
(In reply to John Hixson from comment #6)
Hi !

Thanks for committing.  If you look at bug #239144 the idea is to have a common way to specify debugging, so it's easy to do across all ports that use daemon(and hopefully eventually all ports).  The way you committed it, makes debug specific to nomad, which makes it very hard to generalize.

I'd love your thoughts on #239144.
Comment 8 John Hixson freebsd_committer freebsd_triage 2019-07-26 04:02:49 UTC
Tara,

I agree with the idea and what you desire. I've had to resort to doing this myself as well. Currently, it is not in place so that is why I'm not committing the script with an rc_* variable name. If this gains traction, then I'll happily change it. I have no objections and would like to see this idea implemented. 

- John