Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1845051

Summary: [ansible-freeipa] Required correct error messages in DNS Zone module
Product: Red Hat Enterprise Linux 8 Reporter: Varun Mylaraiah <mvarun>
Component: ansible-freeipaAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: ipa-qe <ipa-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: amore, pcech, rjeffman, twoerner
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:46:57 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:

Description Varun Mylaraiah 2020-06-08 11:25:31 UTC
Description of problem:
In the ansible-freeipa DNS zone module, error messages are not showing properly.


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

Steps to Reproduce:
1)
[root@ansible ~]# cat testdz.yaml
---
- name: Test DNS
  hosts: ipaserver

  tasks:
  - name: Ensure DNS Zone Test
    ipadnszone:
      ipaadmin_password: <xxxxxxxxxxx>
      name: testzone02.test
      forwarders: 
        - ip_address: in.va.li.d
          port: 55

[root@ansible ~]# ansible-playbook -vv -i inventory/server.hosts testdz06.yaml 
ansible-playbook 2.9.9
  config file = /root/ansible.cfg
  configured module search path = ['/root/ansible-freeipa/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.6.8 (default, Apr  3 2020, 16:09:51) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
Using /root/ansible.cfg as config file

PLAYBOOK: testdz06.yaml *********************************************************************************************************************************************************************************
1 plays in testdz06.yaml

PLAY [Test DNS] *****************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************
task path: /root/testdz06.yaml:2
ok: [master.ipadomain.test]
META: ran handlers

TASK [Ensure DNS Zone Test] *****************************************************************************************************************************************************************************
task path: /root/testdz06.yaml:6
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "module_stderr": "Shared connection to master.ipadomain.test closed.\r\n", "module_stdout": "\r\n{\"msg\": \"Invalid IP for DNS forwarder: in.va.li.d\", \"failed\": true, \"invocation\": {\"module_args\": {\"ipaadmin_password\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\", \"name\": \"testzone02.test\", \"forwarders\": [{\"ip_address\": \"in.va.li.d\", \"port\": 55}], \"state\": \"present\", \"ipaadmin_principal\": \"admin\", \"forward_policy\": null, \"name_server\": null, \"admin_email\": null, \"allow_sync_ptr\": null, \"update_policy\": null, \"dynamic_update\": null, \"dnssec\": null, \"allow_transfer\": null, \"allow_query\": null, \"serial\": null, \"refresh\": null, \"retry\": null, \"expire\": null, \"minimum\": null, \"ttl\": null, \"default_ttl\": null, \"nsec3param_rec\": null, \"skip_nameserver_check\": null, \"skip_overlap_check\": null}}}\r\n\r\n{\"msg\": \"1\", \"failed\": true, \"invocation\": {\"module_args\": {\"ipaadmin_password\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\", \"name\": \"testzone02.test\", \"forwarders\": [{\"ip_address\": \"in.va.li.d\", \"port\": 55}], \"state\": \"present\", \"ipaadmin_principal\": \"admin\", \"forward_policy\": null, \"name_server\": null, \"admin_email\": null, \"allow_sync_ptr\": null, \"update_policy\": null, \"dynamic_update\": null, \"dnssec\": null, \"allow_transfer\": null, \"allow_query\": null, \"serial\": null, \"refresh\": null, \"retry\": null, \"expire\": null, \"minimum\": null, \"ttl\": null, \"default_ttl\": null, \"nsec3param_rec\": null, \"skip_nameserver_check\": null, \"skip_overlap_check\": null}}}\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP **********************************************************************************************************************************************************************************************
master.ipadomain.test      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   


2)
[root@ansible ~]# cat dz13.yaml
---
- name: Test DNS
  hosts: ipaserver

  tasks:
  - name: Ensure DNS Zone Test
    ipadnszone:
      ipaadmin_password: <xxxxxxxx>
      name: testzone03.test
      serial: 9999999999999999999

TASK [Ensure DNS Zone Test] *****************************************************************************************************************************************************************************
task path: /root/dz13.yaml:6
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "module_stderr": "Shared connection to master.ipadomain.test closed.\r\n", "module_stdout": "\r\n{\"msg\": \"dnszone_mod: testzone03.test: invalid 'serial': can be at most 4294967295\", \"failed\": true, \"invocation\": {\"module_args\": {\"ipaadmin_password\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\", \"name\": \"testzone03.test\", \"serial\": 9999999999999999999, \"state\": \"present\", \"ipaadmin_principal\": \"admin\", \"forwarders\": null, \"forward_policy\": null, \"name_server\": null, \"admin_email\": null, \"allow_sync_ptr\": null, \"update_policy\": null, \"dynamic_update\": null, \"dnssec\": null, \"allow_transfer\": null, \"allow_query\": null, \"refresh\": null, \"retry\": null, \"expire\": null, \"minimum\": null, \"ttl\": null, \"default_ttl\": null, \"nsec3param_rec\": null, \"skip_nameserver_check\": null, \"skip_overlap_check\": null}}}\r\n\r\n{\"msg\": \"1\", \"failed\": true, \"invocation\": {\"module_args\": {\"ipaadmin_password\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\", \"name\": \"testzone03.test\", \"serial\": 9999999999999999999, \"state\": \"present\", \"ipaadmin_principal\": \"admin\", \"forwarders\": null, \"forward_policy\": null, \"name_server\": null, \"admin_email\": null, \"allow_sync_ptr\": null, \"update_policy\": null, \"dynamic_update\": null, \"dnssec\": null, \"allow_transfer\": null, \"allow_query\": null, \"refresh\": null, \"retry\": null, \"expire\": null, \"minimum\": null, \"ttl\": null, \"default_ttl\": null, \"nsec3param_rec\": null, \"skip_nameserver_check\": null, \"skip_overlap_check\": null}}}\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Comment 4 Rafael Jeffman 2020-07-31 13:50:37 UTC
There is an upstream PR for this issue: https://github.com/freeipa/ansible-freeipa/pull/333

Comment 5 Thomas Woerner 2020-08-18 07:09:48 UTC
The upstream PR has been merged.

Comment 8 anuja 2020-08-19 07:16:12 UTC
Verified using :
ansible-freeipa-0.1.12-6.el8.noarch
ansible_freeipa_tests/dns_module.py::TestDNSZone::()::test_invalid_serial
ansible_freeipa_tests/dns_module.py::TestDNSZone::()::test_dnszone_invalid_ip
**************************************************************************************************************************

transport.py               563 DEBUG    TASK [ipadnszone] **************************************************************
transport.py               563 DEBUG    task path: /root/dns_module.yml:7
transport.py               563 DEBUG    fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "Invalid IP for DNS forwarder: in.va.li.d"}
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAY RECAP *********************************************************************
transport.py               563 DEBUG    master.ipadomain.test      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
transport.py               563 DEBUG    
channel.py                1212 DEBUG    [chan 28] EOF received (28)
channel.py                1212 DEBUG    [chan 28] EOF sent (28)
transport.py               217 DEBUG    Exit code: 2
channel.py                1212 DEBUG    [chan 172] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 172] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 172 opened.
transport.py               318 INFO     RUN ['kinit', 'admin']
transport.py               519 DEBUG    RUN ['kinit', 'admin']
channel.py                1212 DEBUG    [chan 172] Sesch channel 172 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Password for admin: 
channel.py                1212 DEBUG    [chan 172] EOF received (172)
channel.py                1212 DEBUG    [chan 172] EOF sent (172)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 173] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 173] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 173 opened.
transport.py               318 INFO     RUN ['ipa', 'dnszone-show', 'invalidzone.test']
transport.py               519 DEBUG    RUN ['ipa', 'dnszone-show', 'invalidzone.test']
channel.py                1212 DEBUG    [chan 173] Sesch channel 173 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ipa: ERROR: invalidzone.test.: DNS zone not found
channel.py                1212 DEBUG    [chan 173] EOF received (173)
channel.py                1212 DEBUG    [chan 173] EOF sent (173)
transport.py               217 DEBUG    Exit code: 2
channel.py                1212 DEBUG    [chan 174] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 174] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 174 opened.
transport.py               318 INFO     RUN ['kdestroy', '-A']
transport.py               519 DEBUG    RUN ['kdestroy', '-A']
channel.py                1212 DEBUG    [chan 174] Sesch channel 174 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
channel.py                1212 DEBUG    [chan 174] EOF received (174)
channel.py                1212 DEBUG    [chan 174] EOF sent (174)
transport.py               217 DEBUG    Exit code: 0
****************************************************************************************************************

transport.py               563 DEBUG    TASK [ipadnszone] **************************************************************
transport.py               563 DEBUG    task path: /root/dns_module.yml:7
transport.py               563 DEBUG    fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "msg": "dnszone_add: invalidserialzone.test: invalid 'serial': can be at most 4294967295"}
transport.py               563 DEBUG    
transport.py               563 DEBUG    PLAY RECAP *********************************************************************
transport.py               563 DEBUG    master.ipadomain.test      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
transport.py               563 DEBUG    
channel.py                1212 DEBUG    [chan 30] EOF received (30)
channel.py                1212 DEBUG    [chan 30] EOF sent (30)
transport.py               217 DEBUG    Exit code: 2
channel.py                1212 DEBUG    [chan 175] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 175] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 175 opened.
transport.py               318 INFO     RUN ['kinit', 'admin']
transport.py               519 DEBUG    RUN ['kinit', 'admin']
channel.py                1212 DEBUG    [chan 175] Sesch channel 175 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    Password for admin: 
channel.py                1212 DEBUG    [chan 175] EOF received (175)
channel.py                1212 DEBUG    [chan 175] EOF sent (175)
transport.py               217 DEBUG    Exit code: 0
channel.py                1212 DEBUG    [chan 176] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 176] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 176 opened.
transport.py               318 INFO     RUN ['ipa', 'dnszone-show', 'invalidserialzone.test']
transport.py               519 DEBUG    RUN ['ipa', 'dnszone-show', 'invalidserialzone.test']
channel.py                1212 DEBUG    [chan 176] Sesch channel 176 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
transport.py               563 DEBUG    ipa: ERROR: invalidserialzone.test.: DNS zone not found
channel.py                1212 DEBUG    [chan 176] EOF received (176)
channel.py                1212 DEBUG    [chan 176] EOF sent (176)
transport.py               217 DEBUG    Exit code: 2
channel.py                1212 DEBUG    [chan 177] Max packet in: 32768 bytes
channel.py                1212 DEBUG    [chan 177] Max packet out: 32768 bytes
transport.py              1819 DEBUG    Secsh channel 177 opened.
transport.py               318 INFO     RUN ['kdestroy', '-A']
transport.py               519 DEBUG    RUN ['kdestroy', '-A']
channel.py                1212 DEBUG    [chan 177] Sesch channel 177 request ok
transport.py               563 DEBUG    -bash: line 1: cd: /root/multihost_tests: No such file or directory
transport.py               563 DEBUG    -bash: line 2: /root/multihost_tests/env.sh: No such file or directory
channel.py                1212 DEBUG    [chan 177] EOF received (177)
channel.py                1212 DEBUG    [chan 177] EOF sent (177)
transport.py               217 DEBUG    Exit code: 0

Comment 12 errata-xmlrpc 2020-11-04 02:46:57 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-2020:4663