RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1881452 - [ansible-freeipa] Also when tried to update multiple records with all attributes with type DS it creates new entry.
Summary: [ansible-freeipa] Also when tried to update multiple records with all attribu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ansible-freeipa
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 8.0
Assignee: Rafael Jeffman
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-22 12:16 UTC by anuja
Modified: 2021-05-18 15:51 UTC (History)
4 users (show)

Fixed In Version: ansible-freeipa-0.3.0-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:51:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description anuja 2020-09-22 12:16:50 UTC
Description of problem:
Also when tried to update multiple records with all attributes with type DS it creates new entry.


Version-Release number of selected component (if applicable):
ansible-freeipa-0.1.12-6.el8.noarch

[root@client ~]# ipa dnsrecord-show safezone.test iron01
  Record name: iron01
  A record: 12.1.105.77
  DS record: 12346 3 3 84763786e4213cca9a6938dba5dacd64f87ec216, 12343 3 3 84763786e4213cca9a6938dba5dacd64f87ec216
  NS record: iron01
[root@client ~]# 
[root@client ~]# cat test.yaml 
---
- name: Playbook to ensure
  hosts: ipaserver

  tasks:
  - ipadnsrecord:
      ipaadmin_password: Secret123
      zone_name: safezone.test
      records:
        - name: iron01
          ds_key_tag: 5555
          ds_algorithm: 5
          ds_digest_type: 5
          ds_digest: 84763786e4213cca9a6938dba5dacd64f87ec222
          ds_record: 12346 3 3 84763786e4213cca9a6938dba5dacd64f87ec216

        - name: iron01
          ds_key_tag: 5555
          ds_algorithm: 5
          ds_digest_type: 5
          ds_digest: 84763786e4213cca9a6938dba5dacd64f87ec222
          ds_record: 12343 3 3 84763786e4213cca9a6938dba5dacd64f87ec216
[root@client ~]# 
[root@client ~]# ansible-playbook test.yaml 

PLAY RECAP ***************************************************************************************************************************************
12.1.105.77                : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

[root@client ~]# ipa dnsrecord-show safezone.test iron01
  Record name: iron01
  A record: 12.1.105.77
  DS record: 12346 3 3 84763786e4213cca9a6938dba5dacd64f87ec216, 12343 3 3 84763786e4213cca9a6938dba5dacd64f87ec216, 5555 5 5
             84763786e4213cca9a6938dba5dacd64f87ec222
  NS record: iron01
[root@client ~]#

Comment 3 Rafael Jeffman 2020-11-13 18:39:00 UTC
In the example provided, the playbook should fail with message "`dsrecord` not found.", as it is modifying the same record twice, so in the second task the record does not exist anymore.

There is an upstream PR for the issue: https://github.com/freeipa/ansible-freeipa/pull/438

Comment 4 Rafael Jeffman 2020-11-20 12:34:56 UTC
Upstream PR was merged.

Comment 8 Varun Mylaraiah 2020-12-11 10:56:20 UTC
Verified:
ansible-freeipa-0.3.1-1.el8.noarch

2020-12-11T08:28:39+0000 ansible_freeipa_tests/dns_module.py::TestDNSDSrecord::test_dns_dsrec_update_multiple 
2020-12-11T08:28:39+0000 -------------------------------- live log call ---------------------------------
2020-12-11T08:28:39+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T08:28:39+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnsrecord-show', 'rectestzone.test', 'dnsrecord']
2020-12-11T08:28:40+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T08:28:40+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/dns.hosts
2020-12-11T08:28:40+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT dns_module.yml
2020-12-11T08:28:40+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['ansible-playbook', '--ssh-extra-args="-o StrictHostKeyChecking=no"', '-vv', '-i', 'inventory/dns.hosts', 'dns_module.yml']
2020-12-11T08:28:46+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T08:28:46+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnsrecord-show', 'rectestzone.test', 'dnsrecord']
2020-12-11T08:28:47+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T08:28:47+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['/usr/bin/rpm', '-q', 'ansible-freeipa']
2020-12-11T08:28:47+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T08:28:47+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnsrecord-show', 'rectestzone.test', 'dnsrecord']
2020-12-11T08:28:48+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T08:28:49+0000 PASSED                                                                 


Based on the test result, marking the bug VERIFIED.

Comment 10 errata-xmlrpc 2021-05-18 15:51:18 UTC
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 (ansible-freeipa bug fix and enhancement update), 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/RHEA-2021:1860


Note You need to log in before you can comment on or make changes to this bug.