Re: git: 79d0f4474653 - main - rpcbind: Ensure krpc is present.

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Tue, 10 Jun 2025 15:57:11 UTC
On Tue, Jun 10, 2025 at 8:41 AM Gleb Smirnoff <glebius@freebsd.org> wrote:
>
> CAUTION: This email originated from outside of the University of Guelph. Do not click links or open attachments unless you recognize the sender and know the content is safe. If in doubt, forward suspicious emails to IThelp@uoguelph.ca.
>
> 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
>
> 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?
I don't have a strong opinion on it either, since most kernel configs
include NFS
options, so the krpc is there anyhow.

rick

>
> --
> Gleb Smirnoff