[pve]记一次pve大版本升级故障及其处理

2022-05-20 14:22:47 浏览数 (1)

去年把两个PVE集群从V5升级到了V6,都比较顺利。

操作参考[pve]Proxmox Virtual Env集群升级v5到v6。

这周把一个V5的PVE集群升级到V6却遇到新问题,记录下。

该集群有十个节点,原有许可到期,只能改用免费的软件源。为了加快速度,我先把其中一个节点完成了升级,很顺利。主要目的是把相关的deb升级包同步到其他节点。

接下来本该按部就班升级其他节点,却遇到奇怪的故障。

相关软件仓库地址:

代码语言:javascript复制
# cat /etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib
deb http://security.debian.org buster/updates main contrib
deb http://deb.debian.org/debian buster-backports main
deb http://mirrors.163.com/debian/ buster main
deb http://mirrors.163.com/debian/ buster-backports main

deb http://download.proxmox.com/debian/pve buster pve-no-subscription

#如果本来就在使用ceph,就不要加这条,按照ceph升级流程去操作,这个pve集群以前安装过过ceph,但是已经删除了,这里顺便跟着升级
deb http://download.proxmox.com/debian/pve buster pve-no-subscription

执行升级的过程中出现安装包依赖错误:

代码语言:javascript复制
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 ceph-common : Depends: python3-ceph-argparse (= 15.2.13-pve1~bpo10) but it is not installed
               Depends: libcurl4 (>= 7.28.0) but it is not installed
 dmsetup : Depends: libdevmapper1.02.1 (>= 2:1.02.138) but 2:1.02.137-pve6 is installed
 libapparmor-perl : Depends: perl-base (>= 5.28.1-5) but 5.24.1-3 deb9u7 is installed
                    Depends: perlapi-5.28.1
 libauthen-pam-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                      Depends: perlapi-5.28.0
 libb-hooks-op-check-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                            Depends: perlapi-5.28.0
 libcrypt-openssl-dsa-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                             Depends: perlapi-5.28.0
 libcrypt-ssleay-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                        Depends: perlapi-5.28.0
 libdbd-mysql-perl : Depends: perl (>= 5.28.1-4) but 5.24.1-3 deb9u7 is installed
                     Depends: perlapi-5.28.1
 libdbi-perl : Depends: perl (>= 5.28.1-6 deb10u1) but 5.24.1-3 deb9u7 is installed
               Depends: perlapi-5.28.1
 libdevel-callchecker-perl : Depends: perl (>= 5.28.1-4) but 5.24.1-3 deb9u7 is installed
                             Depends: perlapi-5.28.1
 libparams-classify-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                           Depends: perlapi-5.28.0
 libpve-u2f-server-perl : Depends: perl (>= 5.28.1-6) but 5.24.1-3 deb9u7 is installed
                          Depends: perlapi-5.28.1
 librados2-perl : Depends: perl (>= 5.28.1-6) but 5.24.1-3 deb9u7 is installed
                  Depends: perlapi-5.28.1
 librgw2 : Depends: libcurl4 (>= 7.28.0) but it is not installed
 libsub-name-perl : Depends: perl (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                    Depends: perlapi-5.28.0
 libterm-readline-gnu-perl : Depends: perl (>= 5.28.1-3) but 5.24.1-3 deb9u7 is installed
                             Depends: perlapi-5.28.1
 libtext-charwidth-perl : Depends: perl-base (>= 5.28.0-3) but 5.24.1-3 deb9u7 is installed
                          Depends: perlapi-5.28.0
 libxml-libxml-perl : Depends: perl (>= 5.28.1-4) but 5.24.1-3 deb9u7 is installed
                      Depends: perlapi-5.28.1
 python-rgw : Depends: python-rados (= 12.2.13-pve1~bpo9) but it is not installed
 python3-cephfs : Depends: python3-ceph-argparse (= 15.2.13-pve1~bpo10) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

此时执行apt --fix-broken install会报告同样的错误,各种修改软件仓库地址都一样,最后的办法是强制安装:

代码语言:javascript复制
cd /var/cache/apt/archives/
dpkg -i *.deb

然后再执行apt --fix-broken install完成修复

最后其中一台还有遗留问题:

代码语言:javascript复制
# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apparmor
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/537 kB of archives.
After this operation, 27.6 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Reading changelogs... Done
Preconfiguring packages ...
dpkg: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
(Reading database ... 190829 files and directories currently installed.)
Preparing to unpack .../apparmor_2.13.2-10_amd64.deb ...
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
Unpacking apparmor (2.13.2-10) over (2.11.0-3 deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/apparmor_2.13.2-10_amd64.deb (--unpack):
 trying to overwrite '/usr/share/apparmor-features/features', which is also in package lxc-pve 4.0.6-2
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
Errors were encountered while processing:
 /var/cache/apt/archives/apparmor_2.13.2-10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

重装apparmor这个包还是一样,包括重装lxc-pve:

代码语言:javascript复制
# apt install --reinstall apparmor
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  apparmor-profiles-extra apparmor-utils
The following packages will be upgraded:
  apparmor
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/537 kB of archives.
After this operation, 27.6 kB of additional disk space will be used.
Reading changelogs... Done
Preconfiguring packages ...
dpkg: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
(Reading database ... 190829 files and directories currently installed.)
Preparing to unpack .../apparmor_2.13.2-10_amd64.deb ...
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
Unpacking apparmor (2.13.2-10) over (2.11.0-3 deb9u2) ...
dpkg: error processing archive /var/cache/apt/archives/apparmor_2.13.2-10_amd64.deb (--unpack):
 trying to overwrite '/usr/share/apparmor-features/features', which is also in package lxc-pve 4.0.6-2
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
dpkg-query: warning: files list file for package 'apparmor' missing; assuming package has no files currently installed
Errors were encountered while processing:
 /var/cache/apt/archives/apparmor_2.13.2-10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

好在只此一台,而且这个问题暂时不影响使用。

0 人点赞