From owner-freebsd-questions@freebsd.org Thu Mar 19 14:01:36 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FECE26111D; Thu, 19 Mar 2020 14:01:36 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (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 48jpVQ5wXxz45f8; Thu, 19 Mar 2020 14:01:34 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=vTgUg3MgEK5fLIv5X2bS62bPWK4N0X2e5Q2R+bBVVCo=; b=JBOEHFsMn9QQmnSh7AH65ylHmg bVat+l5g44cZhgBxFSw5CRGRiKRkJqGOyex5UpY/4z7a4xLMeYou8TCb22XC90k41dcqAPB4H3eTD f55giLSywo+ohNVWOU/oR9k/hkKqpiqdO3eaAoUVs/dgNJ9eAUwlGBaB2RDzj/0XK6Gs=; Received: from vas by admin.sibptus.ru with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jEvjo-000OUQ-Dt; Thu, 19 Mar 2020 21:01:32 +0700 Date: Thu, 19 Mar 2020 21:01:32 +0700 From: Victor Sudakov To: "Bjoern A. Zeeb" Cc: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-net@freebsd.org, freebsd-questions@freebsd.org Subject: Re: IPv6 in jails Message-ID: <20200319140132.GA93947@admin.sibptus.ru> References: <20200318151556.GA64871@admin.sibptus.ru> <2dd539ed-0ee3-079b-27b2-28126056c69a@quip.cz> <20200318155046.GD65497@admin.sibptus.ru> <4CA69535-0F6C-40FC-83CF-5000FD728C2D@lists.zabbadoz.net> <20200319021432.GA80800@admin.sibptus.ru> <01EF7656-4F8A-4075-A0B4-27E8AB17B516@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <01EF7656-4F8A-4075-A0B4-27E8AB17B516@lists.zabbadoz.net> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 48jpVQ5wXxz45f8 X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=JBOEHFsM; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-8.46 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; IP_SCORE(-3.36)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.93), country: US(-0.05)]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2020 14:01:36 -0000 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Bjoern A. Zeeb wrote: >=20 > > > If it does, can you add a > > >=20 > > > exec.start +=3D "sleep 2 "; > > >=20 > > > to your config > >=20 > > OK, I've added it to the configs of 3 experimental jails. > >=20 > > > and see if your problem goes away? > >=20 > > It goes away partially (only for sshd in 2 of the 3 available jails), > > and > > not for syslogd in any of the 3 available jails. Restarting the daemons > > from within the jail fixes the problem. An example from a problem jail: > >=20 > .. > >=20 > > > If it does, the reason is > > > that you configure an IPv6 address to an interface and DUD has not > > > yet > > > completed by the time sshd or other daemons start. Giving it the 2 What is "DUD" BTW? > > > seconds > > > avoids this problem and the address is usable at that time. > >=20 > > There is obviously a race somewhere, but the 2 second sleep does not > > eliminate it entirely. >=20 > Well not so much of a race but than a =E2=80=9Cgap=E2=80=9D. >=20 > The point is you are configuring an address on the base system and the ja= il > knows nothing about it so it=E2=80=99ll simply start the daemons. Normal= ly the > startup scripts would do the right thing. >=20 > I don=E2=80=99t think =E2=80=9Cpolluting=E2=80=9D jail(8) with logic to c= heck that the addresses > become available or not is a good idea. However I agree that it should > automatically do the right thing somehow .. >=20 >=20 >=20 > > Thank you for the hint in the right direction, what would you suggest > > further? >=20 > If you make it 3 seconds, does it deterministically work then? Not quite: https://termbin.com/arvb syslogd sometimes remains deprived of the IPv6 address. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJec3s8AAoJEA2k8lmbXsY0Od0IAK0+xmWkuH/uazuRTSVKr9VI +XHfx9+tThzPE0MlrPBwJJ0x0Mj+HbI9RxYxQlmCRXkNoNQ2oIca5KmEjSHlnr+p cka9T025H2mJ//SP53i8ZFB8+kVlj4z6nsE+X0eJBuah0dhmdrAP/p7oWWgpPRYq mqwagg814XAWNXzWfZZ8LDtlgjVszY2L29khNojAk9Ao87slowlJ8j+BPCKrF30Y WPiHUTlW8hVmogsKB6q+bdNg6ePqAoG9GbyM4UF6tHrEQH9M0RwpS1lDSkTNZdTj amgRXlQFcS8IuPUIlFntTuJdtFvFGN0z2ZncFEHjsHKbcCQce6BnQs1TjEBnm0M= =+OwQ -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--