controller_configuration icon indicating copy to clipboard operation
controller_configuration copied to clipboard

Filetree_read - memory leak issue

Open przemkalit opened this issue 1 year ago • 0 comments

Summary

When filetree_read is executed on a large number of job_templates (or other type), it eventually crashes due to a memory leak.

Issue Type

  • Bug Report

Ansible, Collection, Controller details

ansible --version

ansible [core 2.16.2]
  config file = None
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.12/site-packages/ansible
  ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.12.1 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] (/usr/bin/python3)
  jinja version = 3.1.3
  libyaml = True

ansible-galaxy collection list
Collection              Version
----------------------- -------
ansible.posix           1.5.4
ansible.windows         2.2.0
awx.awx                 23.6.0
containers.podman       1.11.0
kubernetes.core         3.0.0
redhatinsights.insights 1.2.2
theforeman.foreman      4.0.0

Controller version  4.5.6 
  • ansible installation method: EE

OS / ENVIRONMENT

Red Hat

Desired Behavior

Job templates or other objects are imported without issue.

Actual Behavior

TASK [infra.controller_configuration.filetree_read : Populate Job Templates list] ***
....
ERROR! A worker was found in a dead state

STEPS TO REPRODUCE

  1. Generate 2000 job templates
  2. Export with filetree_create
  3. Use files with filetree_read
---
- name: Backup all objects
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    controller_oauthtoken: "{{ lookup('ansible.builtin.env', 'TOWER_OAUTH_TOKEN') }}"
    controller_hostname: "{{ lookup('ansible.builtin.env', 'TOWER_HOST') }}"
    controller_validate_certs: "{{ lookup('ansible.builtin.env', 'TOWER_VERIFY_SSL') }}"
  roles:
    - infra.controller_configuration.filetree_create
---
- name: Read all objects
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    controller_oauthtoken: "{{ lookup('ansible.builtin.env', 'TOWER_OAUTH_TOKEN) }}"
    controller_hostname: "{{ lookup('ansible.builtin.env', 'TOWER_HOST') }}"
    controller_validate_certs: "{{ lookup('ansible.builtin.env', 'TOWER_VERIFY_SSL') }}"
  tasks:
    - name: Include vars from control_vars directory
      ansible.builtin.include_vars:
        dir: "{{ dir_orgs_vars }}"
        extensions:
          - "yml"
          - "yaml"

    - ansible.builtin.include_role:
      name: infra.controller_configuration.filetree_read

przemkalit avatar Jul 02 '24 13:07 przemkalit