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

Ensure meta tasks don't disrupt host_pinned host/fork affinity #83249

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

sivel
Copy link
Member

@sivel sivel commented May 13, 2024

SUMMARY

Ensure meta tasks don't disrupt host_pinned host/fork affinity

ISSUE TYPE
  • Bugfix Pull Request
ADDITIONAL INFORMATION

Tests to come later

@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. labels May 13, 2024
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label May 14, 2024
@sivel
Copy link
Member Author

sivel commented May 14, 2024

Reproducer...

.
├── ansible.cfg
│   │ [defaults]
│   │ forks = 2
├── hosts
│   │ localhost0
│   │ localhost1
│   │ localhost2
│   │ localhost3
│   │ localhost4
│   │ localhost5
│   │ localhost6
│   │ localhost7
│   │ localhost8
│   │ localhost9
│   │
│   │ [all:vars]
│   │ ansible_connection=local
│   │ ansible_python_interpreter={{ansible_playbook_python}}
├── include_me.yml
│   │ - debug:
│   │     msg: include
│   │
│   │ - meta: noop
└── playbook.yml
    │ - hosts: all
    │   gather_facts: false
    │   strategy: host_pinned
    │   tasks:
    │     - name: start
    │       debug:
    │         msg: start
    │
    │     - include_tasks:
    │         file: include_me.yml
    │
    │     - name: end
    │       debug:
    │         msg: end

@sivel
Copy link
Member Author

sivel commented May 15, 2024

This implementation has a shortcoming, in that meta only tasks won't break out of the inner loop. This can result in an extra non-meta task executing early.

@sivel
Copy link
Member Author

sivel commented May 15, 2024

The last commit may fix the previously noted shortcoming

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants