Skip to content

Commit

Permalink
Handle scenario where upgrade status is not defined & correct pg tag
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Aug 8, 2023
1 parent 8609cd0 commit 94cb1e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion roles/backup/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
deployment_type: "awx"
_postgres_image: quay.io/sclorg/postgresql-15-c9s
_postgres_image_version: 15
_postgres_image_version: latest
backup_complete: false
database_type: "unmanaged"
supported_pg_version: 15
Expand Down
2 changes: 1 addition & 1 deletion roles/installer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ _image_version: "{{ lookup('env', 'DEFAULT_AWX_VERSION') or 'latest' }}"
_redis_image: docker.io/redis
_redis_image_version: 7
_postgres_image: quay.io/sclorg/postgresql-15-c9s
_postgres_image_version: 15
_postgres_image_version: latest
image_pull_policy: IfNotPresent
image_pull_secrets: []

Expand Down
3 changes: 2 additions & 1 deletion roles/installer/tasks/database_configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@
- _old_pg_version.stdout | default('0') | trim < supported_pg_version
when:
- managed_database
- this_awx['resources'][0]['status']['upgradedPostgresVersion'] | default('none') < supported_pg_version
- "'upgradedPostgresVersion' is in this_awx['resources'][0]['status']"
- (this_awx['resources'][0]['status']['upgradedPostgresVersion'] | default(false)) | ternary (this_awx['resources'][0]['status']['upgradedPostgresVersion'] < supported_pg_version, false)
- old_postgres_pod['resources'] | length # upgrade is complete and old pg pod has been removed

- block:
Expand Down
2 changes: 1 addition & 1 deletion roles/restore/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

deployment_type: "awx"
_postgres_image: quay.io/sclorg/postgresql-15-c9s
_postgres_image_version: 15
_postgres_image_version: latest

backup_api_version: '{{ deployment_type }}.ansible.com/v1beta1'
backup_kind: 'AWXBackup'
Expand Down

0 comments on commit 94cb1e1

Please sign in to comment.