Bug 1463120 - 'nfsclient' resource is not inheriting 'mountpoint' attribute from 'fs' resource
'nfsclient' resource is not inheriting 'mountpoint' attribute from 'fs' resource
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents (Show other bugs)
6.9
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Oyvind Albrigtsen
cluster-qe@redhat.com
:
Depends On:
Blocks: 1374441 1461138
  Show dependency treegraph
 
Reported: 2017-06-20 03:51 EDT by Ondrej Faměra
Modified: 2017-11-11 10:30 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-11-08 10:18:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to nfsclient to allow the proper inheritance of 'mountpoint' attribute into 'path' attribute (1.18 KB, patch)
2017-06-20 03:51 EDT, Ondrej Faměra
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3237931 None None None 2017-11-11 10:30 EST

  None (edit)
Description Ondrej Faměra 2017-06-20 03:51:07 EDT
Created attachment 1289477 [details]
patch to nfsclient to allow the proper inheritance of 'mountpoint' attribute into 'path' attribute

=== Description of problem:
In documentation below we mention "nfsclient's path is inherited from the mountpoint and the fsid is added to the options string during export"
and following example that works as expected.
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Cluster_Administration/s1-clust-rsc-inherit-resc-reuse-CA.html

  <resources>
    <nfsclient name="bob" target="bob.example.com" options="rw,no_root_squash"/>
    <nfsclient name="jim" target="jim.example.com" options="rw,no_root_squash"/>
    <nfsexport name="exports"/>
  </resources>
  ...
  <fs name="1" mountpoint="/mnt/foo" device="/dev/sdb1" fsid="12344">
    <nfsexport ref="exports"> <!-- nfsexport's path and fsid attributes
                                   are inherited from the mountpoint &
                                   fsid attribute of the parent fs
                                   resource -->
      <nfsclient ref="bob"/> <!-- nfsclient's path is inherited from the
                                  mountpoint and the fsid is added to the
                                  options string during export -->
      <nfsclient ref="jim"/>
    </nfsexport>
  </fs> 

The above seems to suggest that 'nfsclient' inherits "mountpoint as path" from 'fs' resource.
According to resource agents this seems not to be true. The important role there plays
the 'nfsexport' resource which does the inheritance of 'mountpoint' and provides it later as 'path'
to child resources for inheriting.

Based on above documentation the following configuration fails
with '[nfsclient] No export path specified.'

  <resources>
    <nfsclient name="bob" target="bob.example.com" options="rw,no_root_squash"/>
    <nfsclient name="jim" target="jim.example.com" options="rw,no_root_squash"/>
    <nfsexport name="exports"/>
  </resources>
  ...
  <nfsexport ref="exports"> 
    <fs name="1" mountpoint="/mnt/foo" device="/dev/sdb1" fsid="12344">
      <nfsclient ref="bob"/>
      <nfsclient ref="jim"/>
    </fs> 
  </nfsexport>

=== Version-Release number of selected component (if applicable):
resource-agents-3.9.5-46.el6

=== How reproducible:
Always

=== Steps to Reproduce:
1. In rgmanager cluster make the 'nfsclient' to be a direct child of 'fs' resource 
  instead of being a direct child of 'nfsexport' resource. Example below.

  <resources>
    <nfsclient name="jim" target="jim.example.com" options="rw,no_root_squash"/>
    <nfsexport name="exports"/>
  </resources>
  ...
  <nfsexport ref="exports"> 
    <fs name="1" mountpoint="/mnt/foo" device="/dev/sdb1" fsid="12344">
      <nfsclient ref="jim"/>
    </fs> 
  </nfsexport>

2. Try to start the service containing this resource

=== Actual results:
Startup fails with error from nfsclient below:

  [nfsclient] No export path specified.

=== Expected results:
Service with this configuration starts and nfsclient uses the
'path' attribute inherited from fs's 'mountpoint' attribute.

=== Additional info:
Above issue impairs the reuse of resources as inheritance doesn't work and
attributes needs to be specified more than once and also resources cannot be
just referenced so they cannot be reused.

## Workaround:
  <resources>
    <nfsexport name="exports"/>
  </resources>
  ...
  <nfsexport ref="exports"> 
    <fs name="1" mountpoint="/mnt/foo" device="/dev/sdb1" fsid="12344">
      <nfsclient name="jim" target="jim.example.com" options="rw,no_root_squash" path="/mnt/foo"/>
    </fs> 
  </nfsexport>

## Proposed path to fix the behaviour
Attached to this bugzilla is patch against the /usr/share/cluster/nfsclient.sh resource agent that
is inheriting the 'path' from 'mountpoint' in case it is not inherited or specified manually.
Comment 9 Chris Feist 2017-11-08 10:18:16 EST
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production
3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent
Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and
will be marked as CLOSED/WONTFIX. If this remains a critical requirement,
please contact Red Hat Customer Support to request a re-evaluation of the
issue, citing a clear business justification. Note that a strong business
justification will be required for re-evaluation. Red Hat Customer Support can
be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/

Note You need to log in before you can comment on or make changes to this bug.