From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 06:01:52 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4CA1D50 for ; Mon, 25 May 2015 06:01:52 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 9003130A for ; Mon, 25 May 2015 06:01:51 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 71968ACC34 for ; Mon, 25 May 2015 06:01:45 +0000 (UTC) Message-ID: <5562BACA.4040104@freebsd.org> Date: Mon, 25 May 2015 02:01:46 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: can we get some interaction between halt/reboot and bhyve? References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> <5562A5D0.7050207@redbarn.org> In-Reply-To: <5562A5D0.7050207@redbarn.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2015 06:01:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-05-25 00:32, Paul Vixie wrote: >=20 >=20 > John-Mark Gurney wrote: >> Shouldn't shutdown be used instead of reboot/halt? This allows >> various rc.d scripts to run, and you can use that to make sure all >> your bhyve instances are shutdown... >=20 > yes. but, if the reboot or poweroff or halt command is used, i'd like m= y > bhyve's to have enough time to umount their ufs zvol's. the rc.d script= > should pass along some softer signal that can cause the bhyve to do its= > own clean shutdown. but where SIGTERM is used, which is passed on as > ACPI power-off, i'd like busy (that is, not hung, trying hard to shut > down cleanly) bhyve's to get more time. the current poweroff/halt/reboo= t > command only looks for evidence of paging as a reason to extend the tim= e > between SIGTERM and SIGKILL. i'd like to give it some bhyve-relevant > additional reason to delay that SIGKILL. >=20 One option might be a sysctl to control how much time processes are given between the SIGTERM and SIGKILL. Right now, it looks like, unless paging it detected, processes are only given 5 seconds, which is definitely not enough for bhyve and some other processes. A tunable gives people the option of how long they want to wait. On my laptop, I likely want to shutdown in a hurry, but on my virtualization server, I'm willing to wait a few minutes to keep the shutdown clean. --=20 Allan Jude --R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJVYrrNAAoJEJrBFpNRJZKfWGgQAINXV2z3PszdKo4eY3/FIEP0 fqbd1t19enf9Q0aTqoDzKXzSlvpWGi0B/rKgh7XGJsXEdRlZJC6TXpWt8Itkv01J oF+bLVdnjTS32pRS8OEphMdDKdHoWKyjrL+hgsiJPpVcNOdGXn5HSL+P7MLcuuPj Mnb6q07UxdjEiyqBZcjamwOJxXBsuBo+jAsqlYe9OdVV4yY87SqxbDW1uhDn2s4v TvE3wUClbFMjN7z1Sr9zvU4u5qAdI8Lz4g5yDwl8ku1TTB3yWh05kGnlKcpMDEA3 OAm4b1tcKhZueRCCpXP4l0c6r90OLTSpneeHzk3XF6FpHjS8gyE80TVRnP7fqe8C xw8R6ZuMaAV1WsZ60dZO7EXBsDSp1HZ7fbhUsJ6z7YwamzxR8LXI1B7rmxPNEERO vAmcY4WnmHLyMb8zPoF+UPkWm9GTTTbyOCAP5EItee67D8Ffh3xXkHAb8om6PT9H A/sPtYqci2cpNRYQYPUMlFCgr71ej2ArHx/ciEjgdHQ7Yt1JAnpZSNRqpF4QJ6jf r1B+Gpb3CBGwL0TcanosQdieldZBbGZUk83YWDm4pt9XUbLvHPecgiuad7jYwilS CvS5uMILNZ0uZbMI3SsvkWuwuzy7Moo7Xqw9VeYySTQgZMI59Tu1Yr7ad3oYai/Z 3IV9MBNt59TiTz8DE9fA =QcfQ -----END PGP SIGNATURE----- --R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl--