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

Free strategy + include_task leads to wrong tasks running #60512

Open
ian-kelling opened this issue Aug 13, 2019 · 3 comments

Comments

@ian-kelling
Copy link

commented Aug 13, 2019

SUMMARY

The free strategy, include_tasks will skip some hosts,
sometimes run twice on some hosts, sometimes run on a host
despite a when: "'groupx' not in group_names".

ANSIBLE VERSION
ansible 2.7.4-1ppa~xenial
CONFIGURATION
ANSIBLE_PIPELINING(/root/ansible-configs/ansible.cfg) = True
ANSIBLE_SSH_RETRIES(/root/ansible-configs/ansible.cfg) = 2
COLOR_VERBOSE(/root/ansible-configs/ansible.cfg) = bright blue
DEFAULT_FORKS(/root/ansible-configs/ansible.cfg) = 200
DEFAULT_STDOUT_CALLBACK(/root/ansible-configs/ansible.cfg) = yaml
DISPLAY_SKIPPED_HOSTS(/root/ansible-configs/ansible.cfg) = False
HOST_KEY_CHECKING(/root/ansible-configs/ansible.cfg) = False
RETRY_FILES_ENABLED(/root/ansible-configs/ansible.cfg) = False
ISSUE TYPE
  • Bug Report
OS / ENVIRONMENT

trisquel 8 (derivative of ubuntu 16.04)

STEPS TO REPRODUCE

I already spent over a day tracking this down, I don't have time to
make a minimal repro or testing on the latest dev version, maybe sometime in the next few weeks I will, I figured better to report it than not.

timeout --foreground 1h ansible-playbook --key-file somekeyfile -i inventory site.yml -v |& tee -a logfile

In the main playbook, about line 250, earlier tasks do things like copy files, setup users, apt_repository, which all takes 8 minutes or so:

- include_tasks: roles/install.yml
  vars:
    title: "fundamental packages"
    packages: "{{ fundamental_packages }}"

roles/install.yml:

---
- name: install "{{ packages }}"
  apt:
   name: '{{ packages }}'
   state: present
   install_recommends: no
   update_cache: yes
   autoremove: yes

Out of 50 hosts fundamental_packages task should run on, with the free strategy, with somewhat random results, it would run usually on only 44-47 hosts, maybe half the time it would run on 1 host twice. A later include_task sometimes had a when: condition get ignored. All this only happened under the free strategy. The results changed seemingly randomly, it looks like a timing issue so I assume 8 minutes or so of earlier tasks is important for this to reproduce.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

Files identified in the description:
None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

@ian-kelling: Greetings! Thanks for taking the time to open this issue. In order for the community to handle your issue effectively, we need a bit more information.

Here are the items we could not find in your description:

  • component name

Please set the description of this issue with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/ISSUE_TEMPLATE.md

click here for bot help

@sivel

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

!component =lib/ansible/plugins/strategy/free.py

bot_status

@sivel sivel added needs_verified and removed needs_triage labels Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.