Bug 2103924

Summary: [ansible-freeipa] ipa server deploys failing with latest IPA compose.
Product: Red Hat Enterprise Linux 9 Reporter: Varun Mylaraiah <mvarun>
Component: ansible-freeipaAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact: Varun Mylaraiah <mvarun>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: twoerner
Target Milestone: rcKeywords: Regression, TestBlocker, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ansible-freeipa-1.8.1-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:21:09 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 2022-07-05 09:57:47 UTC
Description of problem:
In ansible-freeipa, ipa server deploys failing due to a new random serial number in the latest IPA(ipa-server-4.10.0-2.el9.x86_64)


Console output:
================
TASK [ipaserver : Install - Use new master password] ***************************
task path: /usr/share/ansible/roles/ipaserver/tasks/install.yml:145
ok: [master.ipadomain.test] => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}

TASK [ipaserver : Install - Server preparation] ********************************
task path: /usr/share/ansible/roles/ipaserver/tasks/install.yml:153
fatal: [master.ipadomain.test]: FAILED! => {"changed": false, "module_stderr": "Shared connection to master.ipadomain.test closed.\r\n", "module_stdout": "/tmp/ansible_ipaserver_prepare_payload_j_kzogxf/ansible_ipaserver_prepare_payload.zip/ansible/modules/ipaserver_prepare.py:325: DeprecationWarning: Use 'ipapython.ipaldap.realm_to_serverid'\r\nTraceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1656993038.904248-20220-163756120644863/AnsiballZ_ipaserver_prepare.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1656993038.904248-20220-163756120644863/AnsiballZ_ipaserver_prepare.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1656993038.904248-20220-163756120644863/AnsiballZ_ipaserver_prepare.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.ipaserver_prepare', init_globals=dict(_module_fqn='ansible.modules.ipaserver_prepare', _modlib_path=modlib_path),\r\n  File \"/usr/lib64/python3.9/runpy.py\", line 225, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib64/python3.9/runpy.py\", line 97, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib64/python3.9/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_ipaserver_prepare_payload_j_kzogxf/ansible_ipaserver_prepare_payload.zip/ansible/modules/ipaserver_prepare.py\", line 422, in <module>\r\n  File \"/tmp/ansible_ipaserver_prepare_payload_j_kzogxf/ansible_ipaserver_prepare_payload.zip/ansible/modules/ipaserver_prepare.py\", line 345, in main\r\n  File \"/usr/lib/python3.9/site-packages/ipaserver/install/ca.py\", line 212, in install_check\r\n    options._random_serial_numbers = options.random_serial_numbers\r\nAttributeError: 'options_obj' object has no attribute 'random_serial_numbers'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}


Expected results:
Installation should succeed.

Additional info:

Comment 5 Thomas Woerner 2022-07-07 09:38:41 UTC
The upstream PR https://github.com/freeipa/ansible-freeipa/pull/852 has been merged.

Comment 10 Varun Mylaraiah 2022-07-19 06:56:55 UTC
Verified

ansible-core-2.13.1-2.el9.x86_64
ansible-freeipa-1.8.1-1.el9.noarch


=========================== short test summary info ============================
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster30::test_with_firewalld_stop
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster30::test_uninstall
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster01_25::test_with_dns
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster01_25::test_uninstall
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster02::test_without_dns
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster02::test_uninstall
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster28_01::test_external_ca_automatic_copy
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster28_01::test_uninstall
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster28_02::test_external_ca_manual_copy
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMaster28_02::test_uninstall
PASSED ansible_freeipa_tests/master/test_idm_deploy_master.py::TestMasterFirewalldZone::test_install_master_with_firewalld_zone
================== 11 passed, 1 warning in 3383.53s (0:56:23) ==================

Based on the test result, marking the bug verified.

Comment 12 errata-xmlrpc 2022-11-15 10:21:09 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-2022:8101