Go into the console:
# foreman-rake console
and then run:
User.current = User.first
key = Katello::ActivationKey.find(99999)
if $operatingsystemrelease =~ /^6.*/ { | |
Puppet::Type.type(:service).provide :service_wait, :parent => :redhat do | |
desc "Manages services using `service-wait` command." | |
commands :service => File.expand_path("../../../../../bin/service-wait", __FILE__) | |
defaultfor :osfamily => [:redhat] | |
def self.specificity | |
super + 10000 |
Go into the console:
# foreman-rake console
and then run:
User.current = User.first
key = Katello::ActivationKey.find(99999)
Destroy
ForemanTasks::Task.where(:state => :paused).where(:label => "Actions::Katello::Repository::Sync").destroy_all
Force stop:
ForemanTasks::Task.where(:state => 'paused').all.each{|t| t.update_attributes!(:state => 'stopped') }
# foreman-rake console
> User.current = User.anonymous_admin
> Katello.pulp_server.resources.repository.retrieve_all.map{|i| i['id']} - Katello::Repository.pluck(:pulp_id) - Katello::ContentViewPuppetEnvironment.pluck(:pulp_id)
> (Katello.pulp_server.resources.repository.retrieve_all.map{|i| i['id']} - Katello::Repository.pluck(:pulp_id) - Katello::ContentViewPuppetEnvironment.pluck(:pulp_id)).each{|pulp_id| Katello.pulp_server.resources.repository.delete(pulp_id)}
To remove the finished pulp tasks:
# mongo
> use pulp_database
> db.task_status.remove({state:"finished"})
> quit()
1.9.3-p448 :004 > ForemanTasks::Task.find('a326a604-e63b-4ff0-8634-e890c406963b')
ForemanTasks::Task Load (0.3ms) SELECT "foreman_tasks_tasks".* FROM "foreman_tasks_tasks" WHERE "foreman_tasks_tasks"."id" = $1 LIMIT 1 [["id", "a326a604-e63b-4ff0-8634-e890c406963b"]]
+-------------------+--------------------+-------------------+-------------------+----------+---------+---------+-------------------+----------------+
| id | type | label | started_at | ended_at | state | result | external_id | parent_task_id |
+-------------------+--------------------+-------------------+-------------------+----------+---------+---------+-------------------+----------------+
| a326a604-e63b-... | ForemanTasks::T... | Actions::Katel... | 2015-02-16 21:... | | planned | pending | 5e72e68b-0e49-... | |
+-------------------+--------------------+-------------------+-------------------+----------+---------+---------+-------------------+------------
POST /foreman_tasks/api/tasks/bulk_search
{
"searches" : [
{
"type": "all",
"resource_type": "Organization",
"resource_id": 1,
workaround for: https://bugzilla.redhat.com/show_bug.cgi?id=1175616
open this file:
/usr/lib/pulp/plugins/types/rpm_support.json
And remove the 'title' search index from the erratum type:
I hereby claim:
To claim this, I am signing this object:
Shut down foreman-tasks:
service foreman-tasks stop
Open the rails console:
foreman-rake console