Why is tower-manage inventory_import failing with an IntegrityError when run from Ansible Tower?

Solution In Progress - Updated -

Issue

When attempting to update the Ansible Tower inventory using tower-manage inventory_import from a playbook in Tower, you may get output similar to the following:

IntegrityError: update or delete on table \\"main_host\\" violates foreign key constraint \\"main_jobevent_host_id_76cda52c42702dfc_fk_main_host_id\\" on table \\"main_jobevent\\"", "DETAIL:  Key (id)=(1778) is still referenced from table \\"main_jobevent\\"."], "stdout": "", "stdout_lines": []}
  • NOTE: the tower-manage utility was once called awx-manage, then changed to tower-manage and is now called awx-manage again. These terms should be considered synonymous on this page

Environment

  • Red Hat Ansible Tower
    • 3.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content