ansible-collections / netapp.ontap

Ansible collection to support NetApp ONTAP configuration.
https://galaxy.ansible.com/netapp/ontap
GNU General Public License v3.0
51 stars 34 forks source link

na_ontap_igroup_initiator fail after second run #191

Closed ReneMeier closed 2 months ago

ReneMeier commented 7 months ago

Summary

The module na_ontap_igroup_initiator fail after a second run with the same parameters

Component Name

na_ontap_igroup_initiator

Ansible Version

core 2.14.6

ONTAP Collection Version

version: 22.7.0

ONTAP Version

NetApp Release 9.11.1P8: Fri Apr 07 00:02:50 UTC 2023

Playbook

- name: add initiators to igroup
  delegate_to: localhost
  netapp.ontap.na_ontap_igroup_initiator:
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    https: true
    validate_certs: "{{ validate_certs }}"
    state: present
    initiator_group: "{{ initiator_group_name }}"
    names: "{{ initiator_names }}"
    vserver: "{{ vserver_name }}"

Steps to Reproduce

Run the task a second time with the same parameter

Expected Results

The module must aware of this situation and should not fail

Actual Results

{
  "msg": "Error modifying igroup initiator iqn.2020-04.testInitiator8888904359: calling: protocols/san/igroups/52c62458-7fde-11ee-bbea-d039ea1c7fb0/initiators: got {'message': 'Initiator group \"aa12_zbfc_igroup\" already contains initiator \"iqn.2020-04.testinitiator8888904359\".', 'code': '5374035', 'target': 'name'}.",
  "invocation": {
    "module_args": {
      "hostname": "cluster.intra.org",
      "username": "ansible",
      "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
      "https": true,
      "validate_certs": true,
      "state": "present",
      "initiator_group": "aa12_zbfc_igroup",
      "names": [
        "iqn.2020-04.testInitiator8888904359"
      ],
      "vserver": "aa12_zhh_zbfc_ss_0001",
      "use_rest": "auto",
      "force_remove": false,
      "http_port": null,
      "ontapi": null,
      "feature_flags": null,
      "cert_filepath": null,
      "key_filepath": null,
      "force_ontap_version": null
    }
  },
  "_ansible_no_log": null,
  "changed": false,
  "_ansible_delegated_vars": {
    "ansible_host": "localhost",
    "ansible_port": null,
    "ansible_user": "root",
    "ansible_connection": "local"
  }
}
ReneMeier commented 5 months ago

Any update on this ?

carchi8py commented 5 months ago

@ReneMeier i forgot to add that we have DEVOPS-6681 open for this. I'll see if i get the priority for this one increase and get back to you next week.

suhasbshekar commented 2 months ago

this is fixed in 22.10.0, will be closing this issue.