Date: Wed, 11 Jun 2025 07:05:45 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Gleb Smirnoff <glebius@freebsd.org> Cc: Rick Macklem <rick.macklem@gmail.com>, Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@freebsd.org>, 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: <aEkAmW-ZNSENrp7h@kib.kiev.ua> In-Reply-To: <aEhSOKKsHqfaFlNZ@cell.glebi.us> References: <202506091053.559ArJ8k043104@gitrepo.freebsd.org> <aEbKLniIuHd4xuq7@kib.kiev.ua> <CAM5tNy7uGWg4gOsy%2BM7_vneObuszzxNhGAJF-6rd%2Byjqc00QeA@mail.gmail.com> <aEbPE5oG47SuN2y0@kib.kiev.ua> <CAM5tNy6-xtDYQPw6vr588e2r=tX76pWZnKPczwaCrZ5j5XnCEw@mail.gmail.com> <aEdJQybzSOzR3BS0@cell.glebi.us> <aEd5lozkABjyg0UZ@kib.kiev.ua> <aEegKoTN-ej0C5_Z@cell.glebi.us> <aEf2tqXgHDo8SMBb@kib.kiev.ua> <aEhSOKKsHqfaFlNZ@cell.glebi.us>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aEkAmW-ZNSENrp7h>
