Actions::Katello::Host::Update sometimes fails on required lock taken

Problem:
Hi everyone,

we have the Actions::Katello::Host::Update Tasks semi regularly failing for a lot of our managed systems.
The full error output is:

Required lock is already taken by other running tasks.
Please inspect their state, fix their errors and resume them.

Required lock: update
Conflicts with tasks:
- https://foreman.example.com/foreman_tasks/tasks/2f46ae4c-7b2f-41eb-9fa3-4ce895ab781f

After a lot of digging, we found that this is seemingly caused by rhsmcertd triggering the certCheckInterval and autoAttachInterval actions concurrently (which, by nature, happens every so often).

Is there a way to get around this issue? We found the Foreman Setting “Concurrent Actions::Katello::Host::Update allowed”, that we suspect to fix the issue. But since this is turned off by default and our Problem should happen to most users running rhsncertd, I want to check back if this is the correct setting to set.
If so, why is it set to false by default?

Expected outcome:
Host Update Tasks stop failing

Foreman and Proxy versions:
1.22

Foreman and Proxy plugin versions:
Katello 3.12.3
foreman-hooks 0.3.15
foreman-scc-manager 1.6.3
Distribution and version:

Other relevant data:
I could not find anything relating to the failed tasks in production.log

Hi @areyus,

The “Concurrent Actions::Katello::Host::Update allowed” should fix your issue, that is the correct setting to set to true.

Looking at the history, you have to opt-in to this setting because it was unclear at the time if it would cause issues elsewhere. However, since Katello 3.15, we’ve moved the offending actions outside of our task system. This acts similarly to the setting above and it hasn’t caused issues, so the setting should be safe.

2 Likes

Hi @iballou,

thank you for the quick reply!
We applied the setting this morning and have not experienced another occurence of failing tasks since.
If we experience any issues with it, I will report back. Until then, I would consider this issue resolved :slight_smile:

Even more reasons to look foreward to 3.15! :slight_smile:

Regards

1 Like

Was experiencing the same behavior. Fix-action from @iballou works perfectly. Thank you @iballou!

1 Like