Bug 1733559
| Summary: | [ansible-freeipa] Reinitialize are failed to find node in ipatopology segments | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Varun Mylaraiah <mvarun> |
| Component: | ansible-freeipa | Assignee: | Thomas Woerner <twoerner> |
| Status: | CLOSED ERRATA | QA Contact: | ipa-qe <ipa-qe> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.1 | Flags: | pm-rhel:
mirror+
|
| Target Milestone: | rc | ||
| Target Release: | 8.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | ansible-freeipa-0.1.6-3 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-11-05 21:08:48 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Delete may not fail on a missing entry. This is a requirement for idempotency. But reinitalized should as it is not able to do the requested action. Here is the upstream fix: https://github.com/freeipa/ansible-freeipa/commit/c212b43516cb870bbaa86c607dde33f373768043 # cat reinitialize-topologysegment.yml
---
- name: Playbook to handle topologysegment
hosts: ipaserver
become: true
tasks:
- name: Reinitialize topology segment
ipatopologysegment:
ipaadmin_password: <xxxxxxxxxx>
suffix: domain
left: ipareplica1.test.local
right: unknow-host
direction: left-to-right
state: reinitialized
# cat inventory/hosts.topologysegment
[ipaserver]
ipaserver.test.local
# ansible-playbook -vv -i inventory/hosts.topologysegment reinitialize-topologysegment.yml
ansible-playbook 2.8.3
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible-playbook
python version = 3.6.8 (default, Jul 3 2019, 10:59:07) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)]
No config file found; using defaults
PLAYBOOK: reinitialize-topologysegment.yml **************************************************************************
1 plays in reinitialize-topologysegment.yml
PLAY [Playbook to handle topologysegment] ***************************************************************************
TASK [Gathering Facts] **********************************************************************************************
task path: /root/reinitialize-topologysegment.yml:2
ok: [ipaserver.test.local]
META: ran handlers
TASK [Reinitialize topology segment] ********************************************************************************
task path: /root/reinitialize-topologysegment.yml:7
fatal: [ipaserver.test.local]: FAILED! => {"changed": false, "msg": "No entry 'left=ipareplica1.test.local,right=unknow-host' for suffix 'domain'"}
PLAY RECAP **********************************************************************************************************
ipaserver.test.local : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Verified on ansible-freeipa-0.1.6-3.el8.noarch Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3418 |
Description of problem: In ipatopology segments delete and reinitialize are failed to find the node are exists or not Version-Release number of selected component (if applicable): ansible-freeipa-0.1.6-2.el8.noarch Steps to Reproduce: # cat delete-topologysegment.yml --- - name: Playbook to handle topologysegment hosts: ipaserver become: true tasks: - name: Delete topology segment ipatopologysegment: ipaadmin_password: <xxxxxxxxx> suffix: ca left: qwerty right: asdfg state: absent # ansible-playbook -vv -i inventory/hosts.topologysegment delete-topologysegment.yml ansible-playbook 2.8.2 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.6/site-packages/ansible executable location = /usr/local/bin/ansible-playbook python version = 3.6.8 (default, Jul 3 2019, 10:59:07) [GCC 8.3.1 20190507 (Red Hat 8.3.1-4)] No config file found; using defaults PLAYBOOK: delete-topologysegment.yml ******************************************************************************** 1 plays in delete-topologysegment.yml PLAY [Playbook to handle topologysegment] *************************************************************************** TASK [Gathering Facts] ********************************************************************************************** task path: /root/delete-topologysegment.yml:2 ok: [ipaserver.test.local] META: ran handlers TASK [Delete topology segment] ************************************************************************************** task path: /root/delete-topologysegment.yml:7 ok: [ipaserver.test.local] => {"changed": false} META: ran handlers META: ran handlers PLAY RECAP ********************************************************************************************************** ipaserver.test.local : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 Actual results: Not getting any error if the node does not exist. Expected results: it should provide an error if the node does not exist. Additional info: upstream ticket: https://github.com/freeipa/ansible-freeipa/issues/107