Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Last active November 8, 2017 14:42
Show Gist options
  • Save jlsherrill/ccc237f58bdfe9e3e3e619226f88bd27 to your computer and use it in GitHub Desktop.
Save jlsherrill/ccc237f58bdfe9e3e3e619226f88bd27 to your computer and use it in GitHub Desktop.
debugging errata issues

Run all of these in 'foreman-rake console'

Check the event queue:

Katello::Event.count

Check 'bound repositories' known to katello

Host.find_by(:name => "dev.example.com").content_facet.bound_repositories.pluck(:name)

Check installed package profile known to katello:

Host.find_by(:name => "dev.example.com").installed_packages.count

Check 'bound repositories' known to pulp:

Katello::Pulp::Consumer.new(Host.find_by(:name => "dev.example.com").content_facet.uuid).bound_yum_repositories.count

Check errata ids known to pulp:

Katello::Pulp::Consumer.new(Host.find_by(:name => "dev.example.com").content_facet.uuid).applicable_errata_ids.count

Check errata ids known to katello:

Host.find_by(:name => "dev.example.com").content_facet.applicable_erratum_ids
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment