Skip to content

Regression in postgresql_info for 3.10.0 #794

@eb4x

Description

@eb4x
SUMMARY

A task using postgresql_info gathering in_recovery, stopped working in 3.10.0 collection.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

postgresql_info

ANSIBLE VERSION
ansible [core 2.16.13]
  config file = /home/erikberg/src/dia-ansible/ansible.cfg
  configured module search path = ['/home/erikberg/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/erikberg/.local/lib/python3.13/site-packages/ansible
  ansible collection location = /home/erikberg/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/erikberg/.local/bin/ansible
  python version = 3.13.1 (main, Dec  9 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

COLLECTION VERSION
Collection           Version
-------------------- -------
community.postgresql 3.10.0 
CONFIGURATION

OS / ENVIRONMENT

EL9 (almalinux)

STEPS TO REPRODUCE
  tasks:
    - name: Get in_recovery on postgresql
      become: true
      become_user: postgres
      community.postgresql.postgresql_info:
        filter: in_recovery
      register: _pgsql_info
EXPECTED RESULTS

It just works, like in 3.9.0

ACTUAL RESULTS
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'login_db'
fatal: [server.vagrant.local]: FAILED! => {"changed": false, "module_stderr": "Shared connection to server.vagrant.local closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/var/tmp/ansible-tmp-1737370726.9350688-583628-240187215419414/AnsiballZ_postgresql_info.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/var/tmp/ansible-tmp-1737370726.9350688-583628-240187215419414/AnsiballZ_postgresql_info.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/var/tmp/ansible-tmp-1737370726.9350688-583628-240187215419414/AnsiballZ_postgresql_info.py\", line 47, in invoke_module\r\n    runpy.run_module(mod_name='ansible_collections.community.postgresql.plugins.modules.postgresql_info', init_globals=dict(_module_fqn='ansible_collections.community.postgresql.plugins.modules.postgresql_info', _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_community.postgresql.postgresql_info_payload_rirhzlri/ansible_community.postgresql.postgresql_info_payload.zip/ansible_collections/community/postgresql/plugins/modules/postgresql_info.py\", line 756, in <module>\r\n  File \"/tmp/ansible_community.postgresql.postgresql_info_payload_rirhzlri/ansible_community.postgresql.postgresql_info_payload.zip/ansible_collections/community/postgresql/plugins/modules/postgresql_info.py\", line 750, in main\r\n  File \"/tmp/ansible_community.postgresql.postgresql_info_payload_rirhzlri/ansible_community.postgresql.postgresql_info_payload.zip/ansible_collections/community/postgresql/plugins/modules/postgresql_info.py\", line 233, in __init__\r\nKeyError: 'login_db'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions