Hide Forgot
Description of problem: After 6.2 upgrade the dashboard no longer loads and errors with "undefined method `label' for nil:NilClass". We think this happens if the user has deleted a bunch of old stopped tasks before. The newer dynflows provide this functionality via a rake task, but we need to handle it if a user has removed them before. Version-Release number of selected component (if applicable): 6.2 How reproducible: not sure Steps to Reproduce: 1. install 6.1 2. sync something so you create some tasks 3. delete some of the tasks using the console. 4. upgrade to 6.2 5. dashboard wont load Actual results: dashboard wont load Expected results: dashboard to display correctly Additional info:
You can delete a tasks using, maybe replacing the label. # foreman-rake console ForemanTasks::Task.where(:state => :stopped).where(:label => "Actions::Katello::Repository::Sync").destroy_all
Upstream bug assigned to jsherril@redhat.com
OK hitting this myself and raised a dupe BZ#1364768 as my search-foo was not great. Now how to resolve it ?
*** Bug 1364768 has been marked as a duplicate of this bug. ***
I managed to fix this (or workaround it at least) by applying this:- https://github.com/Katello/katello/pull/6028 Cleared sessions & katello-service restart
I've same error, and decided updating file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/models/katello/content_view_history.rb line ~45 -def humanized_action - case self.task.label - when "Actions::Katello::ContentViewVersion::Export" - _("Exported version") - when "Actions::Katello::ContentView::Publish" - _("Published new version") - when "Actions::Katello::ContentView::Promote" - _("Promoted to %{environment}") % { :environment => self.environment.name } - when "Actions::Katello::ContentView::Remove" - _("Deleted from %{environment}") % { :environment => self.environment.name } - end -end +def humanized_action + case self.task.try(:label) + when "Actions::Katello::ContentViewVersion::Export" + _("Exported version") + when "Actions::Katello::ContentView::Publish" + _("Published new version") + when "Actions::Katello::ContentView::Promote" + _("Promoted to %{environment}") % { :environment => self.environment.try(:name) || _('Unknown') } + when "Actions::Katello::ContentView::Remove" + _("Deleted from %{environment}") % { :environment => self.environment.try(:name) || _('Unknown')} + else + _("Unknown Action") + end +end Clear all tasks in DynFlow, database and pulp. Restart all services.
*** This bug has been marked as a duplicate of bug 1361793 ***