Spectrum pre-flight failed with the following error: error 1 - 'spectrum_owner' is undefined
search cancel

Spectrum pre-flight failed with the following error: error 1 - 'spectrum_owner' is undefined

book

Article ID: 454685

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

I am attempting to use UA to upgrade my production environment from 24.3.13 to 25.4.10 and the spectrum pre-flight failed with the following error:

Failure (/tmp/netopsInstall.MTPHbWhKvr/spectrumAnsiblePreflightOutput.txt)
Task failed: The test plugin 'ansible.builtin.version' failed: Version comparison failed: '<' not supported between instances of 'int' and 'str'

When I look back through the output, I see this:

TASK [spectrum : Debug non_root_installation value] ****************************
Thursday 27 August 2026  01:08:47 +0000 (0:00:00.250)       0:05:32.085 ******* 
[WARNING]: Encountered 1 template error.
error 1 - 'spectrum_owner' is undefined
Origin: /opt/netops-deployment-tools-package-25.4.10-RELEASE/roles/spectrum/tasks/set-spectrum-path.yml:143:21

141             - (spectrum_group is undefined) or (spectrum_group is string and spectrum_group | length == 0)
142           block:
143             - name: Get the group name of the {{ spectrum_owner }}
                        ^ column 21

If I scroll up further in the log I can see it looks like it is looking at the wrong install directory for Spectrum:

TASK [spectrum : Read Spectrum installation owner from /opt/SPECTRUM/spectrum80.env file] ***
Thursday 27 August 2026  01:08:43 +0000 (0:00:00.482)       0:05:27.780 ******* 
skipping: [xxx.xxxx.xxxxx.xxxx]
skipping: [xxx.xxxx.xxxxx.xxx]

I can also confirm in the YAML for this task that it is looking at the wrong directory:

 - name: Read Spectrum installation owner from /opt/SPECTRUM/spectrum80.env file
          ansible.builtin.shell: grep SPECOWNER /opt/SPECTRUM/spectrum80.env | grep -v grep | awk -F'=' '{print $2}'

Environment

UA upgrade from 24.3.13 to 25.4.10 

Resolution

This issue is being addressed in DE211530

Additional Information

Workaround:

Step 1 — Reset the stale flag:

# On the orchestration host, edit /runtime-vars.yml:
# change:   preflight_spectrum_processed: true
# to:       preflight_spectrum_processed: false
# (or delete the line — the role defaults it to False when absent)


Step 2 — If the .history files end with a non standard version like a ptf or a debug version (ex: Spectrum_24.03.13.D312 installed on 10/26/2025 08:02:22.) then do the following steps

- cp /opt/CA/spectrum/Install-Tools/.history /opt/CA/spectrum/Install-Tools/.history.bak-$(date +%Y%m%d)
- echo "24.3.13.0.7 $(date +%m/%d/%Y\ %H:%M)" >> /opt/CA/spectrum/Install-Tools/.historyCopy


Fix path, change the "Get last installed version" task in remote-version-check.yml to filter for a strict version pattern instead of blindly taking the literal last line:

- name: Get last installed version
  ansible.builtin.shell: >
    set -o pipefail &&
    grep -E '^[0-9]+\.[0-9]+\.[0-9]+' {{ spectrum_installation_location }}/Install-Tools/.history |
    tail -1 | awk '{print $1}'
  register: last_installed_version
  changed_when: falseCopy


Step 3 — Re-run preflight now that the flag is reset and the underlying data is fixed:

./preflight-all-remote.sh --continue