#I used to run the following playbook to

1 messages · Page 1 of 1 (latest)

empty obsidian
#

I did some more test with the same playbook but requesting :

#

gather_subset:
- export_rule_info
- vserver_info
- volume_info

#

It runs as expected for vserver_info and volume_info

#

But no export_rule_info is ever reported

#

The field contains a null value

#

It seems like export info is no more collected

winter rune
#

Not sure what could be causing this. Under the covers we call the export-rule-get-iter and return the data the ZAPI give back. It could be a permissions issue
'export_rule_info': { 'method': self.get_generic_get_iter, 'kwargs': { 'call': 'export-rule-get-iter', 'attribute': 'export-rule-info', 'key_fields': ('vserver-name', 'policy-name', 'rule-index'), 'query': {'max-records': self.max_records}, }, 'min_version': '0',

empty obsidian
#

I will do some more tests recreating the whole SVM

#

Is there any mean to trace the Ansible module to check what could be wrong ?

winter rune
#

yes if you add

    feature_flags:
      trace_apis: true
#

So something like this. it will write a file in /tmp with all the api calls and what was returned

- name: Get Ontap Verison for 9.11 na_ontap_rest_info: gather_subset: - cluster fields: - 'version' use_python_keys: yes feature_flags: trace_apis: true <<: *login911

#

since the module isn't failing i believe we are getting None back from the system for the ZApi call

#

It will log all the API call to a file here

/tmp/ontap_apis.log

empty obsidian
#

I deleted and created a whole new SVM with 3 exports on 1 volume and 2 qtrees. Exports are visible in the GUI.

#

But I still can get infomation with :

#
  • name: Get NetApp info
    na_ontap_info:
    feature_flags:
    trace_apis: true
    hostname: "{{ nas_hostname }}"
    username: "{{ nas_username }}"
    password: "{{ nas_password }}"
    https: true
    validate_certs: false
    vserver: "vs_{{ target }}"
    gather_subset:
    - export_rule_info
#

I reviewed the /tmp/ontap_apis.log file.

#

It does not contain export information.

#

more /tmp/ontap_apis.log
2022-10-07 09:38:59,820 DEBUG Using NetApp controller: abvnapmgt002sas
2022-10-07 09:38:59,821 DEBUG Request: b'<netapp xmlns="http://www.netapp.com/filer/admin" version="1.110" vfiler="vs_ansitest002sas">\n <ems-autosupport-log>\n <computer-name>Ansible</computer-name>\n <event-id>12345</event-id

\n <event-source>na_ontap_info</event-source>\n <app-version>21.23.0</app-version>\n <category>Information</category>\n <event-description>setup</event-description>\n <log-level>6</log-level>\n <auto-support>false</aut
o-support>\n </ems-autosupport-log>\n</netapp>\n'
2022-10-07 09:38:59,859 DEBUG Response: b'<results xmlns="http://www.netapp.com/filer/admin" status="passed"/>\n'
2022-10-07 09:38:59,859 DEBUG Request: b'<netapp xmlns="http://www.netapp.com/filer/admin" version="1.110" vfiler="vs_ansitest002sas">\n <system-get-ontapi-version/>\n</netapp>\n'
2022-10-07 09:38:59,899 DEBUG Response: b'<results xmlns="http://www.netapp.com/filer/admin" status="passed">\n <major-version>1</major-version>\n <minor-version>211</minor-version>\n</results>\n'
2022-10-07 09:38:59,899 DEBUG Request: b'<netapp xmlns="http://www.netapp.com/filer/admin" version="1.110" vfiler="vs_ansitest002sas">\n <export-rule-get-iter>\n <max-records>1024</max-records>\n </export-rule-get-iter>\n</netapp
\n'
2022-10-07 09:38:59,933 DEBUG Response: b'<results xmlns="http://www.netapp.com/filer/admin" status="passed">\n <num-records>0</num-records>\n</results>\n'

#

The ansible output is :

#

TASK [ds-role-nas_CRUD : display ontap_info] ************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": {
"changed": false,
"failed": false,
"ontap_info": {
"export_rule_info": null,
"ontap_version": "211",
"ontapi_version": "211"
},
"warnings": [
"The module only supports ZAPI and is deprecated, and will no longer work with newer versions of ONTAP when ONTAPI is deprecated in CY22-Q4",
"netapp.ontap.na_ontap_rest_info should be used instead."
]
}
}

#

The export_rule_info contains only null field.

#

What I can't understand is that it has been working fine until recently

#

We did an upgrade to ONTAP 9.11.1 P1

#

Could the new version of ONTAP prevent the proper execution of the na_ontap_info module which is using ZAPI ?

empty obsidian
#

This woulld be a regression

empty obsidian
#

After some further tests,the behaviour is that null is returned if the exports have no rule

#

If I set a rule in the export, it is reported.

#

So empty exports are not reported

winter rune
#

when you say Export does that mean Export rules or export policy.

If you aare looking for the policies you want this info
"export_policy_info"
if your looking for the rules you want this info
"export_rule_info"

empty obsidian
#

Indeed, I need to use export_policy_info

#

I've been using export_rule_info because it was showing export names when some rules exist. But when no rule is in the export policy, it is null.