ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.11k stars 3.43k forks source link

Cleanup Job failed: Value must be an integer. #14169

Open andy812 opened 1 year ago

andy812 commented 1 year ago

Please confirm the following

Bug Summary

Cleanup Job does not work, the error is: 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)
psycopg2.errors.InvalidDatetimeFormat: invalid value "defa" for "YYYY"
DETAIL:  Value must be an integer.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/bin/awx-manage", line 8, in <module>
    sys.exit(manage())
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/__init__.py", line 200, in manage
    execute_from_command_line(sys.argv)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
    return self.cleanup(Job)
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/management/commands/cleanup_jobs.py", line 175, in cleanup
    skipped, deleted = delete_meta.delete()
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/management/commands/cleanup_jobs.py", line 140, in delete
    self.find_partitions_to_drop()
  File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/main/management/commands/cleanup_jobs.py", line 109, in find_partitions_to_drop
    cursor.execute(query)
  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)
django.db.utils.DataError: invalid value "defa" for "YYYY"
DETAIL:  Value must be an integer.

I've got AWX installed by awx-operator.

AWX version

22.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

  1. Run Cleanup Job
  2. Get error

Expected results

Cleanup Job executed successfully

Actual results

Cleanup Job failed

Additional information

No response

fosterseth commented 1 year ago

@andy812 can you provide the api endpoint for that manage job? i.e. api/v2/system_jobs/<systemjobid>

andy812 commented 1 year ago

@andy812 can you provide the api endpoint for that manage job? i.e. api/v2/system_jobs/<systemjobid>

изображение
fosterseth commented 1 year ago

@andy812 in your browser you should be able to navigate to https://awx-url/api/v2/system_jobs/282949

can you copy and paste the info from that api page?