Bug 239124

Summary: sysutils/nomad fix daemon to send output to syslog.
Product: Ports & Packages Reporter: Tara <tara>
Component: Individual Port(s)Assignee: John Hixson <jhixson>
Status: Open ---    
Severity: Affects Many People CC: gahr, kevans
Priority: --- Flags: jhixson: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on: 239144    
Bug Blocks:    
Attachments:
Description Flags
patch for nomad to use daemon -S -T nomad
none
make a flag var for daemon output, so it can be re-configured in the future
none
set rc_daemon_output_flags and allow override.
none
make a flag var for daemon output, so it can be re-configured in the future none

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 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 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 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 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