-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Error on create_partition #14563
Comments
Are the jobs running to completion still or erroring out? can you kubectl exec into task pod (task container) and run then you can run just to verify that this table exists in the database a new partition is created for each hour of the day (in your example, 14th hour) if you wait an hour or two, do you get the same error, but with a different table (e.g. main_jobevent_20231011_15)? overall, is this error coming up each time you run a job or just periodically? Also you can query |
I have a scheduled task that runs every 2 minutes. |
so maybe this is just a miss in this criteria Lines 1181 to 1182 in 447ac77
My questions are (1) does this really happen every hour when creating a new partition and (2) can we get more context around these logs? We often have Or, it could be that |
Are you running on a non-English system? Workaround Full Fix |
@gundalow I've the exact opposite, everything was working fine, but since
Do you think workaround still relevant with full fix? PS: I'm still on PG12. I'll try to upgrade to PG15 to see Update Even with Psql15 + env variable It seems that only affect Workflow template not normal template |
We should use this as motivation to convert our tests to run with a postgres database. There are many things we could do to test that sort of error with a postgres test database. |
I don't know if it can help or not, but here my latest update:
However on 4. I saw the same error on log
but does not affect runtime and all my workflow jobs correctly started *: I was on |
Got a workflow with 2 parallel tasks, one started fine the other errored out with
Have not seen this before version 24.0.0 |
Same here, exactly the same issue since the upgrade to 24.0.0. The issue is consistently with a workflow with two parallel tasks. |
+1 after 24.0.0 upgrade, parallel inventory sync failing with duplicate key |
Should me create a separate issue? |
I think changing the subject will be sufficient? |
same issue after 24.0.0 |
Having this issue after upgrading to 24.0.0. |
Possible fix in 24.1.0 - #15000 |
Seems like fixed in 24.1.0 |
Closing, please reopen if difficulty persists. Thanks all |
Please confirm the following
security@ansible.com
instead.)Bug Summary
Hello everyone,
Since updating AWX to 23.3.0, I have this error each time a partition is created on the main_jobevent table:
`Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 87, in _execute
return self.cursor.execute(sql)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/psycopg/cursor.py", line 723, in execute
raise ex.with_traceback(None)
psycopg.errors.UniqueViolation: Duplicate key value violates unique constraint “pg_type_typname_nsp_index”
DETAIL: Key “(typname, typnamespace)=(main_jobevent_20231011_14, 2200)” already exists.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 491, in run
self.pre_run_hook(self.instance, private_data_dir)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 1058, in pre_run_hook
super(RunJob, self).pre_run_hook(job, private_data_dir)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/tasks/jobs.py", line 425, in pre_run_hook
create_partition(instance.event_class._meta.db_table, start=instance.created)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/utils/common.py", line 1175, in create_partition
cursor.execute(
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 87, in _execute
return self.cursor.execute(sql)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/psycopg/cursor.py", line 723, in execute
raise ex.with_traceback(None)
django.db.utils.IntegrityError: Duplicate key value violates unique constraint 'pg_type_typname_nsp_index'
DETAIL: Key “(typname, typnamespace)=(main_jobevent_20231011_14, 2200)” already exists. `
AWX version
23.3.0
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
No response
Steps to reproduce
Each hour an automated task failed.
Expected results
I wish there would no longer be this error when a partition is created on the main_jobevent table.
Actual results
The task failed with this error.
Additional information
No response
The text was updated successfully, but these errors were encountered: