[Bug 199150] /etc/rc.d/pflog always emits "starting pflogd:"
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Apr 5 02:54:49 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199150
--- Comment #2 from jason.unovitch at gmail.com ---
Thank for opening this. There is a bit more to the issue than just printing
the output you noted. For one, it breaks Puppet because Puppet is removing the
leading '#' markers and gets mixed up when it sees "Starting pflog" (ref [1]
lines 22-28).
I saw this a while ago and commented the 'echo' line out out but seeing the PR
on the mailing list reminded me I needed to to make a real patch. Sorry for
not opening this sooner, but it's still plenty early enough to get this in for
10.2-RELEASE and 11.0-RELEASE. The multiple instance support was implemented
in an earlier PR [2] and I just updated that PR with a request for the
submitter and committer to review this PR.
The fixed version is available with:
fetch -o /etc/rc.d/pflog
https://raw.githubusercontent.com/junovitch/my-freebsd-build/master/patches/PR199150.pflog
Test cases that show the expected output from the various `service pflog
<command>` commands are below.
===== EXAMPLE OF PUPPET ISSUE =====
root at myrtr:/etc/rc.d # puppet agent --test
...
Error: /Stage[main]/Soekris::Service::Pf/Service[pflog]: Could not evaluate:
rcvar value is empty
===== POST-PATCH MULTIPLE PFLOG CONFIGURATION =====
/etc/rc.conf
pflog_enable="YES"
/etc/rc.conf.d/pflog
pflog_instances="pflog0 pflog1 pflog2"
pflog_pflog0_dev="pflog0"
pflog_pflog0_logfile="/var/log/pflog0"
pflog_pflog1_dev="pflog1"
pflog_pflog1_logfile="/var/log/pflog1"
pflog_pflog2_dev="pflog2"
pflog_pflog2_logfile="/var/log/pflog2"
===== POST-PATCH MULTIPLE PFLOG TEST CASES =====
root at myrtr:/etc/rc.d # service pflog start
Starting pflog0.
Starting pflog1.
Starting pflog2.
root at myrtr:/etc/rc.d # service pflog restart
Stopping pflog0.
Waiting for PIDS: 55175.
Starting pflog0.
Stopping pflog1.
Waiting for PIDS: 55826.
Starting pflog1.
Stopping pflog2.
Waiting for PIDS: 56253.
Starting pflog2.
root at myrtr:/etc/rc.d # service pflog rcvar
# pflog0
#
pflog_enable="YES"
# (default: "")
# pflog1
#
pflog_enable="YES"
# (default: "")
# pflog2
#
pflog_enable="YES"
# (default: "")
root at myrtr:/etc/rc.d # service pflog enabled
root at myrtr:/etc/rc.d # service pflog reload
root at myrtr:/etc/rc.d # service pflog resync
# (All display no output)
root at myrtr:/etc/rc.d # service pflog status
pflog0 is running as pid 57645.
pflog1 is running as pid 58831.
pflog2 is running as pid 60086.
root at myrtr:/etc/rc.d # service pflog poll
Waiting for PIDS: 57645
# ...
root at myrtr:/etc/rc.d # service pflog stop
Stopping pflog0.
Waiting for PIDS: 57645.
Stopping pflog1.
Waiting for PIDS: 58831.
Stopping pflog2.
Waiting for PIDS: 60086.
===== POST-PATCH SINGLE PFLOG CONFIGURATION =====
/etc/rc.conf
pflog_enable="YES"
===== POST-PATCH SINGLE PFLOG TEST CASES =====
root at myrtr:/etc/rc.d # service pflog start
Starting pflog.
root at myrtr:/etc/rc.d # service pflog restart
Stopping pflog.
Waiting for PIDS: 71252.
Starting pflog.
root at myrtr:/etc/rc.d # service pflog rcvar
# pflog
#
pflog_enable="YES"
# (default: "")
root at myrtr:/etc/rc.d # service pflog enabled
root at myrtr:/etc/rc.d # service pflog reload
root at myrtr:/etc/rc.d # service pflog resync
# (All display no output)
root at myrtr:/etc/rc.d # service pflog status
pflog is running as pid 72503.
root at myrtr:/etc/rc.d # service pflog poll
Waiting for PIDS: 72503
# ...
root at myrtr:/etc/rc.d # service pflog stop
Stopping pflog.
Waiting for PIDS: 72503.
===== REFERENCES =====
[1]
https://github.com/puppetlabs/puppet/blob/cb4ad1f19b043a70ba17e4103a25f5c97a76948b/lib/puppet/provider/service/freebsd.rb
[2] https://bugs.freebsd.org/158171
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list