簡體   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