dell / ansible-powerstore

Ansible Modules for Dell PowerStore
GNU General Public License v3.0
31 stars 24 forks source link

[BUG]:Storage_discovery_address in dellemc.powerstore.network is not idempotent #56

Open zb-4W145 opened 2 days ago

zb-4W145 commented 2 days ago

Describe the bug I am using the modules in dellemc.powerstore to configure some new powerstore arrays. When every time i run a task using the dellemc.powerstore.network module to configure multiple sections of a network, I get a change returned every time I run it. This change is aliviated when i comment out the line for Storage_discovery_address. This leads me to believe this config is not idempotent.

To Reproduce Steps to reproduce the behavior:

  1. Create the task in question:
    dellemc.powerstore.network:
    array_ip: "{{ inventory_hostname }}"
    user: "{{ dell_username }}"
    password: "{{ dell_password }}"
    validate_certs: "{{ validate_certs }}"
    network_name: "{{ network.network_name }}"
    gateway: "{{ network.network_gateway | default(omit) }}"
    mtu: "{{ network_mtu }}"
    prefix_length: "{{ network.network_prefix_length }}"
    storage_discovery_address: "{{ network.network_discovery_address | default(omit) }}"
    vlan_id: "{{ network.network_vlan | default(omit) }}"
    state: present
  2. Run ansible task, see the changed output
  3. Run again see changed again.
  4. Repeat ad nauseam
  5. Comment out storage_discovery_address:
    dellemc.powerstore.network:
    array_ip: "{{ inventory_hostname }}"
    user: "{{ dell_username }}"
    password: "{{ dell_password }}"
    validate_certs: "{{ validate_certs }}"
    network_name: "{{ network.network_name }}"
    gateway: "{{ network.network_gateway | default(omit) }}"
    mtu: "{{ network_mtu }}"
    prefix_length: "{{ network.network_prefix_length }}"
    # storage_discovery_address: "{{ network.network_discovery_address | default(omit) }}"
    vlan_id: "{{ network.network_vlan | default(omit) }}"
    state: present
  6. Run ansible see no change occured

Expected behavior I would expect to only see a changed output once not everytime that this is run

Logs

  invocation:
    module_args:
      addresses: null
      array_ip: host.fdqn.com
      esxi_credentials: null
      gateway: null
      mtu: 9000
      network_id: null
      network_name: iSCSI-Network
      new_cluster_mgmt_address: null
      new_name: null
      password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
      port: null
      port_state: null
      ports: null
      prefix_length: 21
      state: present
      storage_discovery_address: 172.19.55.50
      timeout: 120
      user: admin-user
      validate_certs: false
      vasa_provider_credentials: null
      vlan_id: 1401
      wait_for_completion: false
  job_details:
    id: c79f4371-abcb-461f-a27b-af0e52be2e36
  network_details: null

System Information (please complete the following information):

anupamaloke commented 12 hours ago

@zb-4W145, thanks for submitting this issue. We will take a look and get back with a fix.