Removing recurring logic fails with katello_sync_plans.recurring_logic_id does not exist on Red Hat Satellite 6.5.
Environment
- Red Hat Satellite 6.5
Issue
-
Not able to delete recurring logics on Red Hat Satellite 6.5:
[root@satellite6.5 ~]# foreman-rake console Loading production environment (Rails 5.2.1) irb(main):001:0> ForemanTasks::RecurringLogic.where(state: "cancelled").destroy_all Traceback (most recent call last): 2: from lib/tasks/console.rake:5:in `block in <top (required)>' 1: from (irb):1 ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column katello_sync_plans.recurring_logic_id does not exist) LINE 1: ...llo_sync_plans".* FROM "katello_sync_plans" WHERE "katello_s... ^ : SELECT "katello_sync_plans".* FROM "katello_sync_plans" WHERE "katello_sync_plans"."recurring_logic_id" = $1 LIMIT $2 irb(main):002:0>
Resolution
-
This is a known behavior which is filed in Bug.
-
To apply the patch on Red Hat Satellite 6.5, please first take a snapshot of the machine.
-
Go to the following location:
[root@satellite6.5 ~]# cd /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.10.0.48 (Depending on the version of Red Hat Satellite 6.5.0/6.5.1 the katello version might change)
-
Download the patch
recurring_logic.txt
attached with this article to the path mentioned above. -
Initialize git so that it is easy to revert any changes:
[root@satellite6.5 ~]# git init .; git add .; git commit -m "Original State"
-
Apply the patch:
[root@satellite6.5 ~]# patch -p1 < recurring_logic.txt
-
Restart services:
[root@satellite6.5 ~]# foreman-maintain service restart
-
Try deleting the recurring logics:
[root@satellite6.5 ~]# foreman-rake console >ForemanTasks::RecurringLogic.where(state: "cancelled").destroy_all
For more KB articles/solutions related to Red Hat Satellite 6.x Satellite Tasking System Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Satellite Tasking System Issues
Attachments
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments