UNSOLVED

sharath.gr

updated

4 years ago

Closed

SG

sharath.gr

1 Rookie

•

3 Posts

0

785

March 6th, 2023 12:00

Ansible - Powerscale

Hi Team,

I'm trying to modify nfs export on Powerscale using Ansible modules with Non-System access zone and getting the below error.

"msg": "Create NFS export for path: /ifs/abc/xyz.org******** and access zone: XXXX failed with error: { errors : [ { code : AEC_EXCEPTION , message : '/ifs/abc/xyz.org********' failed translation to absolute path: No such file or directory } ] } "

NOTE: Ansible Playbook work fine on System Access Zone. However, error throws for Non-System Access zone

  • sharath.gr

    1 Rookie

    •

    3 Posts

    591

    0

    Posted March 7th, 2023 09:00

    Hi Jennifer,
    Thank you for your response.

    Below is the NFS Share provided in the input : 
    smartconnect_zone.org:/ifs/abc/xyz.org/ansible

    and we are getting the below error

    "msg": "Create NFS export for path: /ifs/abc/xyz.org******** and access zone: XXXX failed with error: { errors : [ { code : AEC_EXCEPTION , message : '/ifs/abc/xyz.org********' failed translation to absolute path: No such file or directory } ] } "

  • jennifer_john

    1 Rookie

    •

    79 Posts

    594

    0

    Posted March 7th, 2023 09:00

    Hi @sharath.gr 

    For non system access zone, the relative path need be specified for { {path}} as /xyz.org in the playbook instead of the absolute path.

    Thanks,

    Jennifer

  • jennifer_john

    1 Rookie

    •

    79 Posts

    570

    0

    Posted March 8th, 2023 03:00

    Hi @sharath.gr 

    For non system access zone, the relative path need be specified instead of the absolute path.

    Adding a sample playbook below, Here the path should be specified as /path instead of /ifs/sample-zone/path

    nfs :
          onefs_host : " { {onefs_host}} "
          api_user : " { {api_user}} "
          api_password : " { {api_password}}"
          path : " /path "
          access_zone : " sample-zone "
          state : ' present '
     
    Please do let me know of any further clarifications. 
     
    Thanks,
    Jennifer
  • sharath.gr

    1 Rookie

    •

    3 Posts

    567

    0

    Posted March 8th, 2023 04:00

    Hi Jennifer,
     
    I have defined as below. but same error. by base path for non-system access zone is  /ifs/abc/xyz.org/
     
              - name : Get NFS Export
                dellemc.powerscale.nfs :
                  onefs_host : "{ {onefs_host}}"
                  api_user : "{ {api_user}}"
                  api_password : "{ {api_password}}"
                  access_zone : "{ {access_zone}}"
                  verify_ssl : "{ {verify_ssl}}"
                  path : "{ {nfs_share_path}}"
                  #path: " /ifs/abc/xyz.org/ansible"
                  state : 'present'
                  # privilege: admin
                  # validate_certs: false
                  # accept_unknown_host_keys: true
                # no_log: true
                register : volume_output
  • jennifer_john

    1 Rookie

    •

    79 Posts

    564

    0

    Posted March 8th, 2023 05:00

    Hi @sharath.gr ,

    The info module can be used to list the available nfs exports in a specific access zone as in syntax below

    - name : Get list of nfs exports of the PowerScale cluster
        info :
          onefs_host : " { {onefs_host}} "
          verify_ssl : " { {verify_ssl}} "
          api_user : " { {api_user}} "
          api_password : " { {api_password}} "
          access_zone : " { {access_zone}} "
          gather_subset :
            - nfs_exports
     
    And, to list all available nfs_exports,

     

    - name : Get list of nfs exports of the PowerScale cluster
        info :
          onefs_host : " { {onefs_host}} "
          verify_ssl : " { {verify_ssl}} "
          api_user : " { {api_user}} "
          api_password : " { {api_password}}"
          include_all_access_zones: True
          gather_subset :
            - nfs_exports
     
    Please let me know if you face any additional issues.
     
    Thanks,
    Jennifer.
  • jennifer_john

    1 Rookie

    •

    79 Posts

    557

    0

    Posted March 8th, 2023 08:00

    Hi @sharath.gr 

    From the list of nfs_exports returned from info module, the operations can be performed using nfs_export module using the absolute path(for system access zone) or relative path (for non-system access zone).  Please refer to playbook syntax as shared above.

    Please do let me know if you face any additional issues

    Thanks,

    Jennifer