Fix the functional gating test

When the test is run in OSCI, all the packages from the build are
installed - not just nfs-utils.  The nfsv4-client-utils package installs
/etc/nfsmount.conf.d/10-nfsv4.conf config snippet, which we need to
disable before we do the version negotiation test or it will fail.

Resolves: RHEL-65829
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
This commit is contained in:
Scott Mayhew 2024-11-12 17:54:46 -05:00
parent 8fd342f0c8
commit a80d8799c2
2 changed files with 10 additions and 1 deletions

View File

@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
Name: nfs-utils
URL: http://linux-nfs.org/
Version: 2.7.1
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 1
# group all 32bit related archs
@ -429,6 +429,9 @@ rm -rf /etc/systemd/system/rpc-*.requires
%{_mandir}/*/nfsiostat.8.gz
%changelog
* Tue Nov 12 2024 Scott Mayhew <smayhew@redhat.com> - 2.7.1-3
- Fix the functional gating test (RHEL-65829)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:2.7.1-2
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018

View File

@ -46,6 +46,9 @@ done
echo "Check nfs negotiation"
echo -e "[nfsd]\n vers3=y\n vers4=n" > /etc/nfs.conf
if [ -f /etc/nfsmount.conf.d/10-nfsv4.conf ]; then
mv /etc/nfsmount.conf.d/10-nfsv4.conf /etc/nfsmount.conf.d/10-nfsv4.conf.disabled
fi
systemctl restart nfs-server
showmount -e | grep -q export_test
[ $? -ne 0 ] && echo "Failed to export nfs" && exit 1
@ -69,5 +72,8 @@ systemctl stop nfs-server
cp /etc/nfs.conf.bak /etc/nfs.conf
cp /etc/exports.bak /etc/exports
rm -rf /export_test /mnt_test
if [ -f /etc/nfsmount.conf.d/10-nfsv4.conf.disabled ]; then
mv /etc/nfsmount.conf.d/10-nfsv4.conf.disabled /etc/nfsmount.conf.d/10-nfsv4.conf
fi
exit 0