Unsolved
1 Rookie
•
41 Posts
0
663
Powerscale Ansible NFS Module does not seem to be Idempotent
Hi,
When I run the following multiple times it keeps creating multiple exports of the same path.
- name: Create NFS Export
dellemc.powerscale.nfs:
onefs_host: "{{onefs_host}}"
api_user: "{{api_user}}"
api_password: "{{api_password}}"
verify_ssl: "{{verify_ssl}}"
path: ""
access_zone: "{{access_zone}}"
read_only_clients:
- "{{client1}}"
- "{{client2}}"
read_only: True
clients: ["{{client3}}"]
client_state: 'present-in-export'
state: 'present'
No Events found!
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
April 21st, 2023 01:00
Hi @gdny .
Could you please share the log output for the idempotency scenario using
tail -10 ansible_powerscale.log from the same folder where the playbook is?
I tried the same and the task seems to be idempotent ,the logs list "No change detected for the NFS Export"
Thanks,
Jennifer
Thanks,
Jennifer
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 21st, 2023 08:00
Hi @jennifer_john
Sorry for the stupid question but, how do I enable logging to this file.
Running my playbook does not create an ansible_powerscale.log file.
thanks.
glenn.
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
April 21st, 2023 10:00
Hi @gdny
Logging is enabled by default.
It would be generated in the same folder from where the playbook is executed.
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 21st, 2023 10:00
@jennifer_john ,
This is not happening for me. I don't have any log file anywhere, including the playbooks directory.
thanks.
glenn.
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
April 21st, 2023 11:00
Hi @gdny ,
Are the playbooks run with ansible tower? You could check the ansible tower logs. If not, I can schedule a webex to have a look at the environment.
Thanks,
Jennifer
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 21st, 2023 12:00
@jennifer_john,
I am not using ansible tower. Ansible core directly from the command line.
A webex would be great. Let me know when you are available to do it.
thanks.
glenn.
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 21st, 2023 19:00
Hi @jennifer_john ,
Another thing to add, I just noticed when I run what should be a Get of the NFS Export, instead it creates a new Export:
thanks.
glenn.
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 21st, 2023 19:00
@jennifer_john - To continue from my last post, here is a screenshot of what happens every time I run the playbook.
thanks.
glenn.
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 21st, 2023 19:00
@jennifer_john - I was finally able to get the ansible_debug.log to work. Still not sure why it won't work in my env. but that's another issue for another time.
Here is the output:
Let me know if you need any other information.
thanks.
glenn.
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
April 24th, 2023 07:00
Hi @gdny
Thank you for sharing the logs and playbook. I am able to reproduce this in my environment.. The issue is with specifying path as "/". Idempotency is working if we specify other value for path as eg: /sample-path. We will work on fixing this issue in the upcoming release
Thanks,
Jennifer
gdny
1 Rookie
1 Rookie
•
41 Posts
0
April 24th, 2023 07:00
@jennifer_john
Thanks for verifying.
BTW - I will open a similar discussion for SMB shares. A little different, so I will explain in the new discussion.
thanks
glenn.