commit c75159a35ca3b1964d753ed5693077db4b3dcf4c Author: Steve Dickson Date: Fri Feb 19 14:56:33 2021 -0500 exportd: Added config variable to compile in the NFSv4 only server. Added the --enable-nfsv4server configuration flag that will compile/install nfsv4.exportd and install the systemd unit files. Signed-off-by: Steve Dickson commit b5aa8378e1a100898d8e0dd628eb704c68667027 Author: Steve Dickson Date: Thu Feb 18 17:42:54 2021 -0500 exportd: systemd unit files Created two new systemd unit services based on nfs-mountd and nfs-service Signed-off-by: Steve Dickson commit bb0d6c1e78b736052173a9c827329f2bc3487046 Author: Steve Dickson Date: Tue Feb 9 14:49:30 2021 -0500 exportd: Enabled junction support Moved the junction support from mountd to libexport.a so both exportd and mountd can use the code. Signed-off-by: Steve Dickson commit 4de39cf12119f4e2c81421d55e5cbface816e3f9 Author: Steve Dickson Date: Tue Feb 9 14:12:34 2021 -0500 exportd/exportfs: Add the state-directory-path option Ported state-directory-path option from mountd (commit a15bd948) Signed-off-by: Steve Dickson commit bcbd8553720b48607352e929f5edaddd9ee74d4c Author: Steve Dickson Date: Tue Feb 9 11:25:38 2021 -0500 exportd: multiple threads Ported the multiple thread code from mountd (commit 11d34d11) Signed-off-by: Steve Dickson commit 15dc0bead10d20c31e72ca94ce21eb66dc3528d5 Author: Steve Dickson Date: Mon Feb 1 13:49:14 2021 -0500 exportd: Moved cache upcalls routines into libexport.a Move the cache management code into libexport.a so both mountd and exportd can use it. Introduce cache_proccess_loop() which will be used by exportd, instead of my_svc_run(). Signed-off-by: Steve Dickson commit 6912b308ea1052a61f92cb5a3bd867817dbffc82 Author: Steve Dickson Date: Thu Feb 18 17:29:23 2021 -0500 exportd: the initial shell of the v4 export support Signed-off-by: Steve Dickson commit e7726f3050cc687832ba1f4fdc515ac8b819e1e9 Author: Steve Dickson Date: Thu Feb 18 12:53:46 2021 -0500 nfs-utils: rename xlog_from_conffile() to xlog_set_debug() Standardized how config setting are set as well as the rename Signed-off-by: Steve Dickson commit 43407c5f489f3811ce746a4aeb2c39ef106a4b6f Author: Steve Dickson Date: Mon Feb 1 17:52:16 2021 -0500 mountd: Add debug processing from nfs.conf Signed-off-by: Steve Dickson commit 9967783fb4c823f0d045e629c419ecd38340d1aa Author: Steve Dickson Date: Mon Feb 1 17:18:39 2021 -0500 mountd: Cleanup how config options are read in Signed-off-by: Steve Dickson commit bb6e641e8bd3f38cf29a9d927cd9162c6fbfc5f0 Author: Steve Dickson Date: Tue Feb 2 11:02:47 2021 -0500 mount: fix parsing of default options A recent patch to change configfile.c to use parse_opt.c contained code which was intended to remove all "default*" options from the list before that could be passed to the kernel. This code didn't work, so default* options WERE passed to the kernel, and the kernel complained and failed the mount attempt. A more recent patch attempted to fix this by not including the "default*" options in the option list at all. This resulting in global-default defaults over-riding per-mount or per-server defaults. This patch reverse the "more recent" patch, and fixes the original patch by providing correct code to remove all "default*" options before the kernel can see them. Fixes: 88c22f924f1b ("mount: convert configfile.c to use parse_opt.c") Fixes: 8142542bda28 ("mount: parse default values correctly") Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 8142542bda28401802b4537d24dce21d3555440e Author: Steve Dickson Date: Wed Jan 6 13:12:12 2021 -0500 mount: parse default values correctly Commit 88c22f92 converted the configfile.c routines to use the parse_opt interfaces which broke how default values from nfsmount.conf are managed. Default values can not be added to the mount string handed to the kernel. They must be interpreted into the correct mount options then passed to the kernel. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1912877 Signed-off-by: Steve Dickson commit cb5f167cf9c2af94d9928c1ee3aa72c8e5c812f4 Author: J. Bruce Fields Date: Sat Dec 26 14:21:10 2020 -0500 mountd: never root squash on the pseudofs As with security flavors and "secure" ports, we tried to code this so that pseudofs directories would inherit root squashing from their children, but it doesn't really work as coded and I'm not sure it's useful. Let's just not root squash. The risk is pretty low since the pseudofs is readonly, and we'd rather not risk failing a mount unnecessarily. Signed-off-by: J. Bruce Fields Signed-off-by: Steve Dickson commit 0b83ba9466b27a54672c75ad651ebb2535afecf1 Author: J. Bruce Fields Date: Sat Dec 26 14:18:12 2020 -0500 mountd: allow high ports on all pseudofs exports We originally tried to grant permissions on the v4 pseudoroot filesystem that were the absolute minimum required for a client to reach a given export. This turns out to be complicated, and we've never gotten it quite right. Also, the tradition from the MNT protocol was to allow anyone to browse the list of exports. So, do as we already did with security flavors and just allow clients from high ports to access the whole pseudofilesystem. Signed-off-by: J. Bruce Fields Signed-off-by: Steve Dickson commit 6197686b92fe969087bdf4c1ff25e99e8d05af5a Author: NeilBrown Date: Wed Dec 16 12:09:40 2020 -0500 mount: update nfsmount.conf man page Multiple changes including: - using \[dq] for double quotes rather than \(lq and \(rq. In almost every case, a regular ASCII double quote is being referred to, so that is what we should use. - clean up indenting in examples. - be explicit about case-insensitive matching. - give more details about permitted options, including the need to use =true and =false for flags - explain Backgroud, Forground and Sloppy - remain trailing white space Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit f1d3d7f5b65f9e37f27963bef398bd8e36c18b43 Author: NeilBrown Date: Wed Dec 16 12:08:42 2020 -0500 mount: don't add config-file protcol version options when already present. If there is already an option specifying the protocol version, whether from the command line or from an earlier config section, don't add new version options. There are multiple different version options, so they need to be handled differently from other options. There could in the future be more options that start "v4.", e.g. "v4.3" might happen one day. So rather than list possible "v4.x" options, handle "v4." separately. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 413ca3626e2c9e3ed82da0ff45441651af5f6fca Author: NeilBrown Date: Wed Dec 16 12:04:44 2020 -0500 mount: options in config file shouldn't over-ride command-line options. When reading from the config file, we already ignore options that exist on the command line, or that were already found earlier in the config file. However this only works for exact matches of options. e.g. if "noac" is on the command line and "ac=true" is in the config file, then "ac" will be added, and this will be used. Add tests for the "no" prefix, and also for "fg" vs "bg", so that if "fg" is set on the command line, a "bg" or "background" setting in the config file does not over-ride it. Note that this *doesn't* handle the different protocol version specifiers. That will come later. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 88c22f924f1b71c1efd13945f05f5cbfa370acc4 Author: NeilBrown Date: Wed Dec 16 12:01:03 2020 -0500 mount: convert configfile.c to use parse_opt.c configfile.c contains some ad-hoc parsing of the comma-separated option list, which uses a simple 'strstr' and can find options that don't really match the searched-for option (the found options might have a prefix). It also has a list of options which duplicates the functionality in parse_opt. This can be simplified by using parse_opt directly. We split the original arguments, optionally append new arguments if they don't already exist, then recombine. "defaultfoo" config options require special handling. The default_value() call is now made as soon as the option has been parsed. It is left on the options list so that new instances of the value are ignored. Then all "defaultfoo" options are remove from the list at the end. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 545d1edf840fad1b75e26e7c4b2cbad2f6207913 Author: NeilBrown Date: Wed Dec 16 11:58:57 2020 -0500 Revert "mount.nfs: merge in vers= and nfsvers= options" This reverts commit 8110103404b35d9e86057ef0764f8aa87585f455. Using mnt_alias_tab[] to handle options which are synonyms isn't really a good fit. This sort-of works, but in part only because 'strstr()' is used for matching so "vers=" is found when "nfsvers=" is present. This doesn't handle other version-setting options like v2, v3, v4.x. So remove this commit to make room for a better solution. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit aef1975967be87b02052623344e6416d73aec1b2 Author: NeilBrown Date: Wed Dec 16 11:56:35 2020 -0500 mount: report error if multiple version specifiers are given. The NFS version can be requested with multiple different options: v2 v3 v4 v4.x vers=x nfsvers= If multiple versions are given with different options, the choice of which wins is quite ideosyncratic. It certainly isn't simple "last one wins" as with some other options. Rather than providing a coherent rule, simply make multiple version specifiers illegal. This requires enhancing po_contains_prefix() to be able to look beyond the first match, it see if there are multiple matches with the same prefix, as well as checking all prefixes to see if more than one matches. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 6340864d27b6df82ea70ac81405332cc20899e6c Author: NeilBrown Date: Wed Dec 16 11:53:14 2020 -0500 mount: configfile: remove whitesspace from end of lines While space at end of line is ugly.. especially when your editor is configured to show it in RED. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit bdd4539c082a09334092ab679bfcf9dea4ae7b46 Author: Ulrich Olmann Date: Wed Dec 16 11:12:15 2020 -0500 nfsd: clean up option parsing Presumably by mistake in commit [1] the unknown option 'i' slipped in together with a duplicated 't', so remove them from the optstring. [1] fbd7623dd8d5 ("nfsd: don't enable a UDP socket by default") Signed-off-by: Ulrich Olmann Signed-off-by: Steve Dickson commit ba90d61be3abca5a699765ce08759ca6b986781d Author: Steve Dickson Date: Thu Dec 10 14:05:23 2020 -0500 exports.man: Remove some outdated verbiage Years ago, commit 6a7d90cea765 removed the warning this verbiage was talking about, but was never removed from the man page. Signed-off-by: Steve Dickson commit 003000d451833309c963054e58a48fa1df7e767b Author: Steve Dickson Date: Thu Dec 10 13:13:03 2020 -0500 exportfs: Ingnore export failures in nfs-server.serivce unit With some recent commits, exportfs will continue on trying to export filesystems even when an entry is invalid or does not exist, but will still have a non-zero exit to report the error. This situation should not stop the nfs-server service from comingup so nfs-server.service file should ignore these types of failures Signed-off-by: Steve Dickson commit 069f59a8ea648ee91436af42ed9d1982c5dbf97a Author: Steve Dickson Date: Mon Nov 9 14:34:15 2020 -0500 nfs-v4client.target: NFSv4 only client target. To allow v4 only clients, create an systemd nfs-client target that does not "Wants" a rpc-statd notify Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1886634 Signed-off-by: Steve Dickson commit 87e7690ef04fa23d01177cfbe4b778b4a2f1db96 Author: Steve Dickson Date: Thu Nov 5 09:21:49 2020 -0500 manpage: Update nfs.conf and nfsmount.conf manpages Update the man pages to explain how the config.d directories will be use. Signed-off-by: Steve Dickson commit 5bc378a01e74f31b3b7e7528454efe2515694c74 Author: Steve Dickson Date: Tue Nov 3 14:59:02 2020 -0500 conffile: Only process files in the config.d dirs that end with ".conf" To allow admins or admin systems to change configurations by renaming the files, only process file that end with ".conf" Signed-off-by: Steve Dickson commit 15e17993e336acffa590cd4ac3ca1470ad5ef85d Author: Steve Dickson Date: Mon Nov 9 12:06:41 2020 -0500 conffile: process config.d directory config files. When a /etc/nfs.conf.d or /etc/nfsmount.conf.d directory exists and config file(s) do exist in those directories, those file(s) will be used and will override the same settings that are set in the main config files. Signed-off-by: Steve Dickson commit a5e4a6f54cfda1eb245bfb8c03acff3c57672155 Author: Holger Hoffst?tte Date: Sat Oct 31 12:20:38 2020 -0400 nfs-utils: remove leftover debugging messages After updating to nfs-utils-2.5.2 I noticed extra output on the console when exporting mounts. Apparently commit 482e72ba04 forgot to remove some debugging messages and accidentally committed them. Signed-off-by: Holger Hoffst?tte Signed-off-by: Steve Dickson commit f5f3a9d93dceedddf6c4037d8534f152621e2c52 Author: Rohan Sable Date: Sat Oct 31 12:11:29 2020 -0400 mountstats: handle KeyError in display_raw_stats While printing Nfsv4ops from older /proc/self/mountstats e.g. in 2.6.32-754.el6.x86_64 from RHEL 6.10, it will not have all the Keys present leading to a KeyError like below : Traceback (most recent call last): File "nfs-utils/tools/mountstats/mountstats.py", line 1131, in res = main() File "nfs-utils/tools/mountstats/mountstats.py", line 1120, in main return args.func(args) File "nfs-utils/tools/mountstats/mountstats.py", line 860, in mountstats_command print_mountstats(stats, args.nfs_only, args.rpc_only, args.raw, args.xprt_only) File "nfs-utils/tools/mountstats/mountstats.py", line 813, in print_mountstats stats.display_raw_stats() File "nfs-utils/tools/mountstats/mountstats.py", line 381, in display_raw_stats print('\t%12s: %s' % (op, " ".join(str(x) for x in self.__rpc_data[op]))) KeyError: 'FSID_PRESENT' Signed-off-by: Rohan Sable Signed-off-by: Steve Dickson