Bug 1590953

Summary: CinderNetappNfsMountOptions missing from puppet manifest
Product: Red Hat OpenStack Reporter: Alan Bishop <abishop>
Component: puppet-tripleoAssignee: Alan Bishop <abishop>
Status: CLOSED ERRATA QA Contact: Avi Avraham <aavraham>
Severity: medium Docs Contact: Kim Nylander <knylande>
Priority: medium    
Version: 12.0 (Pike)CC: aavraham, abishop, cpaquin, jamsmith, jjoyce, jschluet, knylande, nlevinki, pmannidi, sclewis, slinaber, srevivo, tshefi, tvignaud
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: puppet-tripleo-7.4.12-3.el7ost Doc Type: Bug Fix
Doc Text:
This update fixes an issue that prevented users from configuring Netapp NFS mount options via the TripleO Heat parameter. Prior to this update, the Cinder Netapp backend ignored the CinderNetappNfsMountOptions TripleO Heat parameter, preventing configuration of the Netapp NFS mount options via the TripleO Heat parameter. The code responsible for handling Cinder's Netapp configuration no longer ignores the CinderNetappNfsMountOptions parameter. The CinderNetappNfsMountOptions parameter correctly configures Cinder's Netapp NFS mount options.
Story Points: ---
Clone Of: 1590952 Environment:
Last Closed: 2018-08-20 13:01:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alan Bishop 2018-06-13 18:02:03 UTC
+++ This bug was initially created as a clone of Bug #1590952 +++

+++ This bug was initially created as a clone of Bug #1567368 +++

Description of problem:

cinder-netapp.yaml has a parameter for nfs mount options

CinderNetappNfsMountOptions 

This param is referenced in /usr/share/openstack-tripleo-heat-templates/puppet/extraconfig/pre_deploy/controller/cinder-netapp.yaml

The specific line is below. 

cinder::backend::netapp::nfs_mount_options: {get_input: NetappNfsMountOptions}

However, the puppet template , /etc/puppet/modules/tripleo/manifests/profile/base/cinder/volume/netapp.pp
does not include NFS mount options, inline with the other values such as  what is shown below.

cinder::backend::netapp { $backend_name :
      netapp_login                 => hiera('cinder::backend::netapp::netapp_login', undef),
      netapp_password              => hiera('cinder::backend::netapp::netapp_password', undef),
      netapp_server_hostname       => hiera('cinder::backend::netapp::netapp_server_hostname', undef),
      netapp_server_port           => hiera('cinder::backend::netapp::netapp_server_port', undef),
      netapp_size_multiplier       => hiera('cinder::backend::netapp::netapp_size_multiplier', undef),
      netapp_storage_family        => hiera('cinder::backend::netapp::netapp_storage_family', undef),
      netapp_storage_protocol      => hiera('cinder::backend::netapp::netapp_storage_protocol', undef),
      netapp_transport_type        => hiera('cinder::backend::netapp::netapp_transport_type', undef),
      netapp_vfiler                => hiera('cinder::backend::netapp::netapp_vfiler', undef),
      netapp_volume_list           => hiera('cinder::backend::netapp::netapp_volume_list', undef),
      netapp_vserver               => hiera('cinder::backend::netapp::netapp_vserver', undef),
      netapp_partner_backend_name  => hiera('cinder::backend::netapp::netapp_partner_backend_name', undef),
      nfs_shares                   => $cinder_netapp_nfs_shares,
      nfs_shares_config            => hiera('cinder::backend::netapp::nfs_shares_config', undef),
      netapp_copyoffload_tool_path => hiera('cinder::backend::netapp::netapp_copyoffload_tool_path', undef),
      netapp_controller_ips        => hiera('cinder::backend::netapp::netapp_controller_ips', undef),
      netapp_sa_password           => hiera('cinder::backend::netapp::netapp_sa_password', undef),
      netapp_storage_pools         => hiera('cinder::backend::netapp::netapp_storage_pools', undef),
      netapp_eseries_host_type     => hiera('cinder::backend::netapp::netapp_eseries_host_type', undef),
      netapp_webservice_path       => hiera('cinder::backend::netapp::netapp_webservice_path', undef),
    }
  }



How reproducible:
Deploy cinder netapp backend, attempt to set nfs mount options using override in a template, deploy completes however, no value for CinderNetappNfsMountOptions is not set.

Comment 6 Tzach Shefi 2018-07-19 13:48:28 UTC
Unsetting depends on 1590952, IMHO set by mistake. 
That bug is just an OSP13 clone of this bz.

Comment 7 Tzach Shefi 2018-07-23 09:43:32 UTC
Alan, 
Need your input on a few things here. 

