Start a Conversation

Unsolved

Closed

G

1 Rookie

 • 

41 Posts

663

April 18th, 2023 21:00

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'

1 Rookie

 • 

79 Posts

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

1 Rookie

 • 

41 Posts

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.

1 Rookie

 • 

79 Posts

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. 

1 Rookie

 • 

41 Posts

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.

1 Rookie

 • 

79 Posts

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 

1 Rookie

 • 

41 Posts

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.

1 Rookie

 • 

41 Posts

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: 

- name: Collect set of facts in Isilon
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    onefs_host: 'isilonsim01'
    powerscaleport: '8080'
    verify_ssl: False
    api_user: 'root'
    api_password: 'a'
  tasks:
    - name: Get Parent NFS export
      dellemc.powerscale.nfs:
        onefs_host: "{{ onefs_host }}"
        port_no: "{{ powerscaleport }}"
        verify_ssl: false
        api_user: "{{ api_user }}"
        api_password: "{{ api_password }}"
        path: "/"
        access_zone: "testteam1"
        state: present

thanks.

glenn.

1 Rookie

 • 

41 Posts

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.
Annotation 2023-04-21 222424.png

thanks.
glenn.

1 Rookie

 • 

41 Posts

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:

 

2023-04-21 22:11:08,994 nfs.py INFO : Got python SDK instance for provisioning on PowerScale
2023-04-21 22:11:09,188 nfs.py INFO : ('Creating NFS export with parameters:nfs_export=%s', {'all_dirs': True,
 'block_size': None,
 'can_set_time': None,
 'case_insensitive': None,
 'case_preserving': None,
 'chown_restricted': None,
 'clients': ['xxxxxxxx'],
 'commit_asynchronous': None,
 'description': None,
 'directory_transfer_size': None,
 'encoding': None,
 'link_max': None,
 'map_all': None,
 'map_failure': None,
 'map_full': None,
 'map_lookup_uid': None,
 'map_non_root': None,
 'map_retry': None,
 'map_root': None,
 'max_file_size': None,
 'name_max_size': None,
 'no_truncate': None,
 'paths': ['/ifs/testteam1/'],
 'read_only': True,
 'read_only_clients': None,
 'read_transfer_max_size': None,
 'read_transfer_multiple': None,
 'read_transfer_size': None,
 'read_write_clients': None,
 'readdirplus': None,
 'readdirplus_prefetch': None,
 'return_32bit_file_ids': None,
 'root_clients': None,
 'security_flavors': None,
 'setattr_asynchronous': None,
 'snapshot': None,
 'symlinks': None,
 'time_delta': None,
 'write_datasync_action': None,
 'write_datasync_reply': None,
 'write_filesync_action': None,
 'write_filesync_reply': None,
 'write_transfer_max_size': None,
 'write_transfer_multiple': None,
 'write_transfer_size': None,
 'write_unstable_action': None,
 'write_unstable_reply': None,
 'zone': 'testteam1'})
2023-04-21 22:11:09,968 nfs.py INFO : Getting NFS export details for id: 16 and access zone: testteam1
2023-04-21 22:11:10,045 nfs.py INFO : changed True

 

Let me know if you need any other information.
thanks.
glenn.

1 Rookie

 • 

79 Posts

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

1 Rookie

 • 

41 Posts

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.

No Events found!

Top