Why is Ansible Tower not Working after Restoring a DB from Different Ansible Tower Instance?

Solution Verified - Updated -

Issue

After following the Ansible Tower backup and restore guide and doing a DB restore from a different Ansible Tower instance, I am not able to run any jobs or project/inventory updates on the current Ansible Tower instance. Following stack trace can be seen in the /var/log/tower/tower.logs

Traceback (most recent call last):
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/lib/python2.7/site-packages/awx/api/generics.py", line 246, in dispatch
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
    response = self.handle_exception(exc)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch
    response = handler(request, *args, **kwargs)
  File "/lib/python2.7/site-packages/awx/api/views.py", line 1299, in post
  File "/lib/python2.7/site-packages/awx/main/models/unified_jobs.py", line 309, in update
  File "/lib/python2.7/site-packages/awx/main/models/unified_jobs.py", line 360, in create_unified_job
  File "/lib/python2.7/site-packages/awx/main/models/unified_jobs.py", line 720, in save
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/polymorphic/models.py", line 72, in save
    return super(PolymorphicModel, self).save(*args, **kwargs)
  File "/lib/python2.7/site-packages/awx/main/models/base.py", line 219, in save
  File "/lib/python2.7/site-packages/awx/main/models/base.py", line 290, in save
  File "/lib/python2.7/site-packages/awx/main/models/base.py", line 185, in save
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/models/base.py", line 734, in save
    force_update=force_update, update_fields=update_fields)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/db/models/base.py", line 771, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 189, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/lib/python2.7/site-packages/awx/main/models/ha.py", line 142, in on_job_create
  File "/lib/python2.7/site-packages/awx/main/managers.py", line 84, in me
RuntimeError: No instance found with the current cluster host id

Environment

  • Ansible Tower >= 3.1.x - 3.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In