While looking here:
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/12/html/netapp_block_storage_back_end_guide/edityaml

I'm instructed to use this yaml:
/usr/share/openstack-tripleo-heat-templates/environments/cinder-netapp-config.yaml


Problem number 1. 

cat /usr/share/openstack-tripleo-heat-templates/environments/cinder-netapp-config.yaml                                                                                                                                                                      
# *************************************************************************************                                                                                                                                                      
# DEPRECATED: Use tripleo-heat-templates/environments/storage/cinder-netapp-config.yaml                                                                                                                                                      
# instead.                                                                                                                                                                                                                                   
# ************************************************************************************* 

Which yaml should I use? 
I've opened a doc bug suggesting we may need to/should correct yaml path on OPSD 12 guide. 

Any way oddly the old path managed to deploy while the new path failed

2. Cloned below yaml path to /home/stack/virt/
/usr/share/openstack-tripleo-heat-templates/environments/cinder-netapp-config.yaml    

Filled with bogus data, hope on correct places lines, looking like this: 

cat /home/stack/virt/cinder-netapp-config.yaml
# *************************************************************************************
# DEPRECATED: Use tripleo-heat-templates/environments/storage/cinder-netapp-config.yaml
# instead.
# *************************************************************************************
# A Heat environment file which can be used to enable a
# a Cinder NetApp backend, configured via puppet
resource_registry:
  OS::TripleO::Services::CinderBackendNetApp: /usr/share/openstack-tripleo-heat-templates/puppet/services/cinder-backend-netapp.yaml

parameter_defaults:
  CinderEnableNetappBackend: true
  CinderNetappBackendName: 'tripleo_netapp'
  CinderNetappLogin: 'root'
  CinderNetappPassword: 'root'
  CinderNetappServerHostname: '10.35.160.111'
  CinderNetappServerPort: '80'
  CinderNetappSizeMultiplier: '1.2'
  CinderNetappStorageFamily: 'ontap_cluster'
  CinderNetappStorageProtocol: 'nfs'
  CinderNetappTransportType: 'http'
  CinderNetappVfiler: ''
  CinderNetappVolumeList: ''
  CinderNetappVserver: ''
  CinderNetappPartnerBackendName: 'netapp'
  CinderNetappNfsShares: '/cinder/'
  CinderNetappNfsSharesConfig: '/etc/cinder/shares.conf'
  CinderNetappNfsMountOptions: 'nfs3'
  CinderNetappCopyOffloadToolPath: ''
  CinderNetappControllerIps: '10.35.160.111'
  CinderNetappSaPassword: 'root'
  CinderNetappStoragePools: ''
  CinderNetappHostType: ''
  CinderNetappWebservicePath: '/devmgr/v2'


Deployment completed but I see no mention of nfsmount options nfs3, yeah I know it ain't a valid mount option but I figured it should just push it to cinder.conf any way. Not like I have a netapp to actually test with TLV.  



Tail of the resulting cinder.conf:

[tripleo_netapp]
volume_backend_name=tripleo_netapp
volume_driver=cinder.volume.drivers.netapp.common.NetAppDriver
netapp_login=root
netapp_password=root
netapp_server_hostname=10.35.160.111
netapp_server_port=80
netapp_size_multiplier=1.2
netapp_storage_family=ontap_cluster
netapp_storage_protocol=nfs
netapp_transport_type=http
netapp_vfiler=
netapp_vserver=
netapp_partner_backend_name=netapp
expiry_thres_minutes=720
thres_avl_size_perc_start=20
thres_avl_size_perc_stop=60
nfs_shares_config=/etc/cinder/shares.conf
netapp_copyoffload_tool_path=
netapp_controller_ips=10.35.160.111
netapp_sa_password=root
netapp_pool_name_search_pattern=()
netapp_webservice_path=/devmgr/v2
nas_secure_file_operations=False
nas_secure_file_permissions=False

To sum up things:
1. which yaml path is the valid one with or without /storage/?
2. Should have my yaml+data produced a correct backend on cinder.conf including mount options or am I doing something wrong?

Comment 8 Alan Bishop 2018-08-06 12:21:50 UTC
Tzach,

You definitely want to base your env settings on the tht/environments/cinder-netapp-config.yaml file, and ignore the "DEPRECATED" warning because it's wrong. (It's also being fixed in OSP-12 [1] but apparently the fix isn't available in an OSP-12 puddle yet).

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1585362#c7

If you're still not seeing the CinderNetappNfsMountOptions value appearing in cinder.conf then I'd like to get access to the deployment to see what went wrong.

Comment 11 errata-xmlrpc 2018-08-20 13:01:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2331