From nobody Thu Dec 19 17:21:05 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YDclP6DGjz5hTw0 for ; Thu, 19 Dec 2024 17:21:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YDclP4FZRz43th for ; Thu, 19 Dec 2024 17:21:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734628865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/sTnlXHSmsWs+FvXtl8t55CT6o7vfGPtIHbJLTlRtak=; b=T/aUS6aRuMoBgWeRld1RASq2D1XGOsnJcorcTZRziA24/oK7CM4MzZMSN4QTDPHtk8iAdr ofDv9hQy7Ke5rG9etRNRi9HVWAktmnHCzbl1vD7oJOthtsWA6mFI7enBGwWDbUdwu3SZGN gR9ByjUEjA4pdfqO7aLouNI5Xv6bPUxJ3HTfJWYlE58wUtR/lOPNoshBp0impZICMlON/Z 9fF+XbWJwLTORtbTxtKZdPWQO1gc9AZJXz2q2CHAO6Z/9YRCxZWQw6i9+22D9WgeKjH3UW O6RMfwIUOlKetpsyqlNOxK+OnLBmAZ0hMR9LBVu3+b/rHu4Jlrf+6YrrAWi4JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734628865; a=rsa-sha256; cv=none; b=GVUwmSGP3vaOP0f70u6UY1cF1whPlHjozQWphedRs9+pNW3+V1bY+M+K6yXVv6mkbbrJGS oIXuRIcidk7hLKtXBFHq48KJtuj6knSfUJJKDKKx8Pv5V2ttab03ZWMmto+NzS+DnjU6qK SMOExIvfamGWTLGXI74/8LAVvbSR4gVbh0PdYxinz0UncLDu6Weh4o5huOM+xxWdOp4xag VhUXFx3cbU05B5hxLuKqWgAB1A/6S9pMyyr/llSP2CK/ffyK6NJ1mFc5I5iPxgkxev1hwM afk6DT2rLFoLn8Uj6nS4z/ivpuE5lH3iRImOyXpVKMZakqRXudjAIzYYAYno1A== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YDclP3sWQz1376 for ; Thu, 19 Dec 2024 17:21:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4BJHL5xE063580 for ; Thu, 19 Dec 2024 17:21:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4BJHL55k063579 for bugs@FreeBSD.org; Thu, 19 Dec 2024 17:21:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 283419] rc.d script to make carp start late during bootup and stop early during shutdown Date: Thu, 19 Dec 2024 17:21:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: thomas@gibfest.dk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283419 Bug ID: 283419 Summary: rc.d script to make carp start late during bootup and stop early during shutdown Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: conf Assignee: bugs@FreeBSD.org Reporter: thomas@gibfest.dk Created attachment 255956 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D255956&action= =3Dedit rc.d script to enable carp late when booting and disable carp early when shutting down Hello :) For a while I have been running with the attached rc.d script on my carp routers and I wanted to share it in case it makes sense to include it in FreeBSD. The script tries to solve two related problems. carp(4) tends to start announcing too early during bootup, and it tends to stop announcing too late during shutdown. During bootup carp(4) is pretty eager to start sending carp packets to the network, announcing itself, possibly taking the MASTER role (depending on preempt and advskew of course). Depending on the system this will likely be before other software is ready to handle connections, like my bird2 routing daemon but it could also be a webserver or something. During shutdown carp(4) keeps sending carp announcements until the very last second before the reboot, long after other software has shutdown. If the software shuts down 10 seconds before the carp announcements that means 10 seconds of gap in whatever service is being handled. The script has REQUIRE: securelevel since that seems to be the last thing in rcorder on my systems, and it just sets net.inet.carp.allow=3D1 when run wi= th start. During shutdown it runs first, sets net.inet.carp.allow=3D0 which me= ans the machine stops sending carp packets, and the other system takes over immediately. This script has noticeably reduced failover times when we reboot routers du= ring upgrades, we used to have 20-30 seconds gap in traffic when rebooting and t= hat is now down to a couple of seconds. The script requires net.inet.carp.allow=3D0 to be set to work properly. Have a nice day :) --=20 You are receiving this mail because: You are the assignee for the bug.=