I encountered the issue that when provisioning hosts, they are missing most of their repositories.
Checking the logs and Content Host itself didn't help any further since everything seemed to be in order.
For reference, I'm running these packages:
[root@katello01 ~]# rpm -qa | grep -iE '^pulp|^candlepin|^foreman|^katello' | grep -viE 'archyslife'
foreman-cli-3.3.0-1.el7.noarch
katello-selinux-4.0.2-1.el7.noarch
katello-debug-4.5.0-1.el7.noarch
pulp-client-1.0-1.noarch
pulpcore-selinux-1.3.2-1.el7.x86_64
foreman-postgresql-3.3.0-1.el7.noarch
foreman-installer-katello-3.3.0-1.el7.noarch
foreman-dynflow-sidekiq-3.3.0-1.el7.noarch
katello-client-bootstrap-1.7.9-1.el7.noarch
katello-server-ca-1.0-1.noarch
foreman-release-3.3.0-1.el7.noarch
candlepin-4.1.11-1.el7.noarch
candlepin-selinux-4.1.11-1.el7.noarch
foreman-installer-3.3.0-1.el7.noarch
foreman-3.3.0-1.el7.noarch
katello-certs-tools-2.9.0-1.el7.noarch
katello-4.5.0-1.el7.noarch
katello-common-4.5.0-1.el7.noarch
foreman-libvirt-3.3.0-1.el7.noarch
katello-repos-4.5.0-1.el7.noarch
foreman-debug-3.3.0-1.el7.noarch
foreman-proxy-3.3.0-1.el7.noarch
foreman-service-3.3.0-1.el7.noarch
foreman-selinux-3.3.0-1.el7.noarch
katello-default-ca-1.0-1.noarch
After digging through the foreman community forum, I've found this solution involving the rake console:
[root@katello01 ~]# foreman-rake console
Now, search and fix each repository that seems to be affected:
irb(main):005:0> Katello::RootRepository.find_by_name "epel-modular-8"
=> #<Katello::RootRepository id: 26, name: "epel-modular-8", created_at: "2022-03-04 17:31:41", updated_at: "2022-08-07 09:46:01", major: nil, minor: nil, gpg_key_id: nil, content_id: "1646415103927", arch: "noarch", label: "epel-modular-8", url: "https://ftp.linux.cz/pub/linux/fedora/epel/8/Modular/x86_64/", unprotected: true, content_type: "yum", product_id: 1, checksum_type: nil, pulp_scratchpad_checksum_type: nil, docker_upstream_name: nil, download_policy: "immediate", verify_ssl_on_sync: true, upstream_username: nil, upstream_password: nil, deb_releases: nil, deb_components: nil, deb_architectures: nil, ssl_ca_cert_id: nil, ssl_client_cert_id: nil, ssl_client_key_id: nil, ignorable_content: [], include_tags: nil, description: nil, ansible_collection_requirements: nil, http_proxy_policy: "global_default_http_proxy", http_proxy_id: nil, download_concurrency: nil, os_versions: [], ansible_collection_auth_url: nil, ansible_collection_auth_token: nil, retain_package_versions_count: nil, generic_remote_options: nil, upstream_authentication_token: nil, mirroring_policy: "additive", exclude_tags: nil>
irb(main):006:0> root = Katello::RootRepository.find(26);
irb(main):009:0> ForemanTasks.async_task(::Actions::Candlepin::Product::ContentAdd, owner: root.product.organization.label, product_id: root.product.cp_id, content_id: root.content_id)
Newly provisioned hosts should have access to all repositories they're supposed to be subscribed to.
On hosts that currently show issues, refresh the subscriptions using 'subscription-manager':
[root@client ~]# subscription-manager refresh
Sources referenced:
Feel free to comment and / or suggest a topic.
Comments
Post a Comment