]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commit
task/install: add "downgrade_packages" option for "install" task 1244/head
authorKefu Chai <kchai@redhat.com>
Tue, 11 Dec 2018 12:19:08 +0000 (20:19 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 13 Dec 2018 02:54:45 +0000 (10:54 +0800)
commita2abf0dba92806cc737d57aadf9e852bf25ada8b
tree23323a72b1a75bac0eaaff17308efa340abb7ceb
parentc6abfa13882089bb693ee098c70907054c90be51
task/install: add "downgrade_packages" option for "install" task

in rados/thrash-old-clients, hammer or jewel packages is installed. but
yum does not allow downgrade a package by default, if a newer version is
already installed. in this case, librbd1 and librados2 are installed as
dependencies of qemu-kvm. their version is 1:10.2.5-4.el7 at the time of
writing in CentOS/RHEL 7.5. so if we want to install librbd1 or
librados2 from jewel, yum will simply consider the requirement is
already fulfilled and hence do nothing. if we want to install
ceph-radosgw from jewel, yum will fail, as ceph-radosgw depends on
librados2 and other Ceph packages of the same version from jewel. but
librbd1 and librados2 have been already installed. the error message
looks like:

Error: Package: 1:ceph-common-0.94.10-87.g116a558.el7.x86_64 (Ceph)
           Requires: librados2 = 1:0.94.10-87.g116a558.el7
           Installed: 1:librados2-10.2.5-4.el7.x86_64 (@base)
               librados2 = 1:10.2.5-4.el7
           Available: 1:librados2-0.94.10-87.g116a558.el7.x86_64 (Ceph)
               librados2 = 1:0.94.10-87.g116a558.el7

so we need to downgrade librbd1 and librados2 first.

in this change, "downgrade_package" option is added for "install" task,
so we can specify packages to be downgraded to given version, these
packages won't be installed twice if they are also specified by
"install" task elsewhere to be installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/task/install/__init__.py
teuthology/task/install/rpm.py