AWX restore failing on 24.6.1 - cannot drop index

**AWX restore failing with ERROR: cannot drop index **
Hello,

I’m running AWX 24.6.1 on the 2.19.1 operator. I have a primary and secondary AWX instance I do a daily awxbackup and awxrestore to.

This process has been working well until I upgraded yesterday from AWX operator 2.10.0 to 2.19.1. Since then, the awxrestore has been cycling endlessly with a postgresql error on the secondary about it being unable to drop a lot of indices:

awx-manager fatal: [localhost]: FAILED! => {"changed": true, "rc": 1, "return_code": 1, "stderr": "pg_restore: error: could not execute query: ERROR:  cannot drop index public.main_systemjobevent_20240813_system_job_id_job_created_uu_idx10 because index public.main_system_system__e39825_idx requires it\nHINT:  You can drop index public.main_system_system__e39825_idx instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_system_job_id_job_created_uu_idx10;\npg_restore: error: could not execute query: ERROR:  cannot drop index public.main_systemjobevent_20240813_system_job_id_job_created_co_idx10 because index public.main_system_system__73537a_idx requires it\nHINT:  You can drop index public.main_system_system__73537a_idx instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_sy
[...]
 ERROR:  cannot drop index public.main_systemjobevent_20240813_14_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT:  You can drop index public.main_systemjobevent_modified_e4b3f14a instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_14_modified_idx;\npg_restore: error: could not execute query: ERROR:  cannot drop index public.main_systemjobevent_20240813_13_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT:  You can drop index public.main_systemjobevent_modified_e4b3f14a instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_13_modified_idx;\npg_restore: error: could not execute query: ERROR:  cannot drop index public.main_systemjobevent_20240813_12_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT:  You can drop index public.main_systemjobevent_modified_e4b3f14a instead.\nCommand was: DROP INDEX IF EXISTS public.main_systemjobevent_20240813_12_modified_idx;\npg_restore: error: could not execute query: ERROR:  cannot drop index public.main_systemjobevent_20240813_04_modified_idx because index public.main_systemjobevent_modified_e4b3f14a requires it\nHINT:  You can drop index publawx-manager
awx-manager -------------------------------------------------------------------------------

I’ve tried to blow away this secondary AWX instance entirely (including the managed postgresql) and kick off the restore again to no difference. I deleted the AWX object in k8s, deleted the PVC, etc, and the restore still ends up this way. I also tried enabling force_drop_db: true but that yields a different set of permission denials, unable to drop the DB. Manually corrected the awx user’s permissions in postgresql.

Any help is appreciated, I’m not sure what to do after blowing away the pvc and it still having these issues.

Nevermind, I fixed it. Sorry to keep opening these and fixing them on my own. I’m not totally sure what made it work but I did another backup and restore without the pg_dump_suffix and it seemed to work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.