-
Notifications
You must be signed in to change notification settings - Fork 594
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
Waiting for postgres pod even though external postgres is defined #213
Comments
@daenney If you look at the code the task " Get the postgres pod information" is part of the https://github.com/ansible/awx-operator/blob/devel/roles/installer/tasks/migrate_data.yml#L11 which will be imported when these conditions met: - name: Migrate data from old Openshift instance
import_tasks: migrate_data.yml
when:
- old_pg_config['resources'] is defined
- old_pg_config['resources'] | length
- this_awx['resources'][0]['status']['towerMigratedFromSecret'] is not defined So are you trying to upgrade from a locally managed If that is the case, it could be your local managed PostgreSQL pod does not the expected labels and since the reconciliation task runs after the |
No, there isn't a locally managed postgres. It's remote in both cases (RDS). It wasn't clear to me it could only upgrade from a locally managed instance. |
The old instance predates 18.x release, and the migration docs suggested to me this is what we should do. Based on https://github.com/ansible/awx-operator/blob/devel/docs/migration.md there was nothing in there indicating to me it couldn't upgrade from an old, remote, database. |
@daenney I see your point. Having this configuration will enable you to move the database from one place to another (see more at https://github.com/ansible/awx-operator/blob/devel/roles/installer/tasks/database_configuration.yml#L90-L95 and https://github.com/ansible/awx-operator/blob/devel/roles/installer/tasks/migrate_data.yml#L59-L70) So in your case, remove from your Let us know if that works and I agree, the documentation requires a little bit of refinement to make it clear. If you want to send a PR, it is welcome! |
Thanks for the explanation. I tried pointing it at an existing external database and everything worked perfectly. I'll send a PR tomorrow with some doc updates! |
@tchellomello and @daenney, From the awx-operator (0.8.0) logs "msg": "The conditional check 'postgres_pod['resources'][0]['status']['phase'] == 'Running'' failed. The error was: error while evaluating conditional (postgres_pod['resources'][0]['status']['phase'] == 'Running'): list object has no element 0" I removed the line "tower_old_postgres_configuration_secret" from my-awx.yml as suggested and that worked for me. grtz, |
Operator logs the following:
Given the postgres connection secrets are defined and passed in, why is the operator seemingly waiting (and thus erroring) on a postgres pod being available?
The text was updated successfully, but these errors were encountered: