You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The quota seems to be created as desired, but the output contains this warning:
[WARNING]: Quota policy rule create opertation succeeded. However quota resize failed due to an internal error. To make quotas active, reinitialize(disable and enable again) the quota for volume test1 in SVM testsvm.
As I first believed, this could be connected to the issue, I followed the instructions and manually disabled/enabled the quota for the volume, but it didn't change the actual outcome.
I expect the Ansible playbook to show a proper idempotent behavior:
apply desired changes on 1st run
don't change/error out on any consecutive runs (unless something has changed)
Actual Results
ansible-playbook [core 2.15.0] config file = /localworkspaces/elprobst/code-repositories/netapp/ansible.cfg configured module search path = ['/home/elprobst/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /nix/store/9vv68nmc7z4a96bkdxmk4gabmvqpsqqp-python3-3.10.12-env/lib/python3.10/site-packages/ansible ansible collection location = /home/elprobst/.ansible/collections:/usr/share/ansible/collections executable location = /nix/store/dqg1q8i9nj5y03cm971710c77jjjaw1z-python3.10-ansible-core-2.15.0/bin/ansible-playbook python version = 3.10.12 (main, Jun 6 2023, 22:43:10) [GCC 12.3.0] (/nix/store/9vv68nmc7z4a96bkdxmk4gabmvqpsqqp-python3-3.10.12-env/bin/python3.10) jinja version = 3.1.2 libyaml = TrueUsing /localworkspaces/elprobst/code-repositories/netapp/ansible.cfg as config filesetting up inventory pluginsLoading collection ansible.builtin fromhost_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() methodSkipping due to inventory source not existing or not being readable by the current userscript declined parsing /etc/ansible/hosts as it did not pass its verify_file() methodauto declined parsing /etc/ansible/hosts as it did not pass its verify_file() methodSkipping due to inventory source not existing or not being readable by the current useryaml declined parsing /etc/ansible/hosts as it did not pass its verify_file() methodSkipping due to inventory source not existing or not being readable by the current userini declined parsing /etc/ansible/hosts as it did not pass its verify_file() methodSkipping due to inventory source not existing or not being readable by the current usertoml declined parsing /etc/ansible/hosts as it did not pass its verify_file() methodLoading collection netapp.ontap from /nix/store/9vv68nmc7z4a96bkdxmk4gabmvqpsqqp-python3-3.10.12-env/lib/python3.10/site-packages/ansible_collections/netapp/ontapLoading callback plugin default of type stdout, v2.0 from /nix/store/9vv68nmc7z4a96bkdxmk4gabmvqpsqqp-python3-3.10.12-env/lib/python3.10/site-packages/ansible/plugins/callback/default.pyAttempting to use 'default' callback.Skipping callback 'default', as we already have a stdout callback.Attempting to use 'junit' callback.Attempting to use 'minimal' callback.Skipping callback 'minimal', as we already have a stdout callback.Attempting to use 'oneline' callback.Skipping callback 'oneline', as we already have a stdout callback.Attempting to use 'tree' callback.PLAYBOOK: test-quota.yml *******************************************************Positional arguments: test/test-quota.ymlverbosity: 6connection: smarttimeout: 10become_method: sudotags: ('all',)inventory: ('/etc/ansible/hosts',)forks: 51 plays in test/test-quota.ymllooking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/vars/variables.yml"looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/variables.yml"Read vars_file 'variables.yml'looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/vars/variables.yml"looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/variables.yml"Read vars_file 'variables.yml'looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/vars/variables.yml"looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/variables.yml"Read vars_file 'variables.yml'PLAY [Create Mirror] ***********************************************************looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/vars/variables.yml"looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/variables.yml"Read vars_file 'variables.yml'looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/vars/variables.yml"looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/variables.yml"Read vars_file 'variables.yml'looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/vars/variables.yml"looking for "variables.yml" at "/localworkspaces/elprobst/code-repositories/netapp/test/variables.yml"Read vars_file 'variables.yml'TASK [add quota] ***************************************************************task path: /localworkspaces/elprobst/code-repositories/netapp/test/test-quota.yml:18<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: elprobst<127.0.0.1> EXEC /bin/sh -c 'echo ~elprobst && sleep 0'<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/elprobst/.ansible/tmp `"&& mkdir "` echo /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675 `" && echo ansible-tmp-1689750669.9888132-958041-268572850802675="` echo /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675 `" ) && sleep 0'Including module_utils file ansible/__init__.pyIncluding module_utils file ansible/module_utils/__init__.pyIncluding module_utils file ansible/module_utils/_text.pyIncluding module_utils file ansible/module_utils/basic.pyIncluding module_utils file ansible/module_utils/common/_json_compat.pyIncluding module_utils file ansible/module_utils/common/__init__.pyIncluding module_utils file ansible/module_utils/common/_utils.pyIncluding module_utils file ansible/module_utils/common/arg_spec.pyIncluding module_utils file ansible/module_utils/common/file.pyIncluding module_utils file ansible/module_utils/common/locale.pyIncluding module_utils file ansible/module_utils/common/parameters.pyIncluding module_utils file ansible/module_utils/common/collections.pyIncluding module_utils file ansible/module_utils/common/process.pyIncluding module_utils file ansible/module_utils/common/sys_info.pyIncluding module_utils file ansible/module_utils/common/text/converters.pyIncluding module_utils file ansible/module_utils/common/text/__init__.pyIncluding module_utils file ansible/module_utils/common/text/formatters.pyIncluding module_utils file ansible/module_utils/common/validation.pyIncluding module_utils file ansible/module_utils/common/warnings.pyIncluding module_utils file ansible/module_utils/compat/selectors.pyIncluding module_utils file ansible/module_utils/compat/__init__.pyIncluding module_utils file ansible/module_utils/compat/_selectors2.pyIncluding module_utils file ansible/module_utils/compat/selinux.pyIncluding module_utils file ansible/module_utils/distro/__init__.pyIncluding module_utils file ansible/module_utils/distro/_distro.pyIncluding module_utils file ansible/module_utils/errors.pyIncluding module_utils file ansible/module_utils/parsing/convert_bool.pyIncluding module_utils file ansible/module_utils/parsing/__init__.pyIncluding module_utils file ansible/module_utils/pycompat24.pyIncluding module_utils file ansible/module_utils/six/__init__.pyIncluding module_utils file ansible_collections/netapp/ontap/plugins/module_utils/netapp.pyIncluding module_utils file ansible/module_utils/ansible_release.pyIncluding module_utils file ansible_collections/__init__.pyIncluding module_utils file ansible_collections/netapp/__init__.pyIncluding module_utils file ansible_collections/netapp/ontap/__init__.pyIncluding module_utils file ansible_collections/netapp/ontap/plugins/__init__.pyIncluding module_utils file ansible_collections/netapp/ontap/plugins/module_utils/__init__.pyIncluding module_utils file ansible_collections/netapp/ontap/plugins/module_utils/netapp_module.pyIncluding module_utils file ansible_collections/netapp/ontap/plugins/module_utils/rest_generic.pyIncluding module_utils file ansible_collections/netapp/ontap/plugins/module_utils/rest_response_helpers.pyUsing module file /nix/store/9vv68nmc7z4a96bkdxmk4gabmvqpsqqp-python3-3.10.12-env/lib/python3.10/site-packages/ansible_collections/netapp/ontap/plugins/modules/na_ontap_quotas.py<127.0.0.1> PUT /home/elprobst/.ansible/tmp/ansible-local-958035gsdh0hg2/tmprplc73t0 TO /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675/AnsiballZ_na_ontap_quotas.py<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675/ /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675/AnsiballZ_na_ontap_quotas.py && sleep 0'<127.0.0.1> EXEC /bin/sh -c '/nix/store/9vv68nmc7z4a96bkdxmk4gabmvqpsqqp-python3-3.10.12-env/bin/python3.10 /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675/AnsiballZ_na_ontap_quotas.py && sleep 0'<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/elprobst/.ansible/tmp/ansible-tmp-1689750669.9888132-958041-268572850802675/ > /dev/null 2>&1 && sleep 0'fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "activate_quota_on_change": null, "cert_filepath": null, "disk_limit": "300MB", "feature_flags": null, "file_limit": null, "force_ontap_version": null, "hostname": "[REDACTED]", "http_port": null, "https": true, "key_filepath": null, "ontapi": null, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "perform_user_mapping": null, "policy": null, "qtree": "", "quota_target": "757", "set_quota_status": true, "soft_disk_limit": null, "soft_file_limit": null, "state": "present", "threshold": null, "type": "user", "use_rest": "always", "username": "ansible", "validate_certs": false, "volume": "test1", "vserver": "testsvm" } }, "msg": "Error on creating quotas rule: calling: storage/quota/rules: got {'message': 'duplicate entry', 'code': '1', 'target': 'uuid'}."}PLAY RECAP *********************************************************************localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
The text was updated successfully, but these errors were encountered:
Strangely, the issue (for which I opened the support case) regarding the initial error message disappeared and I am now completely unable to reproduce it.
The actual issue reported here (lack of idempotency, "msg": "Error on creating quotas rule: calling: storage/quota/rules: got {'message': 'duplicate entry', 'code': '1', 'target': 'uuid'}.") is still present.
Summary
When applying a quota rule a 2nd time, an error is returned:
Component Name
netapp.ontap.na_ontap_quotas
Ansible Version
ONTAP Collection Version
ONTAP Version
Playbook
Steps to Reproduce
Save the following playbook (e.g.
test-quota.yml
):Apply it for the 1st time:
The quota seems to be created as desired, but the output contains this warning:
As I first believed, this could be connected to the issue, I followed the instructions and manually disabled/enabled the quota for the volume, but it didn't change the actual outcome.
Apply the playbook for the 2nd time:
The result is:
Expected Results
I expect the Ansible playbook to show a proper idempotent behavior:
Actual Results
The text was updated successfully, but these errors were encountered: