| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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 <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its been reported that having the rpc-statd-notify service
depend on network.target instead network-online.target
decrease boot times as much as 10 seconds on some
installs
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1183293
Signed-off-by: Steve Dickson <steved@redhat.com>
Reported-by: Eric Work <work.eric@gmail.com>
|
|
|
|
|
|
|
|
| |
Normalize the mountpoints passed on the command line so that commands
like 'mountstats /mnt/' succeed rather than fail.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When I changed mountstats to use the argparse module, I neglected to
make the subcommand functions return any values even though main() was
looking for them. Also removed SystemExit from the except clause at
the end of the program since it was causing the program to always exit
with a status of 1.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
The option to activate the install of systemd service files
was never taken into account.
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Valgrind shows that the memory allocated for ee.e_hostname in
getexportent() is being leaked. While there _is_ a call to xfree(), by
the time it gets called the leak's already happened. Moving the xfree()
call so that it occurs before the assignment that overwrites ee fixes
this.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rpc.statd may crash if it receives both a notification reply and a
client connection at the same time. It crashes because it adds
sockfd to SVC_FDSET and that violates the API contract.
The SVC_FDSET is to be considered read-only and must not be modified
by user code. The daemon modifies it for expediency to avoid
having to maintain two distinct fd lists and select on each one.
It is a practical choice that makes sense.
Thus, if a notification reply arrives by itself everything works,
or if a client connection arrives by itself everything works. Both
must arrive at the same time for sockfd to be set in SVC_FDSET
and to be processed by svc_getreqset because more than one of
readfds is ready.
It is the processing by svc_getreqset that will crash when it finds an
unregistered fd in the list that doesn't correlate to any of the
internal book keeping done by the library. At present the glibc
SunRPC library will crash, but TIRPC does not (it is robust against
invalid API usage in this case). However, future RPC libraries
may be implemented differently, and the questionable API usage
should be fixed.
The simplest fix is for process_reply to *clear* sockfd from the
ready-to-read fds, since it was never registered with xprt_register.
This works because the code always calls process_reply before handing
the fd set to the RPC layer for processing.
Compile-tested on x86_64 against master.
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
- note that 'nohide' is irrelevant for NFSv4
- note that children on a 'crossmnt' filesystem cannot be unexported
- note that 'nocrossmnt' is a valid option, but probably not useful.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the (exported) path passed to next_mnt() is simply "/", next_mnt()
will not report any children, as none start with "/" followed by a '/'.
So make a special case for strlen(p)==1. In that case, return all
children.
This gives correct handling if only "/" is exported.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Acked-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rpc-statd-notify only needs to wait for the network
interface to be configured not to be connected since
it forks into background and will wait 15mins for
the network to come up.
This decrease boot times when networks are not
and will not be connected.
Signed-off-by: Steve Dickson <steved@redhat.com>
Reported-By: Eric Work <work.eric@gmail.com>
|
|
|
|
|
|
|
|
| |
daemon_init parameter has the opposite sense
to code removed in commit 7addf9d
Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
| |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
| |
Added a couple default values to the flag descriptions
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Reworked the configuration flags. If the default
is on the used --disable to turn off. If the
default is off use --enable to turn on.
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
At this point the gssproxy is better option than the
svcgssd so the support is off by default.
Use --enable-svcgss to re-enable the support
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Enable IPv6 support to be on by default. Use
the --disable-ipv6 flag to disable the support
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Comments in bash starts with '#' not '*'
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Commit ee80d0aa enabled the mount config file but did
not set the enable_mountconfig variable.
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Stumbled across this function, just had to simplify it. No mallocs
necessary, one quick loop to find the parameters. Much simpler.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Make full use of inotify by not rescanning the whole tree on each change,
instead keep track of the inotify events and make sure that the minimum
work (scan/create/delete) clients is done in most cases. Still detect
anomalies and perform a full rescan in those cases.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Save some more memory by using relative pathnames.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
This is just the first step, replacing dnotify with an inotify
implementation that is not much better (still does a complete
rescan of the whole rpc_pipefs tree on each change).
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
There's a lot of fixed buffers in use here. Clean up the code and
add more documentation on the different formats that have been
used by the kernel.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Simplify the code responsible for the client dir scanning. This
is also in preparation for the inotify patches.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Simplify and refactor the code that does the topdir scanning, this
is in preparation for the inotify patches.
Signed-off-by: David H?rdeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Using more relative paths saves memory and lets us get rid of more
PATH_MAX fixed arrays.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Keep the rpc_pipefs dir open and just do a rewind/rescan when
necessary.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
This makes it easier to keep track of which client belongs
to which topdir.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
This code is mostly just confusing. Close the fds immediately
instead of doing so later.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Using libevent (which is already in use in idmap) saves about a hundred
lines of hand-rolled event loop code.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Move all rpc_pipefs scanning code from gssd_proc.c to gssd.c in
preparation for later patches.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
By chdir():ing to the root of the rpc_pipefs dir and making paths
relative from there (gssd already keeps a number of files open
in rpc_pipefs so chdir doesn't suddenly make it impossible to
umount rpc_pipefs because of this patch).
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
| |
Get rid of another arbitrary limitation and PATH_MAX array.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Using PATH_MAX in modern code is almost always a bad idea. Simplify
the code and remove that arbitrary limitation at the same time.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Having all the main loop code in one file is important in preparation
for later patches which add inotify and libevent.
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The daemonization init/ready functions have parameters that are never used,
require the caller to keep track of some pipefds that it has no interest in
and which might not be used in some scenarios. Cleanup both functions a bit.
The idea here is also that these two functions might be good points to
insert more systemd init code later (sd_notify()).
Also, statd had a private copy of the daemonization code for unknown
reasons...so make it use the generic version instead.
Signed-off-by: David H?rdeman <david@hardeman.nu>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update nfsmount.conf to allow minor version specification, and rearrange
the autonegotiation logic to agreed upon best behavior. Depending upon the
combination of values specified within nfsmount.conf and given to mount.nfs,
the retry behavior of mount.nfs varies according to the general rule of
defaulting to the most specific setting, with some exceptions. A
general guide to the expected behavior follows:
------------------
| nfsmount.conf |-----------------------------------
| Defaultvers= | arg option | attempts: |
|---------------------------------------------------|
| 4.2 | not set | v4.2 v4.1 v4.0 v3 |
| 4.2 | v4 | v4.2 v4.1 v4.0 |
| 4.1 | not set | v4.1 v4.0 v3 |
| 4.1 | v4 | v4.1 v4.0 |
| 4 | not set | v4.0 v3 |
| 4 | v4 | v4.0 |
| 3 | not set | v3 |
| any set | v4.2 | v4.2 |
| any set | v4.1 | v4.1 |
| any set | v4 | v4.0 |
| any set | v3 | v3 |
| not set | not set | v4.2 v4.1 v4.0 v3 |
-----------------------------------------------------
If built with --enable-mountconfig=no, then the behavior is the same as if
nfsmount.conf did not set Defaultvers.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In order to make decisions about which default version to use when only the
major version is specified, the nfsmount.conf Defaultvers options should
always be parsed, even when a version has already been specified. Remove
the check and bypass for parsing the Defaultvers options from
nfsmount.conf.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The nfs_version needs to carry major, minor, and basic mode information to
allow decisions to be made to override, discard, or negotiate various
versions. Update nfs_nfs_version() to work against this struct and set the
various modes. This change also makes nfs_nfs_version() parse properly
for future version number additions.
The general rules for version.v_mode are
- not set V_DEFAULT
- single digit => 4 V_GENERAL
- single digit < 4 V_SPECIFIC
- decimal included V_SPECIFIC
- miss all others V_PARSE_ERR
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The version options (v3,v4,v4.2) may increase in the future, but they have
a predictable prefix. Add a parse option helper to locate and return these
options by prefix so that a future increment of version does not require the
addition of strings to a search table.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
| |
rpc.idmapd aborts on start-up if RPC pipefs is not present.
Needed if GSS services are not used.
Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Even though the 'new' idmapper used by the client has been around for
several years, a lot of users seem to be unaware of its existence.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 8534063 (configure: use pkg-config to find libtirpc), we
are missing the check for authgss_free_private_data in libtirpc.
Restore this check, and adapt so that it works in both the pkg-config
case and in the "old code" case.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Chuck Lever <check.lever@oracle.com>
Cc: Steve Dickson <SteveD@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 8534063 (configure: use pkg-config to find libtirpc), we use
pkg-config to check for libtirpc (he!).
As reported on the list, some user do not have the libtirpc registered
with pkg-config (even though it has been since at least 0.1.8).
So, partially restore the old checking code, as it was before 8534063,
but adapted to work with the pkg-config check, and also adapted to only
use proper macros (AS_IF) instead of shell constructs.
Re-introduce that old code in a separate function, so it is easy to get
rid of when we only want to support pkg-config in the future (i.e. when
virtually all libtirpc versions in the wild have been properly
installed).
Reported-by: Chuck Lever <check.lever@oracle.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Steve Dickson <SteveD@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we check for libtirpc >= 0.2.4 with pkg-config, because that
is the one version I had to test against.
As reported on the list, however, older versions are also supported.
Relax the check to not require a version at all, and accept any version
of libtirpc.
Reported-by: Chuck Lever <check.lever@oracle.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Steve Dickson <SteveD@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
|
|
|
|
|
| |
Using EVLIST_INIT directly is bound to break. This seems to be a
leftover from legacy code.
Reported-by: Holger Hoffstatte <holger.hoffstaette@googlemail.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
|