From owner-freebsd-questions@freebsd.org Thu Oct 31 13:20:07 2019 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 44EFF1582F2 for ; Thu, 31 Oct 2019 13:20:07 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (enterprise.ximalas.info [IPv6:2001:700:1100:1::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ximalas.info", Issuer "Hostmaster ximalas.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 473mC95pM2z4Gj6 for ; Thu, 31 Oct 2019 13:20:05 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (Ximalas@localhost [127.0.0.1]) by enterprise.ximalas.info (8.15.2/8.15.2) with ESMTPS id x9VDJoW0054958 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Thu, 31 Oct 2019 14:19:51 +0100 (CET) (envelope-from trond.endrestol@ximalas.info) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ximalas.info; s=default; t=1572527991; bh=/EQ6B//7IgptOEbCh3HLeMMg9tzBZHn4UfRvj0d/lCQ=; h=Date:From:To:Subject:In-Reply-To:References; b=DqmakV4oa7PUISYP+vgaSOFxnWjTnQ1H8h+nGtl1X31txCbZ7gnVs3jEUgm61f8qX uGExS0X403GI99kBGH48a9eOtPIxB3w1oWLxSOhhKb9JsYSpyhSCVYw1JEd0ErhBKa 2rB2tO14mLBbVUd89t4emVh2Vc90bgt6whlxtZwnUswfQHzta9tJK+2C+xHo9oCHBc MCmMPAaOKbvABC9VvCe9tDZdVSQekG2A6cBTHjyKzPBexrkv+cegJnziI4BMAC9R+x HxjMZOLYzqo1SEeh1OwFih7TuQcP6M3RuWQriN+0G2NWFxZTBwrDVu6i2xq1bpNcPb ZYdiCarQ+uZ4Q== Received: from localhost (trond@localhost) by enterprise.ximalas.info (8.15.2/8.15.2/Submit) with ESMTP id x9VDJo1h054955 for ; Thu, 31 Oct 2019 14:19:50 +0100 (CET) (envelope-from trond.endrestol@ximalas.info) X-Authentication-Warning: enterprise.ximalas.info: trond owned process doing -bs Date: Thu, 31 Oct 2019 14:19:50 +0100 (CET) From: =?UTF-8?Q?Trond_Endrest=C3=B8l?= Sender: Trond.Endrestol@ximalas.info To: freebsd-questions@freebsd.org Subject: Re: Increasing shutdown timeout In-Reply-To: <3cf157fa-6941-b662-9ffd-d9e2370f8846@netfence.it> Message-ID: References: <3cf157fa-6941-b662-9ffd-d9e2370f8846@netfence.it> User-Agent: Alpine 2.21.99999 (BSF 352 2019-06-22) OpenPGP: url=http://ximalas.info/about/tronds-openpgp-public-key MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on enterprise.ximalas.info X-Rspamd-Queue-Id: 473mC95pM2z4Gj6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ximalas.info header.s=default header.b=DqmakV4o; dmarc=pass (policy=none) header.from=ximalas.info; spf=pass (mx1.freebsd.org: domain of trond.endrestol@ximalas.info designates 2001:700:1100:1::8 as permitted sender) smtp.mailfrom=trond.endrestol@ximalas.info X-Spamd-Result: default: False [-4.93 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ximalas.info:s=default]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[ximalas.info:+]; DMARC_POLICY_ALLOW(-0.50)[ximalas.info,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:224, ipnet:2001:700::/32, country:NO]; IP_SCORE(-1.93)[ip: (-7.91), ipnet: 2001:700::/32(-1.12), asn: 224(-0.62), country: NO(-0.01)] 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, 31 Oct 2019 13:20:07 -0000 On Thu, 31 Oct 2019 12:47+0100, Andrea Venturoli wrote: > I'm having some problems on different servers with shutdown timeout. > > For the curious, it ranges from bhyve VMs failing to stop (and keeping running > as zombie, preventing real shutdown after init died), to NUT shutdown script > not having the chance to run (so the UPS power won't get killed and the > servers won't come up again unless all batteries are fully drained before the > power comes back). > > First: why not? > Are there good reasons NOT to increase this timeout? Possible side effects? > Any experience with an high value? In my experience, the shutdown script(s) display more patience with a higher value. > Second: how? > I see there's "rcshutdown_timeout" that can be set in /etc/rc.conf, but also > "kern.init_shutdown_timeout" sysctl. > I read the latter is obsolete and not used since years. Seeing it there raises > the doubt. Is it still valid? > Should I increase both? My version control system says I had to increase rcshutdown_timeout from 30 seconds to 60 seconds on 2011-02-28 for one of my systems, and again to 90 seconds on 2011-05-09. 90 seconds has been the default value since 2012-02-17. Try setting rcshutdown_timeout to 120 seconds, or higher, i.e.: rcshutdown_timeout="120" -- Trond.