#Error: the python NetApp-Lib module is required. Import error: No module named 'netapp_lib'"

1 messages · Page 1 of 1 (latest)

lethal shore
#

Hello,

I have the following task:

- name: Modify LUN Parameters netapp.ontap.na_ontap_lun: state: present name: "{{ lun_index_update }}" size: "{{ (new_lunsize | int) | default(omit) }}" size_unit: "{{ (size_unit | lower) if (size_unit is defined) else 'gb' }}" ostype: "{{ ostype if (ostype |length > 0) else omit }}" #force_resize: "{{ true if (new_lunsize is defined) else omit }}" force_resize: True vserver: "SVM" flexvol_name: "VOL_{{ idvol }}"

I keep getting the following error on AWX:

[WARNING]: Falling back to ZAPI because of unsupported option(s) or option value(s) in REST: ['force_resize'] fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error: the python NetApp-Lib module is required. Import error: No module named 'netapp_lib'"}

I have pip install lxml oslo_log netapp_lib and the ontap collection are installed. The weird thing is other ontap tasks work fine except this one. How do I fix this ?

lethal shore
#

So it seems that I can increase the LUN size with no issues. But when I would like to decrease it, and use force_resize I get the error.

lavish shard
#

The error message is pretty clear. force_resize is a parameter that is only supported by ZAPI. To use the ZAPI you need the netapp_lib python package. I would avoid that because ZAPI is deprecated.

lethal shore
lavish shard