查看问题详情
编号 | 项目 | 分类 | 查看权限 | 报告日期 | 最后更新 |
---|---|---|---|---|---|
0000126 | Anolis OS 8 | * OTHERS | public | 2021-05-11 16:30 | 2021-05-12 11:19 |
报告员 | anolislw | 分派给 | xuchunmei000 | ||
优先级 | normal | 严重性 | minor | 出现频率 | always |
状态 | resolved | 处理状况 | open | ||
标题 | 0000126: [centos8.3][Anolis 8.2-4.18-x86/aarch64] 执行迁移脚本过程中遇异常信息 | ||||
描述 | 描述:centos8.3迁移至Anolis 8.2使用迁移工具遇到extras源404, 迁移过程中centos repo不能disable掉(机器reboot后验证确实没有禁掉) 迁移reboot后/etc/centos-release与预期不符合 【迁移前信息】 [root@iZbp13etdjb60asfbyrjmfZ ~]# uname -a Linux iZbp13etdjb60asfbyrjmfZ 4.18.0-240.15.1.el8_3.aarch64 #1 SMP Tue Mar 2 15:14:39 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux [root@iZbp13etdjb60asfbyrjmfZ ~]# uname -r 4.18.0-240.15.1.el8_3.aarch64 [root@iZbp13etdjb60asfbyrjmfZ ~]# cat /etc/os-release NAME="CentOS Linux" VERSION="8" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" [root@iZbp13etdjb60asfbyrjmfZ ~]# cat /etc/centos-release CentOS Linux release 8.3.2011 【迁移后信息】 [root@iZbp13etdjb60asfbyrjmfZ ~]# cat /etc/os-release NAME="Anolis OS" VERSION="8.2" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.2" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.2" ANSI_COLOR="0;31" HOME_URL="https://openanolis.org/" [root@iZbp13etdjb60asfbyrjmfZ ~]# [root@iZbp13etdjb60asfbyrjmfZ ~]# cat /etc/centos-release CentOS Linux release 8.3.2011 <这里还是centos的release信息> [root@iZbp13etdjb60asfbyrjmfZ ~]# [root@iZbp13etdjb60asfbyrjmfZ ~]# cat /etc/redhat-release Anolis OS release 8.2 [root@iZbp13etdjb60asfbyrjmfZ ~]# [root@iZbp13etdjb60asfbyrjmfZ ~]# uname -a Linux iZbp13etdjb60asfbyrjmfZ 4.18.0-240.15.1.el8_3.aarch64 #1 SMP Tue Mar 2 15:14:39 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux [root@iZbp13etdjb60asfbyrjmfZ ~]# [root@iZbp13etdjb60asfbyrjmfZ ~]# uname -r 4.18.0-240.15.1.el8_3.aarch64 【问题】: 问题1) extras源访问404 Errors during downloading metadata for repository 'extras': - Status code: 404 for http://mirrors.cloud.aliyuncs.com/$contentdir/8/extras/x86_64/os/repodata/repomd.xml (IP: 100.100.2.148) Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried package rhn-client-tools is not installed ----------------------------------------------------------------------- 问题2) 迁移过程中原centos的repo不能disable掉,机器reboot后yum list发现centos的repo没有禁掉 ========= Start converting ========= Backing up and removing old repository files... Removing CentOS-specific yum configuration from /etc/yum.conf ... Downloading anolis release package... Modular dependency problems: ... ... Switching old release package with Anolis... warning: anolis-release-8.2-8.an8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 4873f7c5: NOKEY warning: file /etc/yum.repos.d/CentOS-Linux-Sources.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-PowerTools.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-Plus.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-Media.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-FastTrack.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-Extras.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-Devel.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-Debuginfo.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-BaseOS.repo: remove failed: No such file or directory warning: file /etc/yum.repos.d/CentOS-Linux-AppStream.repo: remove failed: No such file or directory /etc/yum.repos.d/switch-to-anolis.repo Enabling AppStreamwhich replaces AppStream Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository PowerTools is listed more than once in the configuration Enabling BaseOSwhich replaces BaseOS Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository PowerTools is listed more than once in the configuration Installing base packages for Anolis... Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository PowerTools is listed more than once in the configuration AnolisOS-8 - AppStream 6.4 MB/s | 5.4 MB 00:00 AnolisOS-8 - BaseOS 3.1 MB/s | 2.3 MB 00:00 AnolisOS-8 - PowerTools 2.2 MB/s | 1.7 MB 00:00 CentOS-8 - Extras 27 kB/s | 2.3 kB 00:00 -------------------------------------------------------------------------------------- [root@iZbp13etdjb60asfbyrjmfZ ~]# yum repolist #CentOS的源没有disable掉 Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository PowerTools is listed more than once in the configuration repo id repo name AppStream AnolisOS-8 - AppStream BaseOS AnolisOS-8 - BaseOS PowerTools AnolisOS-8 - PowerTools epel Extra Packages for Enterprise Linux 8 - aarch64 extras CentOS-8 - Extras ---------------------------------------------------------------------------------------- [root@iZbp13etdjb60asfbyrjmfZ ~]# pushd /etc/yum.repos.d/;ls -lrt;popd /etc/yum.repos.d ~ total 64 -rw-r--r-- 1 root root 635 Apr 2 16:48 CentOS-AppStream.repo -rw-r--r-- 1 root root 701 Apr 2 16:48 CentOS-centosplus.repo -rw-r--r-- 1 root root 619 Apr 2 16:48 CentOS-Base.repo -rw-r--r-- 1 root root 668 Apr 2 16:48 CentOS-Debuginfo.repo -rw-r--r-- 1 root root 1329 Apr 2 16:48 CentOS-CR.repo -rw-r--r-- 1 root root 663 Apr 2 16:48 CentOS-Extras.repo -rw-r--r-- 1 root root 227 Apr 2 16:48 CentOS-epel.repo -rw-r--r-- 1 root root 1382 Apr 2 16:48 CentOS-Sources.repo -rw-r--r-- 1 root root 639 Apr 2 16:48 CentOS-PowerTools.repo -rw-r--r-- 1 root root 928 Apr 2 16:48 CentOS-Media.repo -rw-r--r-- 1 root root 242 Apr 2 16:48 CentOS-fasttrack.repo -rw-r--r-- 1 root root 74 Apr 2 16:48 CentOS-Vault.repo -rw-r--r-- 1 root root 204 May 8 09:12 AnolisOS-PowerTools.repo -rw-r--r-- 1 root root 186 May 8 09:12 AnolisOS-Plus.repo -rw-r--r-- 1 root root 201 May 11 15:54 AnolisOS-AppStream.repo -rw-r--r-- 1 root root 192 May 11 15:54 AnolisOS-BaseOS.repo ~ ------------------------------------------------------------------------------------------- [root@iZbp13etdjb60asfbyrjmfZ ~]# pushd /etc/yum.repos.d/;cat CentOS-AppStream.repo;popd /etc/yum.repos.d ~ # CentOS-AppStream.repo [AppStream] name=CentOS-$releasever - AppStream baseurl=http://mirrors.cloud.aliyuncs.com/$contentdir/$releasever/AppStream/$basearch/os/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial 问题3) 迁移后reboot,/etc/centos-release的信息还是:CentOS Linux release 8.3.2011 [root@iZbp13etdjb60asfbyrjmfZ ~]# cat /etc/centos-release CentOS Linux release 8.3.2011 | ||||
问题重现步骤 | 【复现】 下载并执行centos2anolis迁移脚本: git clone https://codeup.openanolis.cn/codeup/migration/centos2anolis.git 脚本工具link:https://codeup.openanolis.cn/codeup/migration/centos2anolis/blob/master/centos2anolis.py python3 centos2anolis.py | ||||
附注 | 【附】 aarch64环境迁移存在同样问题 | ||||
标签 | 没加标签. | ||||
|
ecs实例上的centos 8.3相关的repo被修改,不是使用的centos-linux-repos包中自带的。 在执行迁移脚本前,将ecs修改过的repo删除,重新安装centos-linux-repos,再执行迁移脚本。 |
|
在执行迁移脚本前执行如下步骤: cd /etc/yum.repos.d rm -rf CentOS-AppStream.repo CentOS-Base.repo CentOS-centosplus.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-Extras.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-PowerTools.repo CentOS-Sources.repo CentOS-Vault.repo wget https://mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm rpm -ivh centos-linux-repos-8-2.el8.noarch.rpm --nodeps --force 然后执行迁移脚本。 |
日期 | 用户名 | 字段 | 更改 |
---|---|---|---|
2021-05-11 16:30 | anolislw | 新建问题 | |
2021-05-11 22:16 | xuchunmei000 | 注释已添加: 0000196 | |
2021-05-11 22:55 | jacobwang | 分派给 | => xuchunmei000 |
2021-05-11 22:55 | jacobwang | 状态 | 新建 => 已分配 |
2021-05-12 10:54 | xuchunmei000 | 注释已添加: 0000198 | |
2021-05-12 11:19 | xuchunmei000 | 状态 | 已分配 => 已解决 |