-
Notifications
You must be signed in to change notification settings - Fork 100
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
ansible-navigator failed when first meta task is skipped #598
Labels
bug
Researched, reproducible, committed to fix
good first issue
Bugs ideal for the first time, good for newcomers contributors
Comments
abikouo
added
bug
Researched, reproducible, committed to fix
new
New issues and PRs to triaged
labels
Oct 19, 2021
hello @abikouo thanks for the recreate here, I get the same result, it seems the entry for the task has a duration of None when we get it
Which can't be rounded :) This should be an easy fix, something like this in action/run/handle_message should work:
which would result in a log message of
thanks again for this & the repro! -Brad |
cidrblock
added
the
good first issue
Bugs ideal for the first time, good for newcomers contributors
label
Oct 29, 2021
ansible-zuul bot
pushed a commit
that referenced
this issue
Nov 24, 2021
set task duration to zero if None (fixes #598) fixes #598 with @cidrblock 's recommendation Worked with @alisonlhart was able to reproduce the issue and tested with steps listed in the issue. before Traceback (most recent call last): File "/home/aubin/work/env/py38.0/bin/ansible-navigator", line 8, in <module> sys.exit(main()) File "/home/aubin/work/env/py38.0/lib/python3.8/site-packages/ansible_navigator/cli.py", line 141, in main return_code = run(args) File "/home/aubin/work/env/py38.0/lib/python3.8/site-packages/ansible_navigator/cli.py", line 79, in run return_code = run_action_stdout(args.app.replace("-", "_"), args) File "/home/aubin/work/env/py38.0/lib/python3.8/site-packages/ansible_navigator/actions/_actions.py", line 109, in run_stdout return action_cls(args).run_stdout() File "/home/aubin/work/env/py38.0/lib/python3.8/site-packages/ansible_navigator/actions/run.py", line 249, in run_stdout self._dequeue() File "/home/aubin/work/env/py38.0/lib/python3.8/site-packages/ansible_navigator/actions/run.py", line 612, in _dequeue self._handle_message(message) File "/home/aubin/work/env/py38.0/lib/python3.8/site-packages/ansible_navigator/actions/run.py", line 664, in _handle_message task["__duration"] = human_time(seconds=round(task["duration"], 2)) TypeError: type NoneType doesn't define __round__ method after ansible-navigator run ./test_inventory.yml -m stdout -v -i ./inventory.ini No config file found; using defaults PLAY [all] ********************************************************************* TASK [End play if remote host] ************************************************* skipping: [localhost] => {"msg": "end_host conditional evaluated to false, continuing execution for localhost", "skip_reason": "end_host conditional evaluated to False, continuing execution for localhost"} PLAY RECAP ********************************************************************* ansible-navigator log entry 211123164144.219 DEBUG 'ansible_navigator.actions.run_playbook._handle_message' Task duration for 'End play if remote host' was type <class 'NoneType'>, set to 0 Reviewed-by: Sorin Sbarnea <sorin.sbarnea@gmail.com> Reviewed-by: Bradley A. Thornton <bthornto@redhat.com> Reviewed-by: None <None>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Researched, reproducible, committed to fix
good first issue
Bugs ideal for the first time, good for newcomers contributors
ISSUE TYPE
SUMMARY
ANSIBLE-NAVIGATOR VERSION
CONFIGURATION
STEPS TO REPRODUCE
test_inventory.yml
inventory.ini
EXPECTED RESULTS
navigator should execute the playbook successfully
ACTUAL RESULTS
ansible-navigator fails to execute playbook
The text was updated successfully, but these errors were encountered: