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 1876896 - modify dnszone with serial fails when it used with refresh, retry, expire.
Summary: modify dnszone with serial fails when it used with refresh, retry, expire.
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
unspecified
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-08 13:13 UTC by anuja
Modified: 2021-05-18 15:51 UTC (History)
3 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:
pm-rhel: mirror+


Attachments (Terms of Use)

Description anuja 2020-09-08 13:13:47 UTC
Description of problem:
modify dnszone with serial fails when it used with refresh, retry, expire.

Version-Release number of selected component (if applicable):
ansible-freeipa-0.1.12-6.el8.noarch
ipa-server-4.8.7-10.module+el8.3.0+7702+ced5f219.x86_64


```
---
- name: Playbook to ensure modify serial numbers.
  hosts: ipaserver
  become: true
 
  tasks:
  - ipadnszone:
      ipaadmin_password: Secret123
      name: modszone.test
      serial: 4567
      refresh: 70
      retry: 89
      expire: 200
```
Actual results:
[root@master ~]# ipa dnszone-find modszone.test | grep "SOA serial:"
  SOA serial: 1599560600
[root@master ~]#

Expected results:
DNS zone should be modified with given SOA serial 

Additional info:
Usig CLI:
[root@master ~]# ipa dnszone-mod clizone.test --serial=4567 --refresh=70 --retry=89 --expire=200 | grep "SOA serial:"
  SOA serial: 4567

Comment 1 Rafael Jeffman 2020-09-08 22:47:37 UTC
This is the same behavior I am having with the command line.

```
[root@cos81 ~]# ipa dnszone-mod ttllone.test --serial=4567  --expire 201 --retry 87 --refresh 72
  Zone name: ttllone.test.
  Active zone: TRUE
  Authoritative nameserver: cos81.ipa.test.
  Administrator e-mail address: hostmaster
  SOA serial: 1599604817
  SOA refresh: 72
  SOA retry: 87
  SOA expire: 201
  SOA minimum: 3600
  Allow query: any;
  Allow transfer: none;
```

In the command-line, it seems that the `serial` cannot be changed if other values are also changed.

Your example might have worked because the other values did not change, so the `serial` could be set.

I agree that the ansible-freeipa module might not be correct, but it is the same as the command line one.

Comment 2 Rafael Jeffman 2020-09-08 23:09:17 UTC
Here is the FreeIPA upstream issue for the CLI command: https://pagure.io/freeipa/issue/8489

Comment 5 Rafael Jeffman 2020-11-19 22:18:59 UTC
To circunvent this issue, ipadnszone module can set the SOA serial attribute in a later call to dnszone_mod.

A patch with this workaround is avilable upstream: https://github.com/freeipa/ansible-freeipa/pull/449

Comment 9 Varun Mylaraiah 2020-12-11 11:01:59 UTC
Verified
ansible-freeipa-0.3.1-1.el8.noarch


ansible_freeipa_tests/dns_module.py::TestDNSZone::test_dnszone_soa_serial_mod_with_other_attr 
2020-12-11T08:15:27+0000 -------------------------------- live log call ---------------------------------
2020-12-11T08:15:27+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO RUN ['/usr/bin/rpm', '-q', 'ansible-freeipa']
2020-12-11T08:15:27+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/dns.hosts
2020-12-11T08:15:28+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT dns_module.yml
2020-12-11T08:15:28+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:15:33+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T08:15:33+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnszone-find', 'serialzoneattr.test', '--all']
2020-12-11T08:15:34+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T08:15:35+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO WRITE inventory/dns.hosts
2020-12-11T08:15:35+0000 [pytest_multihost.host.Host.ansible.ParamikoTransport] INFO PUT dns_module.yml
2020-12-11T08:15:35+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:15:40+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kinit', 'admin']
2020-12-11T08:15:41+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['ipa', 'dnszone-find', 'serialzoneattr.test', '--all']
2020-12-11T08:15:42+0000 [pytest_multihost.host.Host.master.ParamikoTransport] INFO RUN ['kdestroy', '-A']
2020-12-11T08:15:42+0000 PASSED              


Based on the test result, marking the bug VERIFIED.

Comment 11 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.