Bug 14444 - CTDB NFS scripts needs to use nfsconf to set some variables on systems that use nfs.conf
Summary: CTDB NFS scripts needs to use nfsconf to set some variables on systems that u...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.12.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-20 00:21 UTC by Martin Schwenke
Modified: 2020-08-11 07:21 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.13, 4.12 (4.27 KB, patch)
2020-07-28 09:48 UTC, Martin Schwenke
amitay: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schwenke 2020-07-20 00:21:20 UTC
On recent Fedora/RHEL/CentOS systems NFS is configured via /etc/nfs.conf.  If /etc/sysconfig/nfs exists then a conversion process moves it out of the way.  This means that there is no sane way of configuring NFS_HOSTNAME for statd-callout.  statd-callout does not use load_script_config() so the relevant configuration files are not a useful option.

The best option, since only statd-callout requires this value, is to have statd-callout use the nfsconf program to get the value of [statd]:name.
Comment 1 Martin Schwenke 2020-07-20 02:08:18 UTC
Further checking...

nfs-linux-kernel-callout is not broken in service_start() because /etc/nfs.conf will only be used on platforms that use systemd, so the RPC services will never be hand-restarted on those platforms.

However, nfs_check_thread_count() has a similar problem to the one in statd-callout.
Comment 2 Martin Schwenke 2020-07-28 09:48:52 UTC
Created attachment 16143 [details]
Patch for 4.13, 4.12

Patch for v4-13-test and v4-12-test.
Comment 3 Amitay Isaacs 2020-07-30 07:46:35 UTC
Hi Karolin,

This is ready for v4-12 and v4-13.

Thanks.
Comment 4 Karolin Seeger 2020-08-06 11:25:53 UTC
(In reply to Amitay Isaacs from comment #3)
Hi Amitay!

Pushed to autobuild-v4-{13,12}-test.
Comment 5 Karolin Seeger 2020-08-11 07:21:45 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to both branches.
Closing out bug report.

Thanks!