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

correct the unreachable error code #36660

Open
wants to merge 1 commit into
base: devel
from

Conversation

5 participants
@bcoca
Member

bcoca commented Feb 23, 2018

SUMMARY

now it matches documented value
also add entry for play failure condition code

fixes #19720

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
ANSIBLE VERSION
2.4/2.5/2.6
correct the unreachable error code
now it matches documented value
also add entry for play failure condition code

fixes #19720

@bcoca bcoca added this to To Do in 2.5.x blocker list via automation Feb 23, 2018

@bcoca bcoca added this to Nice to have in 2.4.x Blocker List Feb 23, 2018

@bcoca bcoca moved this from To Do to In Progress in 2.5.x blocker list Feb 23, 2018

@@ -64,7 +64,7 @@ class TaskQueueManager:
RUN_OK = 0
RUN_ERROR = 1
RUN_FAILED_HOSTS = 2
RUN_UNREACHABLE_HOSTS = 4
RUN_UNREACHABLE_HOSTS = 3

This comment has been minimized.

@sivel

sivel Feb 23, 2018

Member

I'm curious as to whether this will work. IIRC these values are used in bitwise operations, so I'm unsure that a value of 3 will work.

This comment has been minimized.

@bcoca

bcoca Feb 23, 2018

Member

i checked the usage, i suspected same thing initially, but it is just a straight return of the constant

@abadger

This comment has been minimized.

Member

abadger commented Mar 1, 2018

Little research on the return value.

  • In 2.4.x that specific attribute is used in a bitfield.
  • even in devel, other attributes that look the same (RUN_ERROR and RUN_FAILED_BREAK_PLAY, for instance) are bitwised with the results.

So I think sivel is right that we shouldn't use non-bit-field-compatible values for these codes. Instead we should translate from a bit value into the return code we document or change the documentation.

@ansibot ansibot added bug and removed needs_revision labels Mar 1, 2018

@abadger

This comment has been minimized.

Member

abadger commented Mar 1, 2018

Looked in git history for when this changed and it looks like the return code changed between 2.1 and 2.2. So I think we should change the documentation at this point.

@bcoca bcoca removed this from In Progress in 2.5.x blocker list Mar 8, 2018

@ansibot ansibot added the stale_ci label Mar 10, 2018

@ansibot ansibot added the affects_2.6 label May 21, 2018

@ansibot ansibot added the small_patch label Jun 22, 2018

@ansibot ansibot added the core_review label Oct 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment