From nobody Wed Jun 11 04:05:45 2025 X-Original-To: dev-commits-src-main@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 4bHBsZ1mDxz5ycWb; Wed, 11 Jun 2025 04:05:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4bHBsY45Thz3vgl; Wed, 11 Jun 2025 04:05:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 55B45juf051288; Wed, 11 Jun 2025 07:05:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 55B45juf051288 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 55B45jpv051286; Wed, 11 Jun 2025 07:05:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 11 Jun 2025 07:05:45 +0300 From: Konstantin Belousov To: Gleb Smirnoff Cc: Rick Macklem , Dag-Erling =?utf-8?B?U23DuHJncmF2?= , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 79d0f4474653 - main - rpcbind: Ensure krpc is present. Message-ID: References: <202506091053.559ArJ8k043104@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bHBsY45Thz3vgl X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] On Tue, Jun 10, 2025 at 08:41:44AM -0700, Gleb Smirnoff wrote: > On Tue, Jun 10, 2025 at 12:11:18PM +0300, Konstantin Belousov wrote: > K> Apparently we already have the feature called 'warmstart', where rpcbind > K> can be restarted and existing registrations are reloaded. So it is in > K> fact already solved, assuming admin is careful enough to use -w. > > Ok, then all that needs to be done is revert this: > > --- a/usr.sbin/rpcbind/rpcbind.c > +++ b/usr.sbin/rpcbind/rpcbind.c > @@ -159,10 +159,6 @@ main(int argc, char *argv[]) > > update_bound_sa(); > > - /* Ensure krpc is loaded */ > - if (modfind("krpc") < 0 && kldload("krpc") < 0) > - err(1, "krpc"); > - > /* Check that another rpcbind isn't already running. */ > if ((rpcbindlockfd = open(RPCBINDDLOCK, O_RDONLY|O_CREAT, 0444)) < 0) > err(1, "%s", RPCBINDDLOCK); > > Without these lines, rpcbind will log: > > Jun 10 08:34:23 bobrik rpcbind[885]: netlink: could not create service Well, absolutely minimal fix would be to change err() to warn(). > > And continue with /var/run/rpcbind.sock set up and ready to service > requests from applications. > > We can add an extra message for verbosity: > > @@ -223,7 +219,10 @@ main(int argc, char *argv[]) > } > endnetconfig(nc_handle); > > - init_transport(&netlink_nconf); > + if (init_transport(&netlink_nconf) != 0) { > + syslog(LOG_ERR, "krpc(4) module missing? " > + "Continuing without netlink/krpc transport"); > + } > > /* > * Allocate pipe fd to wake main thread from signal handler in non-racy > > I really don't have a strong opinion on what would be right here. I have no > idea on how wide is the use of rpcbind w/o NFS. Kostik, Rick and Dag-Erling, > may you together come to agreement on what is right here? > > -- > Gleb Smirnoff