<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nfs-utils.git/utils/statd, branch gss-fixes</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>statd: exit if a statd is already running</title>
<updated>2013-05-07T15:47:35+00:00</updated>
<author>
<name>Weston Andros Adamson</name>
<email>dros@netapp.com</email>
</author>
<published>2013-05-07T15:25:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=342446a4a624d4ee8254af859bb7f1de6d268679'/>
<id>342446a4a624d4ee8254af859bb7f1de6d268679</id>
<content type='text'>
Moves nfs_probe_statd from mount to nfs support lib to share with statd.

Acked-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Weston Andros Adamson &lt;dros@netapp.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>
Moves nfs_probe_statd from mount to nfs support lib to share with statd.

Acked-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Weston Andros Adamson &lt;dros@netapp.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sm-notify: "-v hostname" doesn't work when IPV6_SUPPORT is enabled</title>
<updated>2013-04-22T16:47:20+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2013-04-19T17:13:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=37add3662de0339a75d3bed86a4235fc7efaf18d'/>
<id>37add3662de0339a75d3bed86a4235fc7efaf18d</id>
<content type='text'>
Marc Eshel reports that using the -v command line option on the
sm-notify command stopped working after nfs-utils 1.2.2, when IPv6
support was added.  If nfs-utils is built without IPv6 support, it
still works.  Marc specified a hostname with a single A record.

smn_bind_address() must construct a bind address with the same
family as the RPC socket's protocol family.  Add an AI_V4MAPPED hint
so an appropriate IPv6 bind address is constructed even if -v
specifies an IPv4 presentation address, or a hostname with only IPv4
mappings.

We still use an IPv4 bind address if IPv6 support is compiled out or
the host does not support IPv6.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Cc: Marc Eshel &lt;eshel@us.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Marc Eshel reports that using the -v command line option on the
sm-notify command stopped working after nfs-utils 1.2.2, when IPv6
support was added.  If nfs-utils is built without IPv6 support, it
still works.  Marc specified a hostname with a single A record.

smn_bind_address() must construct a bind address with the same
family as the RPC socket's protocol family.  Add an AI_V4MAPPED hint
so an appropriate IPv6 bind address is constructed even if -v
specifies an IPv4 presentation address, or a hostname with only IPv4
mappings.

We still use an IPv4 bind address if IPv6 support is compiled out or
the host does not support IPv6.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Cc: Marc Eshel &lt;eshel@us.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rpc.statd: Fix socket binding loop.</title>
<updated>2013-01-16T20:33:29+00:00</updated>
<author>
<name>Hemmo Nieminen</name>
<email>hemmo.nieminen@iki.fi</email>
</author>
<published>2013-01-16T20:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=eb8229338f060f3974fd5557c8bc86fdb9005a81'/>
<id>eb8229338f060f3974fd5557c8bc86fdb9005a81</id>
<content type='text'>
From: Hemmo Nieminen &lt;hemmo.nieminen@iki.fi&gt;

Instead of closing the sockets before requesting a new one, keep them
open until a suitable one is found. Otherwise bindresvport will return
the same port over and over again.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From: Hemmo Nieminen &lt;hemmo.nieminen@iki.fi&gt;

Instead of closing the sockets before requesting a new one, keep them
open until a suitable one is found. Otherwise bindresvport will return
the same port over and over again.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: Return status 0 on clean exits</title>
<updated>2012-10-15T20:08:34+00:00</updated>
<author>
<name>Mantas Mikulenas</name>
<email>grawity@gmail.com</email>
</author>
<published>2012-10-15T20:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=985f89a8a87f2626583b240f7abad86d97a77596'/>
<id>985f89a8a87f2626583b240f7abad86d97a77596</id>
<content type='text'>
Some init systems actually expect daemons to return 0 on success.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some init systems actually expect daemons to return 0 on success.

Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>autoconf: only link binaries that need it to libtirpc</title>
<updated>2012-01-16T19:40:21+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2012-01-16T19:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=a9b897fe1aaf4927478350d4e927cf69b45b8aab'/>
<id>a9b897fe1aaf4927478350d4e927cf69b45b8aab</id>
<content type='text'>
This patch is essentially the same as the previous version, but has
been respun to fix up some merge conflicts with some of Chuck's
recent changes.

