[systemd-devel] rpcbind.socket failing

Steve Dickson SteveD at redhat.com
Tue Nov 1 15:29:48 UTC 2016



On 11/01/2016 09:31 AM, Lennart Poettering wrote:
> On Mon, 31.10.16 13:19, Steve Dickson (SteveD at redhat.com) wrote:
> 
>> [Unit]
>> Description=RPCbind Server Activation Socket
>> DefaultDependencies=no
>> RequiresMountsFor=/var/run /run
>> Wants=rpcbind.target
>> Before=rpcbind.target
>>
>> [Socket]
>> ListenStream=/var/run/rpcbind.sock
> 
> So you turned off the default dependencies, which means your socket
> unit will be started during earliest boot, at a time where /var is
> usually not writable yet. (You then try to fix this up via the
> RequiresMountsFor= thing, but that will only ensure that /var is
> mounted, it does not require it to actually be writable, or that the
> /var/run → /run symlink was created)
> 
> So, most importantly: please drop all references to /var/run
> here. That's just a legacy alias to /run, implemented via a
> symlink. All distributions, regardless if they adopted systemd or not,
> have switched to making /run a tmpfs and /var/run a symlink to
> it. There's really no point at all in ever referring to /var/run
> again.
Ok... 

> 
> By dropping any reference to /var/run and replacing it by a reference
> directly to /run you make the entire problem set go away: /run is
> guaranteed to always exist on systemd systems, it's always writable,
> and always a tmpfs. PID 1 mounts in in its earliest initialization
> phase, right at the same time it mounts /proc and /sys too.
> 
> Summary:
> 
> a) drop the entire RequiresMountsFor= line, it's useless. /run is
>    mounted anyway, and depending on /var/run doesn't do what people
>    might think, and you don't need it anway.
> 
> b) Change the ListenStream directive to reference /run/rpcbind.sock
>    directly, avoid the indirection via /var/run/rpcbind.sock
The whole point of the exercise is to develop uniformity 
across distros so I'll send post an updates version and
see what is said as well as cc-ing the original author
for comment... 

thanks!

steved.


> 
> Lennart
> 


More information about the systemd-devel mailing list