Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
I am running ontap 9.1 and redhat 6.8 used for ansible
ansible version details:
[root@rhel2 /]# ansible --version
ansible 2.7.9
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.6.6 (r266:84292, May 22 2015, 08:34:51) [GCC 4.4.7 20120313 (Red Hat 4.4.7-15)]
Getting this error while running the first playbook for aggr creation
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_na_cdot_aggregate_payload_TmquWf/__main__.py", line 138, in get_aggr
enable_tunneling=False)
File "/usr/lib/python2.6/site-packages/netapp_lib/api/zapi/zapi.py", line 281, in invoke_successfully
result = self.invoke_elem(na_element, enable_tunneling)
File "/usr/lib/python2.6/site-packages/netapp_lib/api/zapi/zapi.py", line 263, in invoke_elem
raise NaApiError('Unexpected error', e.message)
NaApiError: NetApp API failed. Reason - Unexpected error:
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"disk_count": 4,
"hostname": "192.168.0.101",
"name": "ansibleAggr",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"state": "present",
"username": "admin"
}
},
"msg": "NetApp API failed. Reason - Unexpected error:"
Need help on this
With respect to above also getting the below error
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_na_cdot_aggregate_payload_i1cIi0/__main__.py", line 138, in get_aggr
enable_tunneling=False)
File "/usr/lib/python2.6/site-packages/netapp_lib/api/zapi/zapi.py", line 290, in invoke_successfully
raise NaApiError(code, msg)
NaApiError: NetApp API failed. Reason - 13010:Version 1.110 was requested, but only 1.100 is supported.
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"disk_count": 4,
"hostname": "192.168.0.101",
"name": "ansibleAggr",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"state": "present",
"username": "admin"
}
},
"msg": "NetApp API failed. Reason - 13010:Version 1.110 was requested, but only 1.100 is supported."
}
to retry, use: --limit @/first.retry
PLAY RECAP *********************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
Had already installed latest netapp libraries netapp-lib-2018.11.1
Hi pamo
It looks like you are using one of the older "na_cdot_*" modules which might not work with newer ONTAP versions. Have you looked at "na_ontap_aggregate" rather than "na_cdot_aggregate"?
Cheers
Graham
hi Graham,
Thanks for your reply
I used na_ontap_aggregate but no luck again getting the below error
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1552932185.2-107080005953841/AnsiballZ_na_ontap_aggregate.py", line 113, in <module>
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1552932185.2-107080005953841/AnsiballZ_na_ontap_aggregate.py", line 105, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1552932185.2-107080005953841/AnsiballZ_na_ontap_aggregate.py", line 48, in invoke_module
imp.load_module('__main__', mod, module, MOD_DESC)
File "/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py", line 391, in <module>
File "/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py", line 387, in main
File "/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py", line 353, in apply
File "/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py", line 344, in asup_log_for_cserver
File "/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/ansible_na_ontap_aggregate_payload.zip/ansible/module_utils/netapp.py", line 268, in get_cserver
File "/usr/lib/python2.6/site-packages/netapp_lib/api/zapi/zapi.py", line 290, in invoke_successfully
raise NaApiError(code, msg)
netapp_lib.api.zapi.zapi.NaApiError: NetApp API failed. Reason - 13010:Version 1.110 was requested, but only 1.100 is supported.
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1552932185.2-107080005953841/AnsiballZ_na_ontap_aggregate.py\", line 113, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1552932185.2-107080005953841/AnsiballZ_na_ontap_aggregate.py\", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1552932185.2-107080005953841/AnsiballZ_na_ontap_aggregate.py\", line 48, in invoke_module\n imp.load_module('__main__', mod, module, MOD_DESC)\n File \"/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py\", line 391, in <module>\n File \"/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py\", line 387, in main\n File \"/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py\", line 353, in apply\n File \"/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/__main__.py\", line 344, in asup_log_for_cserver\n File \"/tmp/ansible_na_ontap_aggregate_payload_fnpAZ0/ansible_na_ontap_aggregate_payload.zip/ansible/module_utils/netapp.py\", line 268, in get_cserver\n File \"/usr/lib/python2.6/site-packages/netapp_lib/api/zapi/zapi.py\", line 290, in invoke_successfully\n raise NaApiError(code, msg)\nnetapp_lib.api.zapi.zapi.NaApiError: NetApp API failed. Reason - 13010:Version 1.110 was requested, but only 1.100 is supported.\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
to retry, use: --limit @/first.retry
PLAY RECAP **********************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1
i am using the below programme
- hosts: localhost
tasks:
- name: Manage Aggregates
na_ontap_aggregate:
state: present
name: ansibleAggr
disk_count: 4
hostname: "192.168.0.101"
username: "username"
password: "password"
>>NaApiError: NetApp API failed. Reason - 13010:Version 1.110 was requested, but only 1.100 is supported.
>>"msg": "NetApp API failed. Reason - 13010:Version 1.110 was requested, but only 1.100 is supported."
This is your main error and that looks like because of ONTAP version issue. This is neither ansible issue not a python issue. For test purpose you can test same with ZEDI using same api.
You can read in ansible documentation for this module
I suggest to upgrade to minimum 9.3.