When we first added tirpc support, we took a "big hammer" approach, and
had it add libtirpc to $LIBS. That had the effect of making it so that
that library was linked into every binary. That's unnecessary, and
wasteful with memory.

Don't let AC_CHECK_LIB add -ltirpc to $LIBS. Instead, have the autoconf
tests set $(LIBTIRPC) in the makefiles, and have the programs that
need it explicitly include that library. In the event that we're not
using libtirpc, then set $LIBTIRPC to a blank string.

This necessitates a change to the bindresvport_sa check too. Since that
library is no longer included in $LIBS, we need to convert that check
to use AC_CHECK_LIB instead of AC_CHECK_FUNCS.

This patch also fixes a subtle bug. If the library was usable, but the
includes were not, the test would set $enable_tirpc to "no", but
HAVE_LIBTIRPC would still be true. That configuration would likely
fail to build.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.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>
This patch is essentially the same as the previous version, but has
been respun to fix up some merge conflicts with some of Chuck's
recent changes.

When we first added tirpc support, we took a "big hammer" approach, and
had it add libtirpc to $LIBS. That had the effect of making it so that
that library was linked into every binary. That's unnecessary, and
wasteful with memory.

Don't let AC_CHECK_LIB add -ltirpc to $LIBS. Instead, have the autoconf
tests set $(LIBTIRPC) in the makefiles, and have the programs that
need it explicitly include that library. In the event that we're not
using libtirpc, then set $LIBTIRPC to a blank string.

This necessitates a change to the bindresvport_sa check too. Since that
library is no longer included in $LIBS, we need to convert that check
to use AC_CHECK_LIB instead of AC_CHECK_FUNCS.

This patch also fixes a subtle bug. If the library was usable, but the
includes were not, the test would set $enable_tirpc to "no", but
HAVE_LIBTIRPC would still be true. That configuration would likely
fail to build.

Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sm-notify: sm-notify leaves monitor records in sm.bak</title>
<updated>2011-09-20T11:33:03+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-09-19T18:23:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=10e9c07a18d7c8635def61ea19adbc47f2934853'/>
<id>10e9c07a18d7c8635def61ea19adbc47f2934853</id>
<content type='text'>
sm-notify fails to remove monitor records from sm.bak when it has
finally notified a host.  This is because of a recent change to send
two SM_NOTIFY requests for each monitored peer: one with the local
host's FQDN, and one with an unqualified version of same.  This was
commit baa41b2c: "sm-notify: Send fully-qualified and unqualified
mon_names" (March 19, 2010).

Because of the March 2010 commit, sm-notify modifies the "my_name"
string during notification, but then uses this modified string to try
to find the monitor record to remove.  Of course the search for the
record fails.  So a persistent monitor record is left in sm.bak.

Aside from leaving trash around, this causes the same hosts to be
notified after every reboot, even if they successfully responded to
the previous SM_NOTIFY and they had no contact with us during the last
boot.

I also noticed that the trick of truncating the argument of SM_NOTIFY
doesn't work at all if a substitute "my_name" was specified via the "-v"
command line option.  This patch attempts to address that as well.

sm-notify should preserve the original my_name string so that
nsm_delete_host() can find the correct monitor record to delete.  Also
add some degree of protection to the mon_name and my_name strings in
each nsm_host record to prevent a future change from breaking this
dependency.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.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>
sm-notify fails to remove monitor records from sm.bak when it has
finally notified a host.  This is because of a recent change to send
two SM_NOTIFY requests for each monitored peer: one with the local
host's FQDN, and one with an unqualified version of same.  This was
commit baa41b2c: "sm-notify: Send fully-qualified and unqualified
mon_names" (March 19, 2010).

Because of the March 2010 commit, sm-notify modifies the "my_name"
string during notification, but then uses this modified string to try
to find the monitor record to remove.  Of course the search for the
record fails.  So a persistent monitor record is left in sm.bak.

Aside from leaving trash around, this causes the same hosts to be
notified after every reboot, even if they successfully responded to
the previous SM_NOTIFY and they had no contact with us during the last
boot.

