Skip to content

Downloading external resources degrades performance #8948

@pemsith

Description

@pemsith

Description
Tasks that directly download resources from external sources during runtime (e.g., get_url) causes high memory usage. This issue is particularly noticeable in environments with large-scale deployments or limited system resources. There are multiple instances in different files that we are reporting as part of this bug that we would like to get resolved.

ansible/configs/hacluster-breakfix1-pntae/node-install.yml
- name: copying binary
get_url:
url: "{{courseurl}}/{{coursecode}}/breakfix1/mk"
dest: /usr/local/bin/
mode: '0755'

    - name: Pull mysql config file
      get_url:
       url: "{{courseurl}}/{{coursecode}}/breakfix1/my.cnf"
       dest: /etc/my.cnf

    - name: Pull http config file
      get_url:
       url: "{{courseurl}}/{{coursecode}}/breakfix1/httpd.conf"
       dest: /etc/httpd/conf/httpd.conf

    - name: copying binary
      get_url:
        url: "{{courseurl}}/{{coursecode}}/breakfix1/break-node.sh"
        dest: /usr/local/bin/
        mode: '0755'

    - name: c-opying binary
      get_url:
        url: "{{courseurl}}/{{coursecode}}/breakfix1/break-log.sh"
        dest: /usr/local/bin/
        mode: '0755' 

ansible/configs/hacluster-breakfix1-pntae/iscsiserver.yml
- name: iscsi target server configuration. Get the script
get_url:
url: "{{courseurl}}/{{coursecode}}/breakfix1/target-iscsi-server.sh"
dest: /usr/local/bin/
mode: '0755'

ansible/configs/ansible-automation-platform/software.yml
- name: Download Manifest for Controller
get_url:
url: "{{ controller_manifest.url }}"
dest: /tmp

ansible/configs/ansible-multi-node/setup-hands-on-aap2.yml
- name: Install user resources
get_url:
url: "{{ __resource.url }}"

ansible/configs/osp-stf/post_software.yml
- name: Get cirros images
get_url:
url: "http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img"

Expected behavior
The playbook should avoid fetching resources directly from external URLs to prevent high memory usage. Instead:

  • Pre-fetch the required resources to a control machine or staging area ahead of deployment.
  • Use local copies or mirrors for fetching files.
  • This approach would reduce memory usage and improve the performance and reliability of deployments.

Versions (please complete the following information):

  • OS - centos 9
  • Ansible core 2.15.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions