Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always check and wait for a restore pg_restore to finish #1652

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion roles/installer/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@
- ingress_type | lower == 'route'
- route_tls_secret != ''

- name: Wait for {{ deployment_type }}restore to complete
kubernetes.core.k8s_info:
api_version: "{{ api_version }}"
kind: "{{ deployment_type }}restore"
namespace: "{{ ansible_operator_meta.namespace }}"
register: restore_status_check
until:
# yamllint disable-line rule:line-length
- (restore_status_check.resources | length == 0) or (restore_status_check.resources | selectattr('spec.deployment_name', 'equalto', ansible_operator_meta.name) | map(attribute='status') | selectattr('restoreComplete', 'defined') | map(attribute='restoreComplete') | list | length > 0)

Check warning on line 88 in roles/installer/tasks/install.yml

View workflow job for this annotation

GitHub Actions / molecule (--skip-tags=replicas)

88:5 [indentation] wrong indentation: expected 2 but found 4

Check warning on line 88 in roles/installer/tasks/install.yml

View workflow job for this annotation

GitHub Actions / molecule (-t replicas)

88:5 [indentation] wrong indentation: expected 2 but found 4
delay: 10
retries: 8640
rooftopcellist marked this conversation as resolved.
Show resolved Hide resolved
ignore_errors: yes
changed_when: false

- name: Include resources configuration tasks
include_tasks: resources_configuration.yml

Expand All @@ -91,7 +105,7 @@
when: awx_task_pod_name != ''
register: database_check

- name: Migrate the database if the K8s resources were updated. # noqa 305
- name: Migrate the database if the K8s resources were updated # noqa 305
k8s_exec:
namespace: "{{ ansible_operator_meta.namespace }}"
pod: "{{ awx_task_pod_name }}"
Expand Down
Loading