Running Upgrade Automation preflight causes message Verify free space available on the Orchestrator (24 GB required)]
search cancel

Running Upgrade Automation preflight causes message Verify free space available on the Orchestrator (24 GB required)]

book

Article ID: 416521

calendar_today

Updated On:

Products

Network Observability

Issue/Introduction

When running Running Upgrade Automation preflight script a message is displayed
Verify free space available on the Orchestrator (24 GB required)]

Environment

DX NetOps Spectrum upgrade automation

Cause

Looking at the inventory-validation.yml playbook we are doing the following:

 - name: Verify free space on the Orchestrator
      block:
        - name: Register available free space on the Orchestrator
          ansible.builtin.raw: df ~/ --output\=avail | tail -1
          register: freespace_output
          changed_when: true

        - name: Get available memory in GB
          ansible.builtin.set_fact:
            avail_mem_gb: "{{ freespace_output.stdout | float / 1000000 }}"
            free_mem_required: "{{ free_mem_block_size * 4 }}"

        - name: Verify free space available on the Orchestrator ({{ free_mem_required }} GB required)
          ansible.builtin.assert:
            that: (avail_mem_gb | float) is gt (free_mem_required | float )
            success_msg: Sufficient free memory available on the Orchestrator ={{ avail_mem_gb }} GB.
            fail_msg: "Orchestrator does not have the minimum space required to continue ({{ free_mem_required }} GB required)."

 

When running the following command df ~/ --output\=avail | tail -1 and calculating the free space on the / partition using the following command:

freespace_output.stdout | float / 1000000

 The check this value against the free_mem_required. This is defined by the free_mem_block_size * 4. The free_mem_block_size is defined in the variables.yml file in the config directory with a value of 6.

The freespace_output has to be greater than 24GB.

Currently we are only checking the / partition for the disk space. 

Resolution

The following code in the inventory-validation.yml playbook can be commented out.

- name: Verify free space on the Orchestrator
      block:
        - name: Register available free space on the Orchestrator
          ansible.builtin.raw: df ~/ --output\=avail | tail -1
          register: freespace_output
          changed_when: true

        - name: Get available memory in GB
          ansible.builtin.set_fact:
            avail_mem_gb: "{{ freespace_output.stdout | float / 1000000 }}"
            free_mem_required: "{{ free_mem_block_size * 4 }}"

        - name: Verify free space available on the Orchestrator ({{ free_mem_required }} GB required)
          ansible.builtin.assert:
            that: (avail_mem_gb | float) is gt (free_mem_required | float )
            success_msg: Sufficient free memory available on the Orchestrator ={{ avail_mem_gb }} GB.
            fail_msg: "Orchestrator does not have the minimum space required to continue ({{ free_mem_required }} GB required)."

 

Additional Information

An ER has been created to check other partitions for the space required.