dell / ansible-powerscale

PowerScale (Isilon) Ansible modules
GNU General Public License v3.0
29 stars 21 forks source link

[BUG]:NFS export create with nfs module always reports CHANGED #124

Open nikolisg7 opened 4 weeks ago

nikolisg7 commented 4 weeks ago

Describe the bug Task to create NFS export is always reported as CHANGED even when the export already exists with the configured settings. Since the module doesn't support diff mode, it is not clear what it is supposed to change everytime

To Reproduce Use a standard task for nfs export creation like

- name: Create NFS Export
  dellemc.powerscale.nfs:
      onefs_host: "{{ ansible_host }}"
      port_no: "{{ powerscale_port }}"
      api_user: "{{ ps_admin }}"
      api_password: "{{ ps_admin_passwd }}"
      verify_ssl: "{{ verify_ssl }}"
      path: "{{ ps_service.path }}"
      description: "{{ ps_service.description }}"
      access_zone: "{{ ps_service.access_zone }}"
      root_clients: "{{ ps_service.nfs.root_clients | default(omit) }}"
      read_only_clients: "{{ ps_service.nfs.read_only_clients |
          default(omit) }}"
      read_write_clients: "{{ ps_service.nfs.read_write_clients |
          default(omit) }}"
      read_only: "{{ ps_service.nfs.read_only | default(false) }}"
      sub_directories_mountable: "{{
          ps_service.nfs.sub_directories_mountable | default(false) }}"
      security_flavors: "{{ ps_service.nfs.security_flavors |
          default(ps_nfs_security_flavors) }}"
      ignore_unresolvable_hosts: true
      client_state: present-in-export
      state: present
  when:
      - ps_service.nfs is defined
  delegate_to: "{{ powerscale_execution_host }}"

Run the task from a playbook multiple times -> always CHANGED Expected behavior The task should report OK if the export already exists and has the defined settings

Screenshots If applicable, add screenshots to help explain your problem.

Logs If applicable, submit logs or stack traces from the affected services

System Information (please complete the following information):

Additional context Add any other context about the problem here.

anupamaloke commented 2 weeks ago

@nikolisg7, thank you for submitting the issue. From our investigations, it seems that this issue manifests because one of the arguments ignore_unresolvable_hosts is not available in the respective accessor methods in the Isilon SDK. We will work with the SDK team to see how we can get it fixed in upcoming releases. Additionally, we will add support for the diff mode.