[DEBUG] Red Hat Satellite resolve remove repository error ‘Unable to find content with the ID XXX’

Error Code:

Katello::Errors::CandlepinError: Unable to find content with the ID XXX

Solution One: Add Relevant Licenses

Solution One Step One: Make sure which repository is marked as Orphaned

Access Satellite Web –> Content –> Sync Status –> Find the Orphaned repository

Solution One Step Two: Add Relevant Licenses

(Brief steps)

Solution Two: Remove Orphaned Repositories

Solution Two Step One: Make sure which repository is marked as Orphaned

Access Satellite Web –> Content –> Sync Status –> Find the Orphaned repository

Solution Two Step Two: Remove Orphaned Repositories

Access Satellite Web –> Content –> Red Hat Repositories –> Remove Orphaned Repositories

Solution Two Step Three: Resume Removing Orphaned Repositories Task Status (If Removing Orphaned Repositories Task is Stuck)

3.1 Access the concerned task

Access Satellite Web –> Monitor –> Tasks –> Search for the concerned task

3.2 Check both the Run and Finalize tabs for the sub-task

Click on the DynFlow Console button and check both the Run and Finalize tabs for the sub-task

3.3 Skip the ERROR sub-task

(Brief steps)

(Add: usually it’s the Actions::Candlepin::Environment::SetContent one )

3.4 Resume Removing Orphaned Repositories Task Status

(Brief steps)

Reference:

https://access.redhat.com/solutions/6654081

[步骤] Red Hat Satellite 必须软件包版本的查看

正文:

Red Hat Satellite 通常使用指定版本的软件。所以在安装或升级 Red Hat Satellite 时,我们需要设置 Red Hat Satellite 的模块流,在设置模块流以后,相应的软件就被锁定制在对应版本无法升级了。

我们可以通过查看 Red Hat Satellite 的模块流,确认有哪些软件被锁定在了哪些版本里

步骤一:

# dnf module enable satellite

或者:

# dnf module enable satellite:el8
......
Requires         : pki-core:[]
                 : platform:[el8]
                 : postgresql:[12]
                 : ruby:[2.7]

(补充:这里设置 el8 版本的 Red Hat Satellite 模块流为例)

步骤二:

# dnf module info

或者:

# dnf module info satellite:el8
......
Requires         : pki-core:[]
                 : platform:[el8]
                 : postgresql:[12]
                 : ruby:[2.7]

(补充:这里查看 el8 版本的 Red Hat Satellite 模块流为例)

参考文献:

https://docs.redhat.com/en/documentation/red_hat_satellite/6.15/html/installing_satellite_server_in_a_connected_network_environment/installing_server_connected_satellite#configuring-repositories_satellite

[步骤] SLES 软件库的启用和禁用

注意:

在启用或禁用 SLES 的软件库前,要先注册此 SLES

正文:

步骤一:显示所有可用软件库

# SUSEConnect --list-extensions

步骤二:启用软件库

# SUSEConnect -p sle-module-live-patching/15.3/x86_64

(补充:这里以启用 sle-module-live-patching/15.3/x86_64 软件库为例)

步骤三:禁用软件库

# SUSEConnect -d -p sle-module-basesystem/15.3/x86_64

(补充:这里以禁用用 sle-module-live-patching/15.3/x86_64 软件库为例)

[步骤] RHEL 系统的注册 (注册到 Red Hat 官网)

正文:

步骤一:清除旧有的注册信息

1.1 清除所有的旧有注册信息

# subscription-manager remove --all

1.2 取消注册

# subscription-manager unregister

1.3 清楚所有的就有数据

# subscription-manager clean

1.4 确保所有 satellite 客户端安装包已经删除

# yum remove katello-ca-consumer-*

步骤二:确保 RHEL 系统的注册网站指向 Red Hat 官网

# vim /etc/rhsm/rhsm.conf

确保部分内容如下:

......
hostname = subscription.rhsm.redhat.com
......
baseurl = https://cdn.redhat.com
......

步骤三:注册 RHEL 系统到 Red Hat 官网

3.1 非交互式

# subscription-manager register --username <username> --password <password> --auto-attach

(注意:如果完成了本文的 2.1 就不用再执行 本文的 2.2 了)

3.2 交互式注册 RHEL 系统到 Red Hat 官网

3.2.1 交互式注册 RHEL 系统到 Red Hat 官网
# subscription-manager register
3.2.2 在 Red Hat 官网上将相关订阅 (license) 分配给系统

登录 Red Hat 官网 –> Red Hat Customer Portal –> subscriptions –> systems –> <system name> –> 添加订阅

(注意:如果是使用的 Simple Content Access 模式的话,则无需这一步)

3.2.3 刷新订阅
# subscription-manager refresh
3.2.4 查看注册状态
3.2.4.1 查看订阅的消费情况
# subscription-manager list --consumed
3.2.4.2 查看注册状态
# subscription-manager status

参考文献:

https://access.redhat.com/solutions/253273

[内容] /etc/resolv.conf 配置文件的 search 选项

内容一:测试 search 选项的配置

# cat /etc/resolv.conf
search eternalcenter.com local new
nameserver 8.8.8.8

内容二:测试 search 选项

2.1 查询 zhumingyu

# host -a zhumingyu
Trying "zhumingyu.eternalcenter.com"
Trying "zhumingyu.local"
Trying "zhumingyu.new"
Trying "zhumingyu"
Host zhumingyu not found: 3(NXDOMAIN)
Received 102 bytes from 8.8.8.8#53 in 62 ms

(补充:当查询 zhumingyu 时,也就是中间没有点 “.”,则默认会被视为查询主机名,会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询,最后才查询 zhumingyu)

2.2 zhumingyu.com

# host -a zhumingyu.com
Trying "zhumingyu.com"
Received 31 bytes from 1.1.1.1#53 in 217 ms
Trying "zhumingyu.com.eternalcenter.com"
Trying "zhumingyu.com.local"
Trying "zhumingyu.com.new"
Host zhumingyu.com.new not found: 4(NOTIMP)
Received 35 bytes from 1.1.1.1#53 in 218 ms

(补充:当查询 zhumingyu.com 时,也就是中间有 1 个点 “.”,则默认会被视为查询域名,会先查询 mingyuzhu.com,如果查询失败,则会先依次把 eternalcenter.com、local 和 new 作为后缀添加到 zhumingyu 后进行查询)

2.3 查询 zhumingyu.com.

# host -a zhumingyu.com.
Trying "zhumingyu.com"
Host zhumingyu.com not found: 4(NOTIMP)
Received 31 bytes from 1.1.1.1#53 in 204 ms
Received 31 bytes from 1.1.1.1#53 in 204 ms

(补充:当查询 zhumingyu.com. 时,也就是末尾有 1 个点 “.”,默认会被视为查询域名,且只会查询这个域名。不会查询 search 里的每 1 项)