You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when you want to get replication info on primary host using filter slave_hosts;
when you want to get replication info on replica host using filter slave_status.
ISSUE TYPE
Bug Report
COMPONENT NAME
mysql_info
ANSIBLE VERSION
ansible [core 2.17.5]
python version = 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)]
jinja version = 3.1.4
COLLECTION VERSION
Collection Version
--------------- -------
community.mysql 3.10.3
STEPS TO REPRODUCE
Run to instances with replication Primary -> Replica (Master -> Slave);
Run ansible ad-hoc command on primary host: ansible <primary host> -m mysql_info -a 'filter=slave_hosts'
Run ansible ad-hoc command on replica host: ansible <replica host> -m mysql_info -a 'filter=slave_status'
EXPECTED RESULTS
Return required data.
ACTUAL RESULTS
"module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 107, in <module>\n File \"<stdin>\", line 99, in _ansiballz_main\n File \"<stdin>\", line 47, in invoke_module\n File \"/usr/lib/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.9/runpy.py\", line 97, in _run_module_code\n_run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_mysql_info_payload_2q_s7u3e/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 787, in <module>\n File \"/tmp/ansible_mysql_info_payload_2q_s7u3e/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 783, in main\n File \"/tmp/ansible_mysql_info_payload_2q_s7u3e/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 388, in get_info\n File \"/tmp/ansible_mysql_info_payload_2q_s7u3e/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 435, in __collect\n File \"/tmp/ansible_mysql_info_payload_2q_s7u3e/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 545, in __get_slaves\nKeyError: 'Server_id'\n"
"module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 107, in <module>\n File \"<stdin>\", line 99, in _ansiballz_main\n File \"<stdin>\", line 47, in invoke_module\n File \"<frozen runpy>\", line 226, in run_module\n File \"<frozen runpy>\", line 98, in _run_module_code\n File \"<frozen runpy>\", line 88, in _run_code\n File \"/tmp/ansible_mysql_info_payload_6nsn_pqi/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 787, in <module>\n File \"/tmp/ansible_mysql_info_payload_6nsn_pqi/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 783, in main\n File \"/tmp/ansible_mysql_info_payload_6nsn_pqi/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 388, in get_info\n File \"/tmp/ansible_mysql_info_payload_6nsn_pqi/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 432, in __collect\n File \"/tmp/ansible_mysql_info_payload_6nsn_pqi/ansible_mysql_info_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_info.py\", line 523, in __get_slave_status\nKeyError: 'Master_Host'\n"
The text was updated successfully, but these errors were encountered:
I tested and latest pymysql versions, but still result is the same.
I check older versions of collections, but only 3.9.0 collection version works correctly for me.
Hi @laurent-indermuehle,
I use Percona Server for MySQL 8.0.39-30, my roles use mysql_info to get replication status, replications host list and etc, mysql_replication module do not return same data as mysql_info.
SUMMARY
mysql_info
module failing:slave_hosts
;slave_status
.ISSUE TYPE
COMPONENT NAME
mysql_info
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
ansible <primary host> -m mysql_info -a 'filter=slave_hosts'
ansible <replica host> -m mysql_info -a 'filter=slave_status'
EXPECTED RESULTS
Return required data.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: