Skip to content

Upgrade failed due to use of < for str and int #1738

@kurokobo

Description

@kurokobo

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

The conditionals that are introduced in #1486 is comparing string and int that causes task failure.

AWX Operator version

upstream devel

AWX version

23.9.0

Kubernetes platform

kubernetes

Kubernetes/Platform version

v1.28.6+k3s2

Modifications

no

Steps to reproduce

  1. Deploy minimal AWX CR with Operator 2.12.2
  2. Upgrade Operator to the latest devel image

Expected results

AWX is upgraded with PSQL15

Actual results

The first reconciliation loop is completed successfully, but the second loop is failed with following error (this is formatted log):

TASK [installer : Set path to PG_VERSION file for given container image] *******
task path: /opt/ansible/roles/installer/tasks/database_configuration.yml:159
fatal: [localhost]: FAILED! => {"msg": "
The conditional check '(_previous_upgraded_pg_version | default(false)) | ternary(_previous_upgraded_pg_version < supported_pg_version, true)' failed. The error was: Unexpected templating type error occurred on ({% if (_previous_upgraded_pg_version | default(false)) | ternary(_previous_upgraded_pg_version < supported_pg_version, true) %} True {% else %} False {% endif %}): '<' not supported between instances of 'AnsibleUnsafeText' and 'int'. '<' not supported between instances of 'AnsibleUnsafeText' and 'int'

The error appears to be in '/opt/ansible/roles/installer/tasks/database_configuration.yml': line 159, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  block:
    - name: Set path to PG_VERSION file for given container image
      ^ here
"}

PLAY RECAP *********************************************************************
localhost                  : ok=47   changed=0    unreachable=0    failed=1    skipped=23   rescued=0    ignored=0   

Additional information

@john-westcott-iv @rooftopcellist @TheRealHaoLiu @aknochow
F.Y.I.

Operator Logs

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions