Open tobias-oe opened 3 years ago
If are hardcoding the public
schema name anywhere in the AWX code, we should stop that.
This bug has caused us a lot of troubles with external database running out of space frequently. Is anybody working on a fix?
Also I wonder if there is better workaround in awx-operator driven K8s deployment than running manual Job and UnifiedJob object deletions through awx-manage?
We do it following the steps: https://tobschall.de/2019/05/07/ansible-tower-cleanup/. It's very slow for the amount of jobs we are cleaning. I thought about manually patching the cleanup_jobs.py
in our container, that's not possible though due to restricted permissions.
So workaround seems to be renaming the database schema to "public" after dropping the existing public schema.
postgres=# \c awxtest;
awxtest=# DROP SCHEMA public CASCADE;
awxtest=# ALTER SCHEMA awxuser RENAME TO public;
Hi @shanemcd, I believe this bug has been present since moving up from 18.0, any deployment using an external db that is not in the public schema will have this issue. All the other jobs are perfectly handled i suppose could we get the hardcoded schema adapted and a new build released.. Just upgraded to 19.5.1 and it is still there.. Thanks
Any progress on this? Would definitely be helpful for us as well.
Please confirm the following
Summary
When you use an external postgres database for AWX and don't use the default schema "public", then the cleanup job "Cleanup Job Schedule" fails, because there is a fixed call for the table "public.main_jobevent". This table cannot exist, if you use another schema e.g. "awx".
Please honor the environment variables passed by deployment scripts, so you don't run in errors if using not the default schema name.
AWX version
19.2.2
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
No response
Steps to reproduce
You need an installation of AWX configured with an external postgres DB using a schema not named "public".
Expected results
The cleanup job finishes successfully.
Actual results
The cleanup job fails with the following exception:
Additional information
No response