#volume creation failed, what's the issue?

1 messages · Page 1 of 1 (latest)

silk meadow
#

I have task to create rootvol dp vols for snapmirror.

    - name: create rootvol mirror on each aggr H and S
      na_ontap_volume:
        state: present
        name: "{{ svm }}_rootvol_{{ item |
               regex_replace('.*n(\\d{2}[ab]).*', 'm\\1') }}"
        aggregate_name: "{{ item }}"
        vserver: "{{ svm }}"
        size: 1
        size_unit: gb
        type: DP
        group_id: 0
        wait_for_completion: true
        <<: *login
      loop:
        - "{{ aggr_list }}"
      # when: item.endswith('S") or item.endswith('H')
      tags:
        - always

But somehow running it gave me below error:

TASK [create rootvol mirror on each aggr H and S] *******************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
failed: [localhost] (item=['aggr1_scc123n02b_S']) => {"ansible_loop_var": "item", "changed": false, "item": ["aggr1_scc123n02b_S"], "msg": "Error creating volume sccv123e_rootvol_m02b: calling: storage/volumes: got {'message': 'failed to set field \"aggregates[0].name\" to \"[\\'aggr1_scc123n02b_S\\']\"', 'code': '2', 'target': 'aggregates[0].name'}."}

I think aggregate_name is set correctly. Why would it fail?