Bug 348 - [CentOS 7.6迁移Anolis OS 7.7][x86_64] 系统迁移失败,迁移过程遇Requires: nbdkit(x86-64)与Requires: python-cffi导致失败
Summary: [CentOS 7.6迁移Anolis OS 7.7][x86_64] 系统迁移失败,迁移过程遇Requires: nbdkit(x86-64)与Requ...
Status: CONFIRMED
Alias: None
Product: Anolis OS 7
Classification: Anolis OS
Component: OsMigration (show other bugs) OsMigration
Version: 7.7
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: layne-yang
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-12 18:26 UTC by anolislw
Modified: 2022-04-29 18:05 UTC (History)
3 users (show)

See Also:


Attachments
runlog_Centos7.6_to_Anolis7.7 (391.36 KB, text/plain)
2022-01-13 10:02 UTC, anolislw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anolislw alibaba_cloud_group 2022-01-12 18:26:16 UTC
[简单描述]
CentOS 7.6 迁移至Anolis OS 7.7,运行迁移失败,迁移过程报错,遇到Requires: nbdkit(x86-64) = 1.8.0-4.el7与Requires: python-cffi >= 1.6.0-5.el7
问题,导致迁移失败

[机器环境]
######  迁移前系统信息  ######
[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"



[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# uname -a
Linux iZ2ze1pd5ay3lbq19j9ly1Z 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# rpm -qa | grep kernel
kernel-tools-libs-3.10.0-957.21.3.el7.x86_64
kernel-tools-3.10.0-957.21.3.el7.x86_64
kernel-3.10.0-957.21.3.el7.x86_64
kernel-headers-3.10.0-957.21.3.el7.x86_64
kernel-devel-3.10.0-957.21.3.el7.x86_64
kernel-3.10.0-957.el7.x86_64


[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id               repo name                                           status
base/7/x86_64         CentOS-7                                            10,072
epel/x86_64           Extra Packages for Enterprise Linux 7 - x86_64      13,712
extras/7/x86_64       CentOS-7                                               500
updates/7/x86_64      CentOS-7                                             3,252
repolist: 27,536


[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# ls -lrt /etc/yum.repos.d
total 8
-rw-r--r-- 1 root root 230 Jan 11 20:15 epel.repo
-rw-r--r-- 1 root root 675 Jan 11 20:15 CentOS-Base.repo


[root@iZ2ze1pd5ay3lbq19j9ly1Z ~]# yum repolist -v
Loading "fastestmirror" plugin
Config time: 0.004
Yum version: 3.4.3
Loading mirror speeds from cached hostfile
Setting up Package Sacks
pkgsack time: 0.005
Repo-id      : base/7/x86_64
Repo-name    : CentOS-7
Repo-revision: 1604001756
Repo-updated : Fri Oct 30 04:03:00 2020
Repo-pkgs    : 10,072
Repo-size    : 8.9 G
Repo-baseurl : http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/
Repo-expire  : 21,600 second(s) (last: Wed Jan 12 17:11:51 2022)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo

Repo-id      : epel/x86_64
Repo-name    : Extra Packages for Enterprise Linux 7 - x86_64
Repo-revision: 1641952509
Repo-updated : Wed Jan 12 10:09:32 2022
Repo-pkgs    : 13,712
Repo-size    : 16 G
Repo-baseurl : http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/
Repo-expire  : 21,600 second(s) (last: Wed Jan 12 17:11:51 2022)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/epel.repo

Repo-id      : extras/7/x86_64
Repo-name    : CentOS-7
Repo-revision: 1630682564
Repo-updated : Fri Sep  3 23:22:46 2021
Repo-pkgs    : 500
Repo-size    : 921 M
Repo-baseurl : http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/
Repo-expire  : 21,600 second(s) (last: Wed Jan 12 17:11:51 2022)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo

Repo-id      : updates/7/x86_64
Repo-name    : CentOS-7
Repo-revision: 1641321621
Repo-updated : Wed Jan  5 02:41:06 2022
Repo-pkgs    : 3,252
Repo-size    : 18 G
Repo-baseurl : http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/
Repo-expire  : 21,600 second(s) (last: Wed Jan 12 17:11:51 2022)
  Filter     : read-only:present
Repo-filename: /etc/yum.repos.d/CentOS-Base.repo
repolist: 27,536

[期望结果]
可以成功迁移

[实际结果]
--> Running transaction check
---> Package bind-export-libs.x86_64 32:9.11.4-26.P2.an7 will be installed
---> Package geoipupdate.x86_64 0:2.5.0-1.an7 will be installed
---> Package libasan.x86_64 0:4.8.5-44.0.1.an7 will be installed
---> Package libatomic.x86_64 0:4.8.5-44.0.1.an7 will be installed
---> Package nbdkit.x86_64 0:1.8.0-4.el7 will be erased
---> Package python-cffi.x86_64 0:1.6.0-5.el7 will be erased
---> Package python-rpm-macros.noarch 0:3-34.an7 will be installed
---> Package python-urllib3.noarch 0:1.10.2-7.an7 will be installed
---> Package python2-rpm-macros.noarch 0:3-32.an7 will be installed
--> Finished Dependency Resolution
Error: Package: nbdkit-devel-1.8.0-4.el7.x86_64 (@base)
           Requires: nbdkit(x86-64) = 1.8.0-4.el7
           Removing: nbdkit-1.8.0-4.el7.x86_64 (@base)
               nbdkit(x86-64) = 1.8.0-4.el7
           Downgraded By: nbdkit-1.8.0-4.an7.x86_64 (updates)
               nbdkit(x86-64) = 1.8.0-4.an7
           Available: nbdkit-1.8.0-1.an7.x86_64 (os)
               nbdkit(x86-64) = 1.8.0-1.an7
Error: Package: python-pygit2-0.26.4-1.el7.x86_64 (@epel)
           Requires: python-cffi >= 1.6.0-5.el7
           Removing: python-cffi-1.6.0-5.el7.x86_64 (@base)
               python-cffi = 1.6.0-5.el7
           Downgraded By: python-cffi-1.6.0-5.an7.x86_64 (os)
               python-cffi = 1.6.0-5.an7
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
python-requests-2.6.0-10.el7.noarch has missing requires of python-urllib3 >= ('0', '1.10.2', '1')
Could not automatically sync with Anolis OS repositories.
        Check the output of 'yum distro-sync' to manually resolve the issue.

[复现步骤]
wget https://gitee.com/anolis/centos2anolis/raw/master/centos2anolis.py
yum -y install python3
python3 centos2anolis.py -v 7.7

[附件]
迁移过程日志见附件
Comment 1 anolislw alibaba_cloud_group 2022-01-13 10:02:04 UTC
Created attachment 108 [details]
runlog_Centos7.6_to_Anolis7.7
Comment 2 xuchunmei alibaba_cloud_group 2022-01-13 18:47:45 UTC
Error: Package: nbdkit-devel-1.8.0-4.el7.x86_64 (@base)
           Requires: nbdkit(x86-64) = 1.8.0-4.el7
           Removing: nbdkit-1.8.0-4.el7.x86_64 (@base)
               nbdkit(x86-64) = 1.8.0-4.el7
           Downgraded By: nbdkit-1.8.0-4.an7.x86_64 (updates)
               nbdkit(x86-64) = 1.8.0-4.an7
           Available: nbdkit-1.8.0-1.an7.x86_64 (os)
               nbdkit(x86-64) = 1.8.0-1.an7
Error: Package: python-pygit2-0.26.4-1.el7.x86_64 (@epel)
           Requires: python-cffi >= 1.6.0-5.el7
           Removing: python-cffi-1.6.0-5.el7.x86_64 (@base)
               python-cffi = 1.6.0-5.el7
           Downgraded By: python-cffi-1.6.0-5.an7.x86_64 (os)
               python-cffi = 1.6.0-5.an7

anolis7的源上未提供nbdkit-devel
python-cffi这个包源上有,但是不满足python-pygit2的条件。
版本号上1.6.0-5.an7 < 1.6.0-5.el7

看上去需要把python-cffi的版本号bump一下,否则无法满足python-pygit2的需求。
Comment 3 xuchunmei alibaba_cloud_group 2022-01-13 18:48:22 UTC
anolis7.9也有类似问题,需要同步处理。
Comment 4 xzyang uniontech_group 2022-04-29 18:05:22 UTC
将python-cffi 升级后再次执行迁移工具,会报出其它问题,如下:
正在解决依赖关系
--> 正在检查事务
---> 软件包 python-pygit2.x86_64.0.0.26.4-1.el7 将被 安装
--> 正在处理依赖关系 python-cffi >= 1.6.0-5.el7,它被软件包 python-pygit2-0.26.4-1.el7.x86_64 需要
--> 正在处理依赖关系 libgit2.so.26()(64bit),它被软件包 python-pygit2-0.26.4-1.el7.x86_64 需要
--> 正在检查事务
---> 软件包 python-cffi.x86_64.0.1.6.0-5.0.1.an7 将被 安装
--> 正在处理依赖关系 python-pycparser,它被软件包 python-cffi-1.6.0-5.0.1.an7.x86_64 需要
---> 软件包 python-pygit2.x86_64.0.0.26.4-1.el7 将被 安装
--> 正在处理依赖关系 libgit2.so.26()(64bit),它被软件包 python-pygit2-0.26.4-1.el7.x86_64 需要
--> 正在检查事务
---> 软件包 python-pycparser.noarch.0.2.14-1.an7 将被 安装
--> 正在处理依赖关系 python-ply,它被软件包 python-pycparser-2.14-1.an7.noarch 需要
---> 软件包 python-pygit2.x86_64.0.0.26.4-1.el7 将被 安装
--> 正在处理依赖关系 libgit2.so.26()(64bit),它被软件包 python-pygit2-0.26.4-1.el7.x86_64 需要
--> 正在检查事务
---> 软件包 python-ply.noarch.0.3.4-11.an7 将被 安装
---> 软件包 python-pygit2.x86_64.0.0.26.4-1.el7 将被 安装
--> 正在处理依赖关系 libgit2.so.26()(64bit),它被软件包 python-pygit2-0.26.4-1.el7.x86_64 需要
--> 解决依赖关系完成
错误:软件包:python-pygit2-0.26.4-1.el7.x86_64 (epel)
          需要:libgit2.so.26()(64bit)

libgit2.so.26()由libgit2所提供,后发现libgit2没有放在anolis 7.7 的extra仓库中所导致,可将libgit2放入 anolis 7.7的仓库中即可解决该问题。