I also noticed that the trick of truncating the argument of SM_NOTIFY
doesn't work at all if a substitute "my_name" was specified via the "-v"
command line option.  This patch attempts to address that as well.

sm-notify should preserve the original my_name string so that
nsm_delete_host() can find the correct monitor record to delete.  Also
add some degree of protection to the mon_name and my_name strings in
each nsm_host record to prevent a future change from breaking this
dependency.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sm-notify: Avoid extra rpcbind queries</title>
<updated>2011-09-20T11:33:03+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-09-19T18:20:25+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=445082926141a116c9e93f9ccdd81039c5a2841b'/>
<id>445082926141a116c9e93f9ccdd81039c5a2841b</id>
<content type='text'>
The logic in notify_host() watches the host-&gt;retries counter to see if
progress is not being made.  If progress stalls, notify_host() tries
another IP address.  This means sm-notify will generate a fresh
rpcbind query.

After an RPC succeeds, be sure to reset host-&gt;retries so sm-notify
doesn't start walking down the host's addrinfo list when we _are_
making progress.  In the common case, if the host responds, we avoid
extra rpcbind queries and send all requests for the host to the same
IP address.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.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 logic in notify_host() watches the host-&gt;retries counter to see if
progress is not being made.  If progress stalls, notify_host() tries
another IP address.  This means sm-notify will generate a fresh
rpcbind query.

After an RPC succeeds, be sure to reset host-&gt;retries so sm-notify
doesn't start walking down the host's addrinfo list when we _are_
making progress.  In the common case, if the host responds, we avoid
extra rpcbind queries and send all requests for the host to the same
IP address.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sm-notify: Use correct retransmit timeout when sending a fresh RPC</title>
<updated>2011-09-20T11:33:03+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-09-19T18:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=a96f3700e4c0bb1b0ea92530cc4a48b8577eeb8f'/>
<id>a96f3700e4c0bb1b0ea92530cc4a48b8577eeb8f</id>
<content type='text'>
An RPC retransmit timeout should start out the same for each new RPC
request.  Don't increase the retransmit timeout after receiving the
reply to the rpcbind query.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.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>
An RPC retransmit timeout should start out the same for each new RPC
request.  Don't increase the retransmit timeout after receiving the
reply to the rpcbind query.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sm-notify: Refactor insert_host() and recv_rpcbind_reply()</title>
<updated>2011-09-20T11:33:03+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-09-19T18:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=c5c48cddec9e1e374c2db66ed69c216976e2fd79'/>
<id>c5c48cddec9e1e374c2db66ed69c216976e2fd79</id>
<content type='text'>
Clean up: refactor the logic in recv_rpcbind_reply() that re-schedules
an nsm_host into a separate helper function

Adjust debugging messages so it's always apparent when an nsm_host is
rescheduled.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.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>
Clean up: refactor the logic in recv_rpcbind_reply() that re-schedules
an nsm_host into a separate helper function

Adjust debugging messages so it's always apparent when an nsm_host is
rescheduled.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sm-notify: sm-notify doesn't handle localhost properly</title>
<updated>2011-08-29T17:43:28+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-08-29T17:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/simo/public_git/nfs-utils.git/commit/?id=bbd9f5a98c3a401371bc642ac8545b1ccfeeab4d'/>
<id>bbd9f5a98c3a401371bc642ac8545b1ccfeeab4d</id>
<content type='text'>
It looks like the existing algorithm for verifying the passed-in bind
address is as broken as statd_matchhostname() used to be: for IP
addresses, AI_CANONNAME is useless.  We need to have getnameinfo(3) or
equivalent in there.

Clean up: extract the logic that verifies the command line bind
address into its own function, and make it handle canonical name
lookup correctly.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.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>
It looks like the existing algorithm for verifying the passed-in bind
address is as broken as statd_matchhostname() used to be: for IP
addresses, AI_CANONNAME is useless.  We need to have getnameinfo(3) or
equivalent in there.

Clean up: extract the logic that verifies the command line bind
address into its own function, and make it handle canonical name
lookup correctly.

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