From owner-freebsd-rc@FreeBSD.ORG Mon Mar 5 11:07:17 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A91BD106567A for ; Mon, 5 Mar 2012 11:07:17 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 968938FC20 for ; Mon, 5 Mar 2012 11:07:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q25B7Hxh035007 for ; Mon, 5 Mar 2012 11:07:17 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q25B7GrX035005 for freebsd-rc@FreeBSD.org; Mon, 5 Mar 2012 11:07:16 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Mar 2012 11:07:16 GMT Message-Id: <201203051107.q25B7GrX035005@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-rc@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-rc@FreeBSD.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 11:07:17 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/164393 rc [rc.d] restarting netif with static addresses doesn't o conf/163508 rc [rc.subr] [patch] Add "enable" and "disable" commands o conf/163488 rc Confusing explanation in defaults/rc.conf o conf/163321 rc [rc.conf] [patch] allow _fib syntax in rc.conf o conf/162642 rc .sh scripts in /usr/local/etc/rc.d get executed, not s p kern/161899 rc [route] ntpd(8): Repeating RTM_MISS packets causing hi o conf/161107 rc [rc] stop_boot in mountcritlocal usage is incorrect. o conf/160403 rc [rc] [patch] concurrently running rc-scripts during bo o conf/160240 rc rc.d/mdconfig and mdconfig2 should autoset $_type to v o conf/159846 rc [rc.conf] routing_stop_inet6() logic doesn't handle ip o conf/158557 rc [patch] /etc/rc.d/pf broken messages o conf/158127 rc [patch] remount_optional option in rc.initdiskless doe o conf/153666 rc [rc.d][patch] mount filesystems from fstab over zfs da o conf/153200 rc post-boot /etc/rc.d/network_ipv6 start can miss neighb o conf/153123 rc [rc] [patch] add gsched rc file to automatically inser o conf/150474 rc [patch] rc.d/accounting: Add ability to set location o o conf/149867 rc [PATCH] rc.d script to manage multiple FIBS (kern opti o conf/149831 rc [PATCH] add support to /etc/rc.d/jail for delegating Z o conf/148656 rc rc.firewall(8): {oip} and {iip} variables in rc.firewa o conf/147685 rc [rc.d] [patch] new feature for /etc/rc.d/fsck o conf/147444 rc [rc.d] [patch] /etc/rc.d/zfs stop not called on reboot o conf/146053 rc [patch] [request] shutdown of jails breaks inter-jail o conf/145445 rc [rc.d] error in /etc/rc.d/jail (bad logic) o conf/145399 rc [patch] rc.d scripts are unable to start/stop programs o conf/145009 rc [patch] rc.subr(8): rc.conf should allow mac label con o conf/144213 rc [rc.d] [patch] Disappearing zvols on reboot o conf/143637 rc [patch] ntpdate(8) support for ntp-servers supplied by o conf/143085 rc [patch] ftp-proxy(8) rc(8) with multiple instances o conf/142973 rc [jail] [patch] Strange counter init value in jail rc o conf/142434 rc [patch] Add cpuset(1) support to rc.subr(8) o conf/142304 rc rc.conf(5): mdconfig and mdconfig2 rc.d scripts lack e o conf/141909 rc rc.subr(8): [patch] add rc.conf.d support to /usr/loca o conf/141907 rc [rc.d] Bug if mtu (maybe others?) is set as first argu o conf/141678 rc [patch] A minor enhancement to how /etc/rc.d/jail dete o conf/141275 rc [request] dhclient(8) rc script should print something o conf/140440 rc [patch] allow local command files in rc.{suspend,resum o conf/140261 rc [patch] Improve flexibility of mdconfig2 startup scrip o conf/138208 rc [rc.d] [patch] Making rc.firewall (workstation) IPv6 a o conf/137629 rc [rc.d] background_dhclient rc.conf option causing doub o conf/137470 rc [PATCH] /etc/rc.d/mdconfig2 : prioritize cli parameter o conf/137271 rc [rc.d] Cannot update /etc/host.conf when root filesyst o conf/136624 rc [rc.d] sysctl variables for ipnat are not applied on b o conf/135338 rc [rc.d] pf startup order seems broken [regression] o conf/134918 rc [patch] rc.subr fails to detect perl daemons o conf/134660 rc [patch] rc-script for initializing ng_netflow+ng_ipfw o conf/134333 rc PPP configuration problem in the rc.d scripts in combi o conf/134006 rc [patch] Unload console screensaver kernel modules if s o conf/133890 rc [patch] sshd(8): add multiple profiles to the rc.d scr o conf/132483 rc rc.subr(8) [patch] setfib(1) support for rc.subr o conf/128299 rc [patch] /etc/rc.d/geli does not mount partitions using o conf/126392 rc [patch] rc.conf ifconfig_xx keywords cannot be escaped p bin/126324 rc [patch] rc.d/tmp: Prevent mounting /tmp in second tim o conf/124747 rc [patch] savecore can't create dump from encrypted swap o conf/124248 rc [jail] [patch] add support for nice value for rc.d/jai o conf/123734 rc [patch] Chipset VIA CX700 requires extra initializatio o conf/123222 rc [patch] Add rtprio(1)/idprio(1) support to rc.subr(8). o conf/123119 rc [patch] rc script for ipfw does not handle IPv6 o conf/122968 rc [rc.d] /etc/rc.d/addswap: md swapfile multiplication a o conf/122477 rc [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring o conf/122170 rc [patch] [request] New feature: notify admin via page o o kern/121566 rc [nfs] [request] [patch] ethernet iface should be broug o conf/120406 rc [devd] [patch] Handle newly attached pcm devices (eg. o conf/119874 rc [patch] "/etc/rc.d/pf reload" fails if there are macro o conf/119076 rc [patch] [rc.d] /etc/rc.d/netif tries to remove alias a o bin/118325 rc [patch] [request] new periodic script to test statuses o conf/118255 rc savecore never finding kernel core dumps (rcorder prob o conf/117935 rc [patch] ppp fails to start at boot because of missing o conf/113915 rc [patch] ndis wireless driver fails to associate when i o conf/109980 rc /etc/rc.d/netif restart doesn't destroy cloned_interfa o conf/108589 rc rtsol(8) fails due to default ipfw rules o conf/106009 rc [ppp] [patch] [request] Fix pppoed startup script to p o conf/105689 rc [ppp] [request] syslogd starts too late at boot o conf/105145 rc [ppp] [patch] [request] add redial function to rc.d/pp o conf/104549 rc [patch] rc.d/nfsd needs special _find_processes functi o conf/102700 rc [geli] [patch] Add encrypted /tmp support to GELI/GBDE o conf/99721 rc [patch] /etc/rc.initdiskless problem copy dotfile in s o conf/99444 rc [patch] Enhancement: rc.subr could easily support star o conf/96343 rc [patch] rc.d order change to start inet6 before pf o conf/93815 rc [patch] Adds in the ability to save ipfw rules to rc.d o conf/92523 rc [patch] allow rc scripts to kill process after a timeo o conf/89870 rc [patch] [request] make netif verbose rc.conf toggle o conf/88913 rc [patch] wrapper support for rc.subr o conf/85819 rc [patch] script allowing multiuser mode in spite of fsc o kern/81006 rc ipnat not working with tunnel interfaces on startup o conf/77663 rc Suggestion: add /etc/rc.d/addnetswap after addcritremo o conf/73677 rc [patch] add support for powernow states to power_profi o conf/58939 rc [patch] dumb little hack for /etc/rc.firewall{,6} o conf/56934 rc [patch] rc.firewall rules for natd expect an interface o conf/44170 rc [patch] Add ability to run multiple pppoed(8) on start 89 problems total. From owner-freebsd-rc@FreeBSD.ORG Wed Mar 7 20:38:05 2012 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B0B106564A for ; Wed, 7 Mar 2012 20:38:05 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from mail.mroute.net (lax-gw12.mailroute.net [199.89.0.112]) by mx1.freebsd.org (Postfix) with ESMTP id B3B778FC1A for ; Wed, 7 Mar 2012 20:38:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lax-gw12.mroute.net (Postfix) with ESMTP id 774CC3270BEF for ; Wed, 7 Mar 2012 20:18:25 +0000 (UTC) X-Virus-Scanned: by MailRoute Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by lax-gw12.mroute.net (Postfix) with ESMTP id A691B3270BEC for ; Wed, 7 Mar 2012 20:18:24 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id A193516DA; Wed, 7 Mar 2012 12:18:24 -0800 (PST) From: merlyn@stonehenge.com (Randal L. Schwartz) To: rc@freebsd.org x-mayan-date: Long count = 12.19.19.3.11; tzolkin = 1 Chuen; haab = 19 Kayab Date: Wed, 07 Mar 2012 12:18:24 -0800 Message-ID: <86r4x4dv1r.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: need a shim between postgresql and pgpool startup X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:38:05 -0000 [not on list... please keep me cc'ed] Apparently, the postgresql start returns before postgresql is fully "warmed up". The next thing I start is pgpool, and pgpool aborts if it can't connect to postgres. What would the best way be to insert a 2 second delay between the two starts, or better yet, ensure pg was up before pgpool started, *without* editing the rc.d file from either of the ports (I hate having local mods like that). I'm thinking of adding some sort of pgpool_startpre, or maybe a shim that uses requires postgresql and before pgpool. Can I put pgpool_startpre() in my rc.conf file? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion From owner-freebsd-rc@FreeBSD.ORG Wed Mar 7 20:38:09 2012 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 985DB106568E for ; Wed, 7 Mar 2012 20:38:09 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from mail.mroute.net (lax-gw06.mailroute.net [199.89.0.106]) by mx1.freebsd.org (Postfix) with ESMTP id 826408FC17 for ; Wed, 7 Mar 2012 20:38:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lax-gw06.mroute.net (Postfix) with ESMTP id 9B5DFCBCE for ; Wed, 7 Mar 2012 20:21:01 +0000 (GMT) X-Virus-Scanned: by MailRoute Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by lax-gw06.mroute.net (Postfix) with ESMTP id 8B9E8CBBC for ; Wed, 7 Mar 2012 20:20:45 +0000 (GMT) Received: by red.stonehenge.com (Postfix, from userid 1001) id 86BD516EA; Wed, 7 Mar 2012 12:20:45 -0800 (PST) From: merlyn@stonehenge.com (Randal L. Schwartz) To: freebsd-rc@freebsd.org x-mayan-date: Long count = 12.19.19.3.11; tzolkin = 1 Chuen; haab = 19 Kayab Date: Wed, 07 Mar 2012 12:20:44 -0800 Message-ID: <86mx7sduxv.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: need a shim between postgresql and pgpool startup X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:38:09 -0000 [not on list... please keep me cc'ed] Apparently, the postgresql start returns before postgresql is fully "warmed up". The next thing I start is pgpool, and pgpool aborts if it can't connect to postgres. What would the best way be to insert a 2 second delay between the two starts, or better yet, ensure pg was up before pgpool started, *without* editing the rc.d file from either of the ports (I hate having local mods like that). I'm thinking of adding some sort of pgpool_startpre, or maybe a shim that uses requires postgresql and before pgpool. Can I put pgpool_startpre() in my rc.conf file? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion From owner-freebsd-rc@FreeBSD.ORG Wed Mar 7 21:20:33 2012 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1961A1065676 for ; Wed, 7 Mar 2012 21:20:33 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 9C15D8FC08 for ; Wed, 7 Mar 2012 21:20:29 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q27LKN8m039484 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 7 Mar 2012 21:20:24 GMT (envelope-from matthew@FreeBSD.org) X-DKIM: OpenDKIM Filter v2.5.0 smtp.infracaninophile.co.uk q27LKN8m039484 Authentication-Results: smtp.infracaninophile.co.uk/q27LKN8m039484; dkim=none (no signature); dkim-adsp=none Message-ID: <4F57D10D.1030501@FreeBSD.org> Date: Wed, 07 Mar 2012 21:20:13 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: "Randal L. Schwartz" References: <86r4x4dv1r.fsf@red.stonehenge.com> In-Reply-To: <86r4x4dv1r.fsf@red.stonehenge.com> X-Enigmail-Version: 1.3.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB04BA1BFB62336DCC33D9477" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: rc@FreeBSD.org Subject: Re: need a shim between postgresql and pgpool startup X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 21:20:33 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB04BA1BFB62336DCC33D9477 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07/03/2012 20:18, Randal L. Schwartz wrote: > [not on list... please keep me cc'ed] >=20 > Apparently, the postgresql start returns before postgresql is fully > "warmed up". The next thing I start is pgpool, and pgpool aborts if it= > can't connect to postgres. Hmmm... that could be considered a bug in the postgres rc script, or equally a bug in pgpool. > What would the best way be to insert a 2 second delay between the two > starts, or better yet, ensure pg was up before pgpool started, *without= * > editing the rc.d file from either of the ports (I hate having local mod= s > like that). >=20 > I'm thinking of adding some sort of pgpool_startpre, or maybe a shim > that uses requires postgresql and before pgpool. Can I put > pgpool_startpre() in my rc.conf file? Create a new rc script like so, and save as pgpool_prestart in ${LOCALBASE}/etc/rc.d Make it executable: ------------------------------------- #!/bin/sh # PROVIDE: pgpool_prestart # REQUIRE: postgresql # BEFORE: pgpool sleep 2 ------------------------------------- Test using rcorder(8) that it would get executed between postgresql and pgpool: rcorder /etc/rc.d/* /usr/local/etc/rc.d/* For extra credit, write a small routine that attempts to log into postgres (or otherwise establish that postgres is up and doing) and loops until it succeeds or it has reached a certain maximum number of tries. Make this a function called start_precommand() and use the run_rc_command facility so it only runs if the script is given some form of start argument. Docco on rc script functionality is in rc.subr(8) Also look at: http://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --------------enigB04BA1BFB62336DCC33D9477 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9X0RcACgkQ8Mjk52CukIwxjwCgioLCJNJlFTUl1rT3EKngGLel yAQAn0Q6igVeikNFVzebodv7mn1CyBcj =wynG -----END PGP SIGNATURE----- --------------enigB04BA1BFB62336DCC33D9477-- From owner-freebsd-rc@FreeBSD.ORG Wed Mar 7 21:49:45 2012 Return-Path: Delivered-To: rc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A9D8106566B for ; Wed, 7 Mar 2012 21:49:45 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from mail.mroute.net (lax-gw06.mailroute.net [199.89.0.106]) by mx1.freebsd.org (Postfix) with ESMTP id 192A28FC0C for ; Wed, 7 Mar 2012 21:49:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by lax-gw06.mroute.net (Postfix) with ESMTP id CE0BBCBD7; Wed, 7 Mar 2012 21:49:34 +0000 (GMT) X-Virus-Scanned: by MailRoute Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by lax-gw06.mroute.net (Postfix) with ESMTP id B6F8DCBC1; Wed, 7 Mar 2012 21:49:18 +0000 (GMT) Received: by red.stonehenge.com (Postfix, from userid 1001) id A37CE1828; Wed, 7 Mar 2012 13:49:18 -0800 (PST) From: merlyn@stonehenge.com (Randal L. Schwartz) To: Matthew Seaman References: <86r4x4dv1r.fsf@red.stonehenge.com> <4F57D10D.1030501@FreeBSD.org> x-mayan-date: Long count = 12.19.19.3.11; tzolkin = 1 Chuen; haab = 19 Kayab Date: Wed, 07 Mar 2012 13:49:18 -0800 In-Reply-To: <4F57D10D.1030501@FreeBSD.org> (Matthew Seaman's message of "Wed, 07 Mar 2012 21:20:13 +0000") Message-ID: <86aa3sdqu9.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: rc@FreeBSD.org Subject: Re: need a shim between postgresql and pgpool startup X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 21:49:45 -0000 >>>>> "Matthew" == Matthew Seaman writes: Matthew> For extra credit, write a small routine that attempts to log into Matthew> postgres (or otherwise establish that postgres is up and doing) and Matthew> loops until it succeeds or it has reached a certain maximum number of Matthew> tries. Make this a function called start_precommand() and use the Matthew> run_rc_command facility so it only runs if the script is given some form Matthew> of start argument. Docco on rc script functionality is in rc.subr(8) Matthew> Also look at: Matthew> http://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html Yeah, I'd been staring at those for a few hours, even staring at the source code of rc.subr to sort this out. Thanks for the drop-in answer. I'll see if it does the job on the next reboot. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion