Foreman Issue with Upgrading Packages

Problem:
After setting up a foreman server recently I went to upgrade some CentOS 7 VMs and ran into an issue with this package
[u’ERROR with transaction check vs depsolve:’, ‘qpid-proton-c(x86-64) = 0.34.0-1.el7 is needed by (installed) python2-qpid-proton-0.34.0-1.el7.x86_64’]
After that occurred I continued patching the other VMs while skipping this package. The issue is I now have two VMs that I cant patch anymore as the first task is holding a lock
“Required lock is already taken by other running tasks.
Please inspect their state, fix their errors and resume them.”

I have tried force canceling the original task, rebooting the foreman server and target VM, I have ran
foreman-rake foreman_tasks:cleanup
I have also deleted the stuck tasks from the psql database
select from foreman_tasks_tasks where id in(select id from foreman_tasks_tasks where state = ‘stopped’ and result = ‘error’); and also just targeting one specific task
select from foreman_tasks_tasks where id in(select id from foreman_tasks_tasks where state = ‘stopped’ and result = ‘error’ and id =‘30acee50-b4de-47ff-9cdb-44e1dd25bf87’);
After the psql deletes it seemed to get into an even worse state with a no route matches error. What is the best way to get past this issue?
Expected outcome:

Foreman and Proxy versions:
2.4.1
Foreman and Proxy plugin versions:
Katello 4.0.1-1
Distribution and version:
CentOS 7.9.2009
Other relevant data:

Ended up figuring it out, had to delete the entire contents of a couple of tables

delete from foreman_tasks_tasks;
delete from foreman_tasks_locks;

1 Like