From owner-freebsd-bugs@FreeBSD.ORG Sun Apr 5 02:54:49 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF9E0D78 for ; Sun, 5 Apr 2015 02:54:48 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C56CCA31 for ; Sun, 5 Apr 2015 02:54:48 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t352smgU060966 for ; Sun, 5 Apr 2015 02:54:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 199150] /etc/rc.d/pflog always emits "starting pflogd:" Date: Sun, 05 Apr 2015 02:54:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jason.unovitch@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 02:54:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199150 --- Comment #2 from jason.unovitch@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 ` commands are below. ===== EXAMPLE OF PUPPET ISSUE ===== root@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@myrtr:/etc/rc.d # service pflog start Starting pflog0. Starting pflog1. Starting pflog2. root@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@myrtr:/etc/rc.d # service pflog rcvar # pflog0 # pflog_enable="YES" # (default: "") # pflog1 # pflog_enable="YES" # (default: "") # pflog2 # pflog_enable="YES" # (default: "") root@myrtr:/etc/rc.d # service pflog enabled root@myrtr:/etc/rc.d # service pflog reload root@myrtr:/etc/rc.d # service pflog resync # (All display no output) root@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@myrtr:/etc/rc.d # service pflog poll Waiting for PIDS: 57645 # ... root@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@myrtr:/etc/rc.d # service pflog start Starting pflog. root@myrtr:/etc/rc.d # service pflog restart Stopping pflog. Waiting for PIDS: 71252. Starting pflog. root@myrtr:/etc/rc.d # service pflog rcvar # pflog # pflog_enable="YES" # (default: "") root@myrtr:/etc/rc.d # service pflog enabled root@myrtr:/etc/rc.d # service pflog reload root@myrtr:/etc/rc.d # service pflog resync # (All display no output) root@myrtr:/etc/rc.d # service pflog status pflog is running as pid 72503. root@myrtr:/etc/rc.d # service pflog poll Waiting for PIDS: 72503 # ... root@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.