dell / ansible-powerscale

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

[BUG]: Module filesystem not idempotent when creating directory and assign ACE #121

Open nikolisg7 opened 1 month ago

nikolisg7 commented 1 month ago

Describe the bug We have a task that uses the filesystem module to create a directory with owner and group and assign an ACE to it. The task runs and from what we can see on the OneFS filesystem afterwards, it creates the directory correctly. Upon re-execution of the task, it is still reported as changed though; since the filesystem module does not support diff mode, we are not sure what is supposed to have changed. A manual check on the OneFS filesystem doesn't seem to show any changes. For test purposes, we have the playbook end with this task, i.e. no subsequent tasks can interfere with propagated settings.

To Reproduce Task looks like this:

- name: Powerscale Create Directories
  dellemc.powerscale.filesystem:
      onefs_host: "{{ ansible_host }}"
      port_no: "{{ powerscale_port }}"
      api_user: "{{ ps_admin }}"
      api_password: "{{ ps_admin_passwd }}"
      verify_ssl: "{{ verify_ssl }}"
      path: "{{ path }}"
      access_zone: "{{ access_zone }}"
      owner:
          name: "{{ user_name }}"
          provider_type: ads 
      group:
          name: "{{ group_name }}"
          provider_type: ads 
      access_control_rights: "{{ this_acl.0 }}"
      access_control_rights_state: add 
      recursive: false
      state: present
  delegate_to: "{{ powerscale_execution_host }}"

where this_acl.0 is a dict representation of the AclObject Expected behavior Expected behavior would be for the task to report OK (and not CHANGED) on re-execution (idempotency)

Screenshots

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.

sachin-apa commented 3 weeks ago

@nikolisg7 Can you please try the same once again with a latest version (3.5.0) of dellemc.powerscale collection. I think this should have fixed with a minor change we did for ACL's.

Please revert once verified.

sachin-apa commented 3 weeks ago

@nikolisg7 Please ignore my previous comment, I was able to reproduce this. Looks like the fix we did for trustee needs to be done for user and group inputs as well. Can you please confirm the OneFS version you are using, I see in the description you mentioned as OS/Version: OneFS 7.1.0.2 , do you mean OneFS 9.7.1.0.2

nikolisg7 commented 3 weeks ago

@sachin-apa Thanks for the update! And of course, it's OneFS 9.7.1.2, sorry for the typo