find the file:
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.0.0/lib/katello/tasks/clean_backend_objects.rake
###1. on line 13 change:
system.facts to
diff --git a/app/views/katello/api/v2/systems/show.json.rabl b/app/views/katello/api/v2/systems/show.json.rabl | |
index 8f2710d..1646caf 100644 | |
--- a/app/views/katello/api/v2/systems/show.json.rabl | |
+++ b/app/views/katello/api/v2/systems/show.json.rabl | |
@@ -63,7 +63,7 @@ end | |
# Requires another API call to fetch from Candlepin | |
if params[:fields] == "full" | |
- attributes :type | |
+ attributes :system_type => :type |
#!/usr/bin/ruby | |
if File.exists?("/etc/facts.d") | |
entries = Dir.entries("/etc/facts.d/") | |
name_map = {} | |
entries.each do |entry| | |
if File.file?("/etc/facts.d/#{entry}") | |
ext = entry.split('.')[1] |
#!/usr/bin/env python | |
import sys | |
import os | |
from hashlib import sha256 | |
ARCHIVE_SUFFIX = '.tar.gz' | |
def digest(path): | |
h = sha256() |
def Print print | |
return print.size | |
end | |
def _Print print | |
return print.chr | |
end | |
def _print *print | |
return Print([print]) << Print(print) |
yum install pulp-admin-client pulp-rpm-admin-extensions | |
# edit /etc/pulp/admin/admin.conf and change: | |
host = localhost.localdomain | |
# to | |
host = myhost.domain.com | |
# and change |
find the file:
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.0.0/lib/katello/tasks/clean_backend_objects.rake
###1. on line 13 change:
system.facts to
# Drop this file in /usr/share/foreman/lib/tasks | |
# and then run "foreman-rake export_tasks" | |
# To export all tasks "foreman-rake export_tasks tasks=all" | |
desc 'Export Dynflow Tasks' | |
task :export_tasks => :environment do | |
class TaskRender | |
def initialize | |
@cache = {} |
diff --git a/app/models/host/managed.rb b/app/models/host/managed.rb | |
index b2a718b..117c306 100644 | |
--- a/app/models/host/managed.rb | |
+++ b/app/models/host/managed.rb | |
@@ -121,7 +121,7 @@ class Host::Managed < Host::Base | |
scope :for_vm, lambda { |cr,vm| where(:compute_resource_id => cr.id, :uuid => Array.wrap(vm).compact.map(&:ide | |
# audit the changes to this model | |
- audited :except => [:last_report, :puppet_status, :last_compile], :allow_mass_assignment => true | |
+ audited :except => [:last_report, :puppet_status, :last_compile, :primary_interface], :allow_mass_assignment = |
It is recommend you have a backup before proceeding with these steps. There is no need to shut down any part of the application while performing these steps.
Ensure that the repositories being deleted are not published in any content views. If there are any, please delete the Content View Versions including the affected repos.
For each repository, find its id. This should be located by going to the Content > Products page, clicking on the product the repository is in, and then repository name itself. Notice the URL in the browser, it will look something like:
https://abed.example.com/products/91/repositories/29
Go into the rails console:
# foreman-rake console
Then run the following:
Katello::Distribution.search{ filter :terms, :repoids => Katello::ContentView.find(5).repositories_to_publish.pluck(:pulp_id); size 100 }.as_json