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

_do_handler_run() takes at least 5 arguments (5 given) #13560

Closed
cmacrae opened this issue Dec 15, 2015 · 2 comments
Closed

_do_handler_run() takes at least 5 arguments (5 given) #13560

cmacrae opened this issue Dec 15, 2015 · 2 comments
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Milestone

Comments

@cmacrae
Copy link

cmacrae commented Dec 15, 2015

Issue Type:

Bug Report

Ansible Version:

v2.0.0-0.7.rc2

Ansible Configuration:

ansible.cfg

[defaults]

remote_tmp     = $HOME/.ansible/tmp
pattern        = *
forks          = 16
poll_interval  = 15
sudo_user      = root
remote_user    = root
transport      = smart
remote_port    = 22
module_lang    = C
gathering = implicit
roles_path    = roles/external:roles/internal
host_key_checking = False
sudo_exe = sudo
timeout = 10
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

[accelerate]

accelerate_port = 5099
accelerate_timeout = 30
accelerate_connect_timeout = 5.0
accelerate_daemon_timeout = 30
Environment:

Control node OS: Fedora 23
Destination node OS: CentOS 7

Summary:

A role I wrote and maintain has a notify for a get_url task.
This notifies a handler which includes a playbook.
When a change for the get_url task triggers the handler, the following is returned:

Unexpected Exception: _do_handler_run() takes at least 5 arguments (5 given)
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 84, in <module>
    sys.exit(cli.run())
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 149, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 149, in run
    result = self._tqm.run(play=play)
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 249, in run
    play_return = strategy.run(iterator, play_context)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/linear.py", line 205, in run
    self._execute_meta(task, play_context, iterator)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 641, in _execute_meta
    self.run_handlers(iterator, play_context)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 528, in run_handlers
    result = self._do_handler_run(handler, handler_name, iterator=iterator, play_context=play_context)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/strategy/__init__.py", line 592, in _do_handler_run
    notified_hosts=included_file._hosts[:],
TypeError: _do_handler_run() takes at least 5 arguments (5 given)
Steps To Reproduce:

The get_url task with the notify
The handler
The playbook included by the handler

The - meta: flush_handlers task does not affect this in any way. The same happens with or without it, or regardless of its position in the playbook.

Expected Results:

The handler should run, include the playbook, and execute the tasks within said playbook.

Thanks

Thanks in advance for any help on this! Please do let me know if there's any further information I can provide that would aid investigation. 👍

@jimi-c jimi-c added this to the v2 milestone Dec 16, 2015
@jimi-c jimi-c added the P2 Priority 2 - Issue Blocks Release label Dec 16, 2015
jimi-c added a commit that referenced this issue Dec 17, 2015
Also fixes a bug where we were passing an incorrect number of parameters to
_do_handler_run() when processing an include file in a handler task/block.

Fixes #13560
@jimi-c jimi-c closed this as completed in 15135f3 Dec 17, 2015
@jimi-c
Copy link
Member

jimi-c commented Dec 17, 2015

Closing This Ticket

Hi!

We believe the above commit should resolve this problem for you. This will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.

Thank you!

@cmacrae
Copy link
Author

cmacrae commented Dec 17, 2015

Awesome, thanks!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

3 participants