Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipaclient task "Install - Create IPA NSS database" has error "KeyError: netmask" #1303

Open
okhdmitry opened this issue Oct 25, 2024 · 0 comments

Comments

@okhdmitry
Copy link

okhdmitry commented Oct 25, 2024

Description

Yesterday I had a problem with installing ipaclient role.
I have no problems with the network interfaces on the server.

Version information

  • ubuntu 20.04.4
  • python 3.8.10
  • ansible-core 2.12.10

Output

TASK [ipaclient : Install - Create IPA NSS database] ***************************
task path: /home/ansible/deploy/roles/ipaclient/tasks/install.yml:305
The full traceback is:
Traceback (most recent call last):
  File "/home/ansible/.ansible/tmp/ansible-tmp-1729768775.9277852-39260-23639135786736/AnsiballZ_ipaclient_setup_nss.py", line 107, in <module>
    _ansiballz_main()
  File "/home/ansible/.ansible/tmp/ansible-tmp-1729768775.9277852-39260-23639135786736/AnsiballZ_ipaclient_setup_nss.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ansible/.ansible/tmp/ansible-tmp-1729768775.9277852-39260-23639135786736/AnsiballZ_ipaclient_setup_nss.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible.modules.ipaclient_setup_nss', init_globals=dict(_module_fqn='ansible.modules.ipaclient_setup_nss', _modlib_path=modlib_path),
  File "/usr/lib/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ipaclient_setup_nss_payload_b20g9f0f/ansible_ipaclient_setup_nss_payload.zip/ansible/modules/ipaclient_setup_nss.py", line 516, in <module>
  File "/tmp/ansible_ipaclient_setup_nss_payload_b20g9f0f/ansible_ipaclient_setup_nss_payload.zip/ansible/modules/ipaclient_setup_nss.py", line 309, in main
  File "/usr/lib/python3/dist-packages/ipaclient/install/client.py", line 1510, in client_dns
    update_dns(server, hostname, options)
  File "/usr/lib/python3/dist-packages/ipaclient/install/client.py", line 1373, in update_dns
    no_matching_interface_for_ip_address_warning(update_ips)
  File "/usr/lib/python3/dist-packages/ipalib/util.py", line 1233, in no_matching_interface_for_ip_address_warning
    if not ip.get_matching_interface():
  File "/usr/lib/python3/dist-packages/ipapython/ipautil.py", line 228, in get_matching_interface
    ifmask = ifdata['netmask'].split(u'/')[-1]
KeyError: 'netmask'
fatal: [host]: FAILED! => {
    "changed": false,
    "module_stderr": "Shared connection to XX.XX.XX.XX closed.\r\n",
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1729768775.9277852-39260-23639135786736/AnsiballZ_ipaclient_setup_nss.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1729768775.9277852-39260-23639135786736/AnsiballZ_ipaclient_setup_nss.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/home/ansible/.ansible/tmp/ansible-tmp-1729768775.9277852-39260-23639135786736/AnsiballZ_ipaclient_setup_nss.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible.modules.ipaclient_setup_nss', init_globals=dict(_module_fqn='ansible.modules.ipaclient_setup_nss', _modlib_path=modlib_path),\r\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\r\n    _run_code(code, mod_globals, init_globals,\r\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_ipaclient_setup_nss_payload_b20g9f0f/ansible_ipaclient_setup_nss_payload.zip/ansible/modules/ipaclient_setup_nss.py\", line 516, in <module>\r\n  File \"/tmp/ansible_ipaclient_setup_nss_payload_b20g9f0f/ansible_ipaclient_setup_nss_payload.zip/ansible/modules/ipaclient_setup_nss.py\", line 309, in main\r\n  File \"/usr/lib/python3/dist-packages/ipaclient/install/client.py\", line 1510, in client_dns\r\n    update_dns(server, hostname, options)\r\n  File \"/usr/lib/python3/dist-packages/ipaclient/install/client.py\", line 1373, in update_dns\r\n    no_matching_interface_for_ip_address_warning(update_ips)\r\n  File \"/usr/lib/python3/dist-packages/ipalib/util.py\", line 1233, in no_matching_interface_for_ip_address_warning\r\n    if not ip.get_matching_interface():\r\n  File \"/usr/lib/python3/dist-packages/ipapython/ipautil.py\", line 228, in get_matching_interface\r\n    ifmask = ifdata['netmask'].split(u'/')[-1]\r\nKeyError: 'netmask'\r\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant