Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing modify_client_match and get_export_policy_rule #44164

Merged
merged 1 commit into from Aug 28, 2018
Merged

Missing modify_client_match and get_export_policy_rule #44164

merged 1 commit into from Aug 28, 2018

Conversation

zeten30
Copy link
Contributor

@zeten30 zeten30 commented Aug 15, 2018

SUMMARY
  • Added 'modify_client_match' function. It was not defined at all
  • Fixing 'get_export_policy_rule'. Client match was not included in query, so it always matched the first rule. Module was not able to create/modify multiple rules inside one policy
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

modules/storage/netapp/na_ontap_export_policy_rule.py

ANSIBLE VERSION
ansible 2.6.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/brq/mzink/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15 (default, May 16 2018, 17:50:09) [GCC 8.1.1 20180502 (Red Hat 8.1.1-1)]
ADDITIONAL INFORMATION
# Missing function ->
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_aRMrZU/ansible_module_na_ontap_export_policy_rule.py\", line 528, in <module>\n    main()\n  File \"/tmp/ansible_aRMrZU/ansible_module_na_ontap_export_policy_rule.py\", line 524, in main\n    rule_obj.apply()\n  File \"/tmp/ansible_aRMrZU/ansible_module_na_ontap_export_policy_rule.py\", line 512, in apply\n    self.modify_client_match(rule_index)\nAttributeError: 'NetAppontapExportRule' object has no attribute 'modify_client_match'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1


# Single rule problem
Inventory
            "test20": # Policy
              "na-vsim.brq.redhat.com": # Client-match
                protocol:              nfs # Settings fro cline-match ^
                ro_rule:               sys
                rw_rule:               sys
                super_user_security:   sys
              ".brq.redhat.com":
                protocol:              nfs4
                rw_rule:               krb5p
                super_user_security:   krb5p

Module exited with success, but only the last rule ".brq.redhat.com" was present, not both!
Fixed by changing  'get_export_policy_rule' function.

@ansibot
Copy link
Contributor

ansibot commented Aug 15, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. netapp new_contributor This PR is the first contribution by a new community member. storage support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. labels Aug 15, 2018
@schmots1
Copy link
Contributor

Will pull for internal test, and push out via process. Thank you for submission.

@zeten30
Copy link
Contributor Author

zeten30 commented Aug 15, 2018

Perfect. You are welcome.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Aug 15, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 24, 2018
@gundalow gundalow merged commit 2fab2d5 into ansible:devel Aug 28, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. netapp new_contributor This PR is the first contribution by a new community member. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. storage support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants