#netapp.ontap.na_ontap_volume vs netapp.ontap.na_ontap_volume_clone

1 messages · Page 1 of 1 (latest)

green dew
#

How do those two work differently with REST? I can successfully clone a volume with the later, but the first one timeouts when i'm trying to use it to set the export policies on the volume I just cloned.

valid bison
#

Can you provide an example?

green dew
#
  • name: Clone file system for own purposes on NetApp
    netapp.ontap.na_ontap_volume_clone:
    use_rest: always
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    vserver: "{{ item.svm }}"
    parent_volume: "{{ item.parent_volume }}"
    name: "{{ item.name }}"
    junction_path: "/{{ item.name }}"
    uid: 1
    gid: 1

  • name: Change export policy of created NetApp volume
    netapp.ontap.na_ontap_volume:
    use_rest: always
    hostname: "{{ netapp_hostname }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    vserver: "{{ item.svm }}"
    name: "{{ item.name }}"
    export_policy: nfs-export

#

I also tried netapp.ontap.na_ontap_login_messages, but it also fails. Just volume_clone works for some reason

valid bison
#

What error do you see?

green dew
#

fatal: [netapphost]: FAILED! => {"changed": false, "msg": "calling: storage/volumes: got HTTPSConnectionPool(host='na-01.localdom.com', port=443): Max retries exceeded with url: /api/storage/volumes?name=na01_nfs01_own_clone2&svm.name=NA01-NFS01&fields=encryption.enabled%2Ctiering.policy%2Cnas.export_policy.name%2Caggregates.name%2Caggregates.uuid%2Cuuid%2Cnas.path%2Cstyle%2Ctype%2Ccomment%2Cqos.policy.name%2Cnas.security_style%2Cnas.gid%2Cnas.unix_permissions%2Cnas.uid%2Csnapshot_policy%2Cspace.snapshot.reserve_percent%2Cspace.size%2Cguarantee.type%2Cstate%2Cefficiency.compression%2Csnaplock%2Cfiles.maximum%2Cspace.logical_space.enforcement%2Cspace.logical_space.reporting%2C (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7ff0f71a1c60>, 'Connection to na-01.localdom.com timed out. (connect timeout=60)'))."}

valid bison
#

If you use the same URL in curl as the module, with all the fields included?

green dew
#

o m g... after 2 days of looking, debugging, running verbose, looking at the firewall, trying manual curls, reverting to older ansible versions of plugins, i now found my bug. I want to hit my head with something extremely hard. I forgot to delegate the task to the proper VM.... The code above is missing the delegate part as I obfuscated needless pieces of information. I just realized I never needed to delete that line from the second part of the code. I must have spent 10 hours on this.

valid bison
#

Sometimes it's the little things

green dew
#

I feel so empty inside... i want to crawl under the table and cry a while

valid bison