Closed mordechai closed 2 years ago
A work around for this issue is to drop down to cli commands, pasting here in case it helps anyone.
The module is setting 'force' when deleting everything, but it is not done on a modify when some initiators need to be deleted. This needs to be added both for ZAPI and REST.
This was fixed in 21.16.0
Summary
When attempting to use Ansible collection module netapp.ontap.na_ontap_igroup to edit igroup membership by passing force_remove_initiator/allow_delete_while_mapped: yes always fails with
netapp_lib.api.zapi.zapi.NaApiError: NetApp API failed. Reason - 9029:LUN maps for this initiator group exist
2021-09-12 12:31:16,777 p=160048 u=mlehrer n=ansible | The full traceback is: Traceback (most recent call last): File "/tmp/ansible_netapp.ontap.na_ontap_igroup_payload_i2eh3f_x/ansible_netapp.ontap.na_ontap_igroup_payload.zip/ansible_collections/netapp/ontap/plugins/modules/na_ontap_igroup.py", line 483, in modify_initiator File "/usr/local/lib64/python3.6/site-packages/netapp_lib/api/zapi/zapi.py", line 301, in invoke_successfully raise NaApiError(code, msg) netapp_lib.api.zapi.zapi.NaApiError: NetApp API failed. Reason - 9029:LUN maps for this initiator group exist
2021-09-12 12:31:16,778 p=160048 u=mlehrer n=ansible | fatal: [rhev-red-01.rscalelab.com]: FAILED! => { "changed": false, "invocation": { "module_args": { "bind_portset": null, "cert_filepath": null, "feature_flags": {}, "force_remove_initiator": true, "from_name": null, "hostname": "ntap-a300-A-cls.rscalelab.com", "http_port": null, "https": false, "igroups": null, "initiator": [ "21:00:00:24:ff:1e:24:14", "21:00:00:24:ff:1e:24:15", "21:00:00:24:ff:1e:26:ec", "21:00:00:24:ff:1e:26:ed", "21:00:00:24:ff:1e:24:f6", "21:00:00:24:ff:1e:24:f7", "21:00:00:24:ff:1e:27:0c", "21:00:00:24:ff:1e:27:0d", "21:00:00:24:ff:1e:26:e2", "21:00:00:24:ff:1e:26:e3", "21:00:00:24:ff:1e:24:c6", "21:00:00:24:ff:1e:24:c7", "21:00:00:24:ff:1e:24:ee", "21:00:00:24:ff:1e:24:ef", "21:00:00:24:ff:1e:25:2e", "21:00:00:24:ff:1e:25:2f", "21:00:00:24:ff:1e:25:30", "21:00:00:24:ff:1e:25:31" ], "initiator_group_type": "fcp", "initiator_names": [ "21:00:00:24:ff:1e:24:14", "21:00:00:24:ff:1e:24:15", "21:00:00:24:ff:1e:26:ec", "21:00:00:24:ff:1e:26:ed", "21:00:00:24:ff:1e:24:f6", "21:00:00:24:ff:1e:24:f7", "21:00:00:24:ff:1e:27:0c", "21:00:00:24:ff:1e:27:0d", "21:00:00:24:ff:1e:26:e2", "21:00:00:24:ff:1e:26:e3", "21:00:00:24:ff:1e:24:c6", "21:00:00:24:ff:1e:24:c7", "21:00:00:24:ff:1e:24:ee", "21:00:00:24:ff:1e:24:ef", "21:00:00:24:ff:1e:25:2e", "21:00:00:24:ff:1e:25:2f", "21:00:00:24:ff:1e:25:30", "21:00:00:24:ff:1e:25:31" ], "initiator_objects": null, "key_filepath": null, "name": "RED_Scaleout_L0_Group_0", "ontapi": null, "os_type": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "use_rest": "auto", "username": "admin", "validate_certs": true, "vserver": "fc1" } }, "msg": "Error modifying igroup initiator RED_Scaleout_L0_Group_0: NetApp API failed. Reason - 9029:LUN maps for this initiator group exist" }
Component Name
netapp.ontap.na_ontap_igroup
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Expected Results
The igroup to be saved with remaining igroup members mapped to luns, and passed igroup members removed from the igroup.
Actual Results