ClusterLabs/resource-agents — pull request #442 by bensallen (2014-06-13 22:34:46+00:00)
Title: Start the nfs.target before nfs-lock and nfs-server for RHEL7

Per https://bugzilla.redhat.com/show_bug.cgi?id=1051052 and https://bugzilla.redhat.com/show_bug.cgi?id=970595, nfs.target should be enabled to allow nfs-server to start successfully on systemd based Fedora/RHEL installs. In the resource-agent's case we want to start the nfs.target before nfs-lock and nfs-server are started. Otherwise nfs-server will fail to start after a reboot with:

systemd: Dependency failed for NFS Remote Quota Server.
systemd: Dependency failed for NFSv4 ID-name mapping daemon.

This fix should be safely ignored by non-systemd systems, as nfs_target_exec will return 0 if EXEC_MODE is not 2. I've tested this fix on RHEL7.

Thanks,

Ben