Date: Thu, 17 Jan 2013 01:29:36 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r245525 - head/etc/rc.d Message-ID: <alpine.BSF.2.00.1301170128100.4694@ai.fobar.qr> In-Reply-To: <201301170127.r0H1Re6Y038117@svn.freebsd.org> References: <201301170127.r0H1Re6Y038117@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Jan 2013, Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Jan 17 01:27:39 2013 > New Revision: 245525 > URL: http://svnweb.freebsd.org/changeset/base/245525 > > Log: > Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces. > Do this per jail started, not per address. This will allow DAD to complete > and services to properly start. Before we have seen problems with services > trying to start before the IPv6 address was available to use and thus > erroring and failing to start. > > MFC after: 3 days Reviewed by: simon Reported by: clusterad Seen before by: myself (but never fixed it properly) Samples of services seen starting up really fast and failing included openldap's slapd and I think even apache. > > Modified: > head/etc/rc.d/jail > > Modified: head/etc/rc.d/jail > ============================================================================== > --- head/etc/rc.d/jail Thu Jan 17 01:19:14 2013 (r245524) > +++ head/etc/rc.d/jail Thu Jan 17 01:27:39 2013 (r245525) > @@ -509,7 +509,7 @@ jail_handle_ips_option() > esac > case "${_type}" in > inet) ;; > - inet6) ;; > + inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;; > *) warn "Could not determine address family. Not going" \ > "to ${_action} address '${_addr}' for ${_jail}." > continue > @@ -546,6 +546,7 @@ jail_ips() > esac > > # Handle addresses. > + ipv6_address_count=0 > jail_handle_ips_option ${_action} "${_ip}" > # Handle jail_xxx_ip_multi<N> > alias=0 > @@ -558,6 +559,12 @@ jail_ips() > ;; > esac > done > + case ${ipv6_address_count} in > + 0) ;; > + *) # Sleep 1 second to let DAD complete before starting services. > + sleep 1 > + ;; > + esac > } > > jail_prestart() > -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1301170128100.4694>