ceph / ceph/ceph.automation

ceph_orch_daemon error: ceph_common.debug incorrect parameters

Open
#10 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
10
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Trying to use the ceph_orch_daemon module results in the following error:
```
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'function' object has no attribute '_debug'
fatal: [HOST]: FAILED! => {"changed": false, "module_stderr": "Shared connection to HOST closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/home/rocky/.ansible/tmp/ansible-tmp-1743097296.217098-
470622-132304345402775/AnsiballZ_ceph_orch_daemon.py\", line 107, in \r\n _ansiballz_main()\r\n File \"/home/rocky/.ansible/tmp/ansible-tmp-1743097296.217098-470622-132304345402775/AnsiballZ_ceph_orch_daemon.py\", line 99, in _
ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/USER/.ansible/tmp/ansible-tmp-1743097296.217098-470622-132304345402775/AnsiballZ_ceph_orch_daemon.py\", line 47, in invoke_module\r\n runpy.
run_module(mod_name='ansible_collections.ceph.automation.plugins.modules.ceph_orch_daemon', init_globals=dict(_module_fqn='ansible_collections.ceph.automation.plugins.modules.ceph_orch_daemon', _modlib_path=modlib_path),\r\n File \"/usr/l
ib64/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_gl
obals,\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_ceph.automation.ceph_orch_daemon_payload_o2ve3qnm/ansible_ceph.automation.ceph_orch_daemon_payload.zip/ansibl
e_collections/ceph/automation/plugins/modules/ceph_orch_daemon.py\", line 199, in \r\n File \"/tmp/ansible_ceph.automation.ceph_orch_daemon_payload_o2ve3qnm/ansible_ceph.automation.ceph_orch_daemon_payload.zip/ansible_collections/
ceph/automation/plugins/modules/ceph_orch_daemon.py\", line 182, in main\r\n File \"/tmp/ansible_ceph.automation.ceph_orch_daemon_payload_o2ve3qnm/ansible_ceph.automation.ceph_orch_daemon_payload.zip/ansible_collections/ceph/automation/pl
ugins/module_utils/ceph_common.py\", line 113, in _retry\r\n File \"/tmp/ansible_ceph.automation.ceph_orch_daemon_payload_o2ve3qnm/ansible_ceph.automation.ceph_orch_daemon_payload.zip/ansible/module_utils/basic.py\", line 1234, in debug\r
\nAttributeError: 'function' object has no attribute '_debug'\r\n", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}
```

It looks to me like the `retry` decorator for `ceph_orch_daemon.validate_updated_status` is calling `AnsibleModule.debug` incorrectly but my Ansible module knowledge is too limited to know why/how.

Environment:
Ansible version 2.18.3
Remote host OS: Rocky 9.4
Remote python: Python 3.9

Contributor guide

Open the contributing guide

Research direction

Start with ceph_orch_daemon.validate_updated_status and the retry path at module_utils/ceph_common.py line 113, then inspect how AnsibleModule.debug is used in the traceback. Reproduce the module failure with Ansible 2.18.3 and confirm the module completes without the AttributeError and returns a valid result.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.