<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nfs-utils.git/systemd/nfs-server.service, branch fixrootccache</title>
<subtitle>NFS utils related patches</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/'/>
<entry>
<title>systemd: Afters are also needed for the Wants=network-online.target</title>
<updated>2017-04-24T15:25:39+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-04-24T15:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=09e5c6c2a3f8eac91d5353e6d4ff6aee7757ab08'/>
<id>09e5c6c2a3f8eac91d5353e6d4ff6aee7757ab08</id>
<content type='text'>
Commit 9d4fc3fb added Wants=network-online.target which
is not enough to ensure the network is completely up
before the NFS server is started. After=network-online.target
is also needed.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1419351

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 9d4fc3fb added Wants=network-online.target which
is not enough to ensure the network is completely up
before the NFS server is started. After=network-online.target
is also needed.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1419351

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: NFS server services should use network-online</title>
<updated>2017-04-10T11:21:23+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-04-10T11:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=9d4fc3fb5133be2df69fa380f80d1c660827fd1b'/>
<id>9d4fc3fb5133be2df69fa380f80d1c660827fd1b</id>
<content type='text'>
There has been an number startup problems where parts of
the NFS server fails to start due to DNS and other
parts of the network not be up.

Reading the systemd.special it seems network.target is
a passive unit which does not wait for the entire
network to come up and network-online.target is an
active unit which does wait.

So this adds Wants=network-online.target to all of
the NFS server services

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There has been an number startup problems where parts of
the NFS server fails to start due to DNS and other
parts of the network not be up.

Reading the systemd.special it seems network.target is
a passive unit which does not wait for the entire
network to come up and network-online.target is an
active unit which does wait.

So this adds Wants=network-online.target to all of
the NFS server services

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: nfs-server service should use network-online</title>
<updated>2017-04-09T19:00:05+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2017-04-07T14:53:35+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=53f31f060e94fb0318418485fc2ab7149ab27f18'/>
<id>53f31f060e94fb0318418485fc2ab7149ab27f18</id>
<content type='text'>
There has been an number startup problem where parts of
the NFS server fail to start due to DNS and other
parts of the network not be up.

Reading the systemd.special it seems network.target is
a passive unit which does not wait and network-online.target
is an active unit which does not wait so that
should be used.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1419351

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There has been an number startup problem where parts of
the NFS server fail to start due to DNS and other
parts of the network not be up.

Reading the systemd.special it seems network.target is
a passive unit which does not wait and network-online.target
is an active unit which does not wait so that
should be used.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1419351

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: Remove the nfs-config.service</title>
<updated>2016-12-20T18:29:04+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2016-12-06T18:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=2662e1ba98707014b6167e1e5bd3162d6d8f52af'/>
<id>2662e1ba98707014b6167e1e5bd3162d6d8f52af</id>
<content type='text'>
Now that we have /etc/nfs.conf, a lot of configuration can be
read directly.  So nfs-config isn't really needed any more.

Some distributions allow command-line arguments for various
daemons to be set in an environment file (/etc/sysconfig,
/etc/defaults).
Passing these through /etc/nfs.conf is not possible.

Instead, a distro that needs this functionality can create drop-in
files which select the required value.  As no commands are given
default arguments by systemd unit files, the drop-in can just add
distro-specific args.
For example
  /lib/systemd/system/nfs-mountd.service.d/local.conf
   [Service]
   EnvironmentFile=/etc/sysconfig/nfs
   ExecStart=
   ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDOPTS

Note the need for the empty assignment to remove existing definitions
first.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we have /etc/nfs.conf, a lot of configuration can be
read directly.  So nfs-config isn't really needed any more.

Some distributions allow command-line arguments for various
daemons to be set in an environment file (/etc/sysconfig,
/etc/defaults).
Passing these through /etc/nfs.conf is not possible.

Instead, a distro that needs this functionality can create drop-in
files which select the required value.  As no commands are given
default arguments by systemd unit files, the drop-in can just add
distro-specific args.
For example
  /lib/systemd/system/nfs-mountd.service.d/local.conf
   [Service]
   EnvironmentFile=/etc/sysconfig/nfs
   ExecStart=
   ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDOPTS

Note the need for the empty assignment to remove existing definitions
first.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: improve ordering between nfs-server and various mounts</title>
<updated>2016-08-22T12:50:37+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2016-08-22T12:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=4776bd0599420f9d073c9e2601ed438062dccd19'/>
<id>4776bd0599420f9d073c9e2601ed438062dccd19</id>
<content type='text'>
Commit: 1e41488f428c ("systemd: Order NFS server before client")
added an ordering dependency between network mounts and nfs-server.
This is good for loop-back NFS mounts as it ensures the server
will remain until after the mountpoint is unmounted.

However is is bad for _net mounts (such as those via iSCSI) which
are being NFS exported.

nfs-server needs to be start *after* exported filesystems are mounted,
and *before* NFS filesystems are mounted.  systemd isn't able to make
this distinction natively, so we need to help it.

This patch adds a systemd generator which creates a drop-in for
nfs-server.services so that it is started "Before" any "nfs" or "nfs4"
mount, and so that it has a "RequiresMountsFor" dependency on any
exported filesystem.  This creates the required ordering.

Note that if you try to export an "nfs" mount, systemd will detect an
ordering loop and will refused to start the nfs server.  This is
probably the correct thing to do.

This patch also removes the ordering dependency with
remote-fs-pre.target which the above-mentioned commit added.  It is no
longer needed.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit: 1e41488f428c ("systemd: Order NFS server before client")
added an ordering dependency between network mounts and nfs-server.
This is good for loop-back NFS mounts as it ensures the server
will remain until after the mountpoint is unmounted.

However is is bad for _net mounts (such as those via iSCSI) which
are being NFS exported.

nfs-server needs to be start *after* exported filesystems are mounted,
and *before* NFS filesystems are mounted.  systemd isn't able to make
this distinction natively, so we need to help it.

This patch adds a systemd generator which creates a drop-in for
nfs-server.services so that it is started "Before" any "nfs" or "nfs4"
mount, and so that it has a "RequiresMountsFor" dependency on any
exported filesystem.  This creates the required ordering.

Note that if you try to export an "nfs" mount, systemd will detect an
ordering loop and will refused to start the nfs server.  This is
probably the correct thing to do.

This patch also removes the ordering dependency with
remote-fs-pre.target which the above-mentioned commit added.  It is no
longer needed.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd unit files: fix up dependencies on rpcbind.</title>
<updated>2016-05-02T12:58:12+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2016-05-02T12:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=91da135f243d6f87fcea8b8a3ce28a589917b0e4'/>
<id>91da135f243d6f87fcea8b8a3ce28a589917b0e4</id>
<content type='text'>
The dependencies on rpcbind have been changed a few times and I think
they are still wrong.  So I'll go into some detail to justify this
change.

Firstly: rpcbind.target rpcbind.socket or rpcbind.service?

The systemd documentation talks about targets as "synchronization
points" and likens them to SysV init run levels.  Run levels are about
ordering but not dependencies.

The systemd.special man page describes rpcbind.target as intended
explicitly for ordering sysvinit scripts, with "After=" dependencies.

So while I think it is valid to use rpcbind.target for ordering
(before/after) it shouldn't be used for dependencies (Wants/Requires).
The rpcbind.target file included in systemd does not "Require" the
actual service, so requiring rpcbind.target itself is pointless.

I think we shouldn't use rpcbind.target at all.  Leave it for sysvinit
synchronization.

So: .socket or .service?

I think nfs only needs the socket to be active.  On first connection
the service will be started.  But nfs does not need to wait for the
service to start, only the socket.  So I think we should exclusively
use rpcbind.socket.

Next: Wants or Requires.

rpc.statd definitely Requires rpcbind.  It needs to register to be
useful, and without rpcbind it cannot register.

nfs-server does not necesarily require rpcbind.  Specifically if
configured for NFSv4 only, nfs-server will work quite happily without
rpcbind.

Someone with an NFSv4 only setup who wants rpcbind to not run can use
  systemctl mask rpcbind.socket
to ensure it never runs.
So nfs-server should only "Wants: rpcbind.socket".
I think
 Commit: 4fabfcd08206 ("systemd: Decouple the starting and stopping of
rpcbind/nfs-server")
should have changed "Requires" to "Wants" rather than "server" to
"target"
to fix the dependency problem.

Finally: After?

It only makes sense to declare an ordering relation as "After:"
something that will actually be started.  If "foo.service" is not part
of the systemd transaction, then "After: foo.service" has no effect.
So having:
  Requires: rpcbind.target
  After: rpcbind.socket

doesn't make much sense unless there is some relationship between
rpcbind.target and rpcbind.socket, and there is no general guarantee
of that (though what individual distros do, I don't know).
So the "After" should match the "Wants" or "Requires".

It might make sense to
  Requires: rpcbind.socket
  After: rpcbind.target

as it is reasonable to assume that rpcbind.target will be ordered with
rpcbind.socket, but as we can use rpcbind.socket explictly, that is
clearer.

So my conclusion is that nfs-server should:
  Wants: rpcbind.socket
  After: rpcbind.socket

and rpc-statd should
  Requires: rpcbind.socket
  After: rpcbind.socket

which is what this patch puts into effect.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dependencies on rpcbind have been changed a few times and I think
they are still wrong.  So I'll go into some detail to justify this
change.

Firstly: rpcbind.target rpcbind.socket or rpcbind.service?

The systemd documentation talks about targets as "synchronization
points" and likens them to SysV init run levels.  Run levels are about
ordering but not dependencies.

The systemd.special man page describes rpcbind.target as intended
explicitly for ordering sysvinit scripts, with "After=" dependencies.

So while I think it is valid to use rpcbind.target for ordering
(before/after) it shouldn't be used for dependencies (Wants/Requires).
The rpcbind.target file included in systemd does not "Require" the
actual service, so requiring rpcbind.target itself is pointless.

I think we shouldn't use rpcbind.target at all.  Leave it for sysvinit
synchronization.

So: .socket or .service?

I think nfs only needs the socket to be active.  On first connection
the service will be started.  But nfs does not need to wait for the
service to start, only the socket.  So I think we should exclusively
use rpcbind.socket.

Next: Wants or Requires.

rpc.statd definitely Requires rpcbind.  It needs to register to be
useful, and without rpcbind it cannot register.

nfs-server does not necesarily require rpcbind.  Specifically if
configured for NFSv4 only, nfs-server will work quite happily without
rpcbind.

Someone with an NFSv4 only setup who wants rpcbind to not run can use
  systemctl mask rpcbind.socket
to ensure it never runs.
So nfs-server should only "Wants: rpcbind.socket".
I think
 Commit: 4fabfcd08206 ("systemd: Decouple the starting and stopping of
rpcbind/nfs-server")
should have changed "Requires" to "Wants" rather than "server" to
"target"
to fix the dependency problem.

Finally: After?

It only makes sense to declare an ordering relation as "After:"
something that will actually be started.  If "foo.service" is not part
of the systemd transaction, then "After: foo.service" has no effect.
So having:
  Requires: rpcbind.target
  After: rpcbind.socket

doesn't make much sense unless there is some relationship between
rpcbind.target and rpcbind.socket, and there is no general guarantee
of that (though what individual distros do, I don't know).
So the "After" should match the "Wants" or "Requires".

It might make sense to
  Requires: rpcbind.socket
  After: rpcbind.target

as it is reasonable to assume that rpcbind.target will be ordered with
rpcbind.socket, but as we can use rpcbind.socket explictly, that is
clearer.

So my conclusion is that nfs-server should:
  Wants: rpcbind.socket
  After: rpcbind.socket

and rpc-statd should
  Requires: rpcbind.socket
  After: rpcbind.socket

which is what this patch puts into effect.

Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: Decouple the starting and stopping of rpcbind/nfs-server</title>
<updated>2015-11-16T20:05:35+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2015-11-09T16:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=4fabfcd082069a16ea8769b9ea9344fc15011366'/>
<id>4fabfcd082069a16ea8769b9ea9344fc15011366</id>
<content type='text'>
Commit b98f2af15 introduced a regression that cause the
starting and stop of rpcbind and the nfs-server to
be depended on each other

The starting of the NFS server should start rpcbind
but bring rpcbind down should not bring the NFS
server down.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit b98f2af15 introduced a regression that cause the
starting and stop of rpcbind and the nfs-server to
be depended on each other

The starting of the NFS server should start rpcbind
but bring rpcbind down should not bring the NFS
server down.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nfs-server: Use rpcbind.service instead of rpbind.target</title>
<updated>2015-06-25T15:09:38+00:00</updated>
<author>
<name>Steve Dickson</name>
<email>steved@redhat.com</email>
</author>
<published>2015-06-25T15:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=b98f2af15fea1d14a4b6ab1ab2dcdfec8db5dd1b'/>
<id>b98f2af15fea1d14a4b6ab1ab2dcdfec8db5dd1b</id>
<content type='text'>
To trigger the systemd socket activation support
in rpcbind, nfs-service needs to Requires/After
rpcbind.service instead of rpbind.target

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To trigger the systemd socket activation support
in rpcbind, nfs-service needs to Requires/After
rpcbind.service instead of rpbind.target

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: Relax dependencies of services</title>
<updated>2015-03-19T15:44:16+00:00</updated>
<author>
<name>Martin Pitt</name>
<email>martin.pitt@ubuntu.com</email>
</author>
<published>2015-03-19T15:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=997148c3d87d4a59a0e542c4fbe77fefc6489e56'/>
<id>997148c3d87d4a59a0e542c4fbe77fefc6489e56</id>
<content type='text'>
Stop depending on basic.target in the daemons which still do;
i. e. add DefaultDependencies=no. This makes it possible to
run NFS during early boot, and helps if you e. g. have /var
on NFS. We don't require much else than local-fs.

Acked-by: Zbigniew Jędrzejewski-Szmek &lt;zbyszek@in.waw.pl&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stop depending on basic.target in the daemons which still do;
i. e. add DefaultDependencies=no. This makes it possible to
run NFS during early boot, and helps if you e. g. have /var
on NFS. We don't require much else than local-fs.

Acked-by: Zbigniew Jędrzejewski-Szmek &lt;zbyszek@in.waw.pl&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>systemd: Order NFS server before client</title>
<updated>2015-03-19T15:44:16+00:00</updated>
<author>
<name>Martin Pitt</name>
<email>martin.pitt@ubuntu.com</email>
</author>
<published>2015-03-19T15:16:02+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=1e41488f428cd36b200b48b84d31446e38dfdc50'/>
<id>1e41488f428cd36b200b48b84d31446e38dfdc50</id>
<content type='text'>
This makes mounting NFS shares from localhost work reliably,
as you need to start the server before attempting (client)
mounts, and conversely on shutdown need to unmount all
shares before stopping the server to avoid hangs.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes mounting NFS shares from localhost work reliably,
as you need to start the server before attempting (client)
mounts, and conversely on shutdown need to unmount all
shares before stopping the server to avoid hangs.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
