繁体   English   中英

了解 Redhat Yum 镜像问题

[英]Understand Redhat Yum mirrors issues

我正在使用 RHVH 来管理我的基础架构虚拟机。

我在两个不同的网络子网中有两台裸机服务器,具有相同的 RHVH 版本。

我使用一个自动化脚本在两个虚拟机上部署虚拟机,并在虚拟机上配置一个 docker 存储库文件。

我面临的问题是当我尝试查询container-selinux包时。 它适用于来自我的一台裸机服务器的虚拟机,而不是另一台。

第一个服务器的虚拟机:

[root@cpu-node0 ~]# /bin/repoquery --show-duplicates --plugins --disablerepo '' --enablerepo '' --qf  '%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}' container-selinux
container-selinux|2|2.107|1.el7_6|noarch|extras
container-selinux|2|2.107|3.el7|noarch|extras
[root@cpu-node0 ~]# 

第二台服务器的虚拟机:

[root@cpu-node0 ~]# /bin/repoquery --show-duplicates --plugins --disablerepo '' --enablerepo '' --qf  '%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}' container-selinux
Could not match packages: failure: repodata/repomd.xml from docker-engine: [Errno 256] No more mirrors to try.
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root@cpu-node0 ~]#

在每个裸机服务器上运行的两个 VM 上的 yum 存储库配置:

[root@cpu-node0 ~]# ll /etc/yum.repos.d/
total 44
-rw-r--r--. 1 root root 1664  5 sept. 13:05 CentOS-Base.repo
-rw-r--r--. 1 root root 1309  5 sept. 13:05 CentOS-CR.repo
-rw-r--r--. 1 root root  649  5 sept. 13:05 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  314  5 sept. 13:05 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630  5 sept. 13:05 CentOS-Media.repo
-rw-r--r--. 1 root root 1331  5 sept. 13:05 CentOS-Sources.repo
-rw-r--r--. 1 root root 6639  5 sept. 13:05 CentOS-Vault.repo
-rw-r--r--. 1 root root  369  2 mars  23:31 docker.repo
-rw-r--r--. 1 root root 1050 17 sept. 23:25 epel.repo
-rw-r--r--. 1 root root 1149 17 sept. 23:25 epel-testing.repo
[root@cpu-node0 ~]#

两个虚拟机上的 docker.repo 文件内容:

[root@cpu-node0 ~]# cat /etc/yum.repos.d/docker.repo 
[docker-ce]
name=Docker-CE Repository
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
keepcache=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-engine]
name=Docker-Engine Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
keepcache=1
gpgkey=https://yum.dockerproject.org/gpg
[root@cpu-node0 ~]#

第一个 VM 上的回购列表:

[root@cpu-node0 ~]# yum repolist
id du dépôt                                                                         nom du dépôt                                                                                                      statut
base/7/x86_64                                                                       CentOS-7 - Base                                                                                                   10 097
docker-ce/x86_64                                                                    Docker-CE Repository                                                                                                  68
!docker-engine                                                                      Docker-Engine Repository                                                                                             110
epel/x86_64                                                                         Extra Packages for Enterprise Linux 7 - x86_64                                                                    13 199
extras/7/x86_64                                                                     CentOS-7 - Extras                                                                                                    323
updates/7/x86_64                                                                    CentOS-7 - Updates                                                                                                 1 478
repolist: 25 275
[root@cpu-node0 ~]#

第二个 VM 上的 Yum 存储库列表:

[root@cpu-node0 ~]# yum repolist
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Essai d'un autre miroir.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

docker-ce/x86_64/primary_db                                                                                                                                                          |  40 kB  00:00:05     
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Essai d'un autre miroir.
id du dépôt                                                                         nom du dépôt                                                                                                      statut
base/7/x86_64                                                                       CentOS-7 - Base                                                                                                   10 097
docker-ce/x86_64                                                                    Docker-CE Repository                                                                                                  68
docker-engine                                                                       Docker-Engine Repository                                                                                               0
epel/x86_64                                                                         Extra Packages for Enterprise Linux 7 - x86_64                                                                    13 199
extras/7/x86_64                                                                     CentOS-7 - Extras                                                                                                    323
updates/7/x86_64                                                                    CentOS-7 - Updates                                                                                                 1 478
repolist: 25 165
[root@cpu-node0 ~]# 

尝试卷曲存储库 URL 时,我也收到以下消息:

[root@cpu-node0 ~]#curl https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml

<!doctype html>

<html lang="en">

<head></head>

<body>

  <h1>Notice: Shutting down dockerproject.org APT and YUM repos 2020-03-31</h1>

  <p>Docker will be shutting down the deprecated APT and YUM repositories hosted at "dockerproject.org" and "dockerproject.com" on the 31st of March 2020.</p>

  <p>We noticed that this project is referencing one of these repositories, and recommend updating to use the "download.docker.com" repository to prevent disruption.</p>

  <p>More info: https://www.docker.com/blog/changes-dockerproject-org-apt-yum-repositories/ </p>

</body>

</html>

看起来 docker 不想让任何人再使用这个 repo。 我猜他们可能从今天开始发布错误。

当然,这两个 VM 没有安装subscription-manager包,也没有附加订阅,在我们的上下文中实际上不需要它们,但是为什么在一个 VM 上而不是在另一个 VM 上存在镜像问题,其操作系统和系统配置是两者都一样,只是它们位于两个不同的网络中?

看起来 yum docker-engine 查询恢复到正常状态

即使 docker 项目 url curling 也能正常工作,但没有在我的第一篇文章中看到警告消息

看起来部署过程在公共存储库中处于错误状态,因此导致了这些错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM