#Since I ve migrated to using REST I ve

1 messages · Page 1 of 1 (latest)

uncut bolt
#

Just to add to this, if I force use ZAPI, the playbook runs once, successfully

#

I'm running all testing on an FSx filesystem, not a physical or CVO Ontap system

#

First time I run the playbook, I get the following error ```TASK [volume_create : Create Flexgroup] ***************************************************************************************************************************************************************************************************************
changed: [localhost]

TASK [volume_create : Creating a Qtree] ***************************************************************************************************************************************************************************************************************
included: /Users/carwal01/VCS/storage-aws-fsx/roles/volume_create/tasks/create-qtree.yml for localhost

TASK [volume_create : Create Qtree] *******************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => changed=false
msg: 'Error creating qtree test1: job reported error: {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''} - {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''} - {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''} - {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''}, received {''job'': {''uuid'': ''5612b2b7-7c6a-11ed-9a4d-371c60bfd672'', ''_links'': {''self'': {''href'': ''/api/cluster/jobs/5612b2b7-7c6a-11ed-9a4d-371c60bfd672''}}}}.'```

#

The next time I run the play, I get the following error: TASK [volume_create : Create Flexgroup] ok: [localhost] TASK [volume_create : Creating a Qtree] TASK [volume_create : Create Qtree] ok: [localhost] TASK [volume_create : Set Qtree Quota] **************************************************************************************************************************************************************************************************************** fatal: [localhost]: FAILED! => changed=false msg: 'Error on creating quotas rule: job reported error: {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''} - {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''} - {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''} - {''message'': "entry doesn''t exist", ''code'': ''4'', ''target'': ''uuid''}, received {''num_records'': 1, ''records'': [{''svm'': {''uuid'': ''96a841eb-507e-11ed-9a39-73bfa6dd0f4e'', ''name'': ''fsx'', ''_links'': {''self'': {''href'': ''/api/svm/svms/96a841eb-507e-11ed-9a39-73bfa6dd0f4e''}}}, ''volume'': {''uuid'': ''4d0ea88d-7c6a-11ed-9a4d-371c60bfd672'', ''name'': ''test1'', ''_links'': {''self'': {''href'': ''/api/storage/volumes/4d0ea88d-7c6a-11ed-9a4d-371c60bfd672''}}}, ''uuid'': ''c293590e-7c6a-11ed-9a4d-371c60bfd672'', ''type'': ''tree'', ''qtree'': {''name'': ''''}, ''space'': {''hard_limit'': 32985348833280}, ''_links'': {''self'': {''href'': ''/api/storage/quota/rules/c293590e-7c6a-11ed-9a4d-371c60bfd672''}}}], ''job'': {''uuid'': ''c2944e22-7c6a-11ed-9a4d-371c60bfd672'', ''_links'': {''self'': {''href'': ''/api/cluster/jobs/c2944e22-7c6a-11ed-9a4d-371c60bfd672''}}}}.'

modest valve
#

Thanks, its a bug, qtree name set as "" in create which causes the duplicate entry error

#

will create a fix for this

uncut bolt
#

Thanks @modest valve

modest valve
#

@uncut bolt can I check your playbook excluding login details, so not miss anything

uncut bolt
#

@modest valve sorry for the delay I've had a couple of days holiday. Here's a copy of my tasks - name: Create Flexgroup na_ontap_volume: state: present hostname: "{{ netapp_hostname }}" username: "{{ netapp_username }}" password: "{{ netapp_password }}" vserver: "{{ vserver_name }}" validate_certs: no https: true name: "{{ volume_name }}" junction_path: "/{{volume_name}}" is_infinite: False aggr_list: aggr1 aggr_list_multiplier: 8 type: RW auto_provision_as: flexgroup compression: yes logical_space_enforcement: yes logical_space_reporting: yes size: 100 size_unit: tb space_guarantee: none export_policy: default tiering_policy: auto volume_security_style: unix unix_permissions: '750' snapshot_policy: my_standard_snapshot_policy time_out: 120 wait_for_completion: yes

#
  - name: Create Qtree
    na_ontap_qtree:
      state: present
      hostname: "{{ netapp_hostname }}"
      username: "{{ netapp_username }}"
      password: "{{ netapp_password }}"
      vserver: "{{ vserver_name }}"
      validate_certs: no
      https: true
      name: "{{ volume_name }}"
      flexvol_name: "{{ volume_name }}"
      export_policy: root_access
      unix_group: "{{ unix_group }}"
      security_style: unix
      unix_permissions: "{{ unix_permissions }}"
      time_out: 120
      wait_for_completion: yes```
#
  - name: Set Qtree Quota
    na_ontap_quotas:
      state: present
      hostname: "{{ netapp_hostname }}"
      username: "{{ netapp_username }}"
      password: "{{ netapp_password }}"
      vserver: "{{ vserver_name }}"
      validate_certs: no
      https: true
      volume: "{{ volume_name }}"
      quota_target: "/vol/{{volume_name}}/{{volume_name}}"
      type: tree
      disk_limit: "{{ volume_quota }}"
      set_quota_status: true```
modest valve
#

Thanks @uncut bolt, we fixed the issue, 22.2.0(Jan release) has the fix for it.

#

no problem

#

tested this tasks works good latest changes.

uncut bolt
#

Great thanks Mohan

uncut bolt
#

Hi @modest valve - following up on this, it appears to still not be working properly on 22.2.0. Again my playbook runs, creates a flexgroup, then it reports an error when creating a qtree.

modest valve
#

😞 , I will check and update, does this task causes duplicate entry error?
- name: Set Qtree Quota na_ontap_quotas: state: present hostname: "{{ netapp_hostname }}" username: "{{ netapp_username }}" password: "{{ netapp_password }}" vserver: "{{ vserver_name }}" validate_certs: no https: true volume: "{{ volume_name }}" quota_target: "/vol/{{volume_name}}/{{volume_name}}" type: tree disk_limit: "{{ volume_quota }}" set_quota_status: true

uncut bolt
#

No, the first time the playbook is run (when no flexgroup exists), it produces the error {'message': \"entry doesn't exist\", 'code': '4', when running the qtree create. It fails before it can create a quota.

modest valve
#

feature_flags:
trace_apis: true

modest valve
#

log could have ip details, please modify it.

uncut bolt
#

Please do testing on an FSxN system. I'm not sure if this behaviour is the same on a CVO or physical system

modest valve
#

Thanks @uncut bolt will check and update