From 54bdb32afedafceaeb3aea008d0f23c840c08572 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Wed, 30 Aug 2017 11:55:15 +0200 Subject: [PATCH] Override failing package signature checks The RPMs built by teuthology's buildpackages task are not signed and after a recent zypper update the install task started to fail with File 'repomd.xml' from repository 'ceph-rpm-under-test' is unsigned, continue? [yes/no] (no): no Error building the cache: [ceph-rpm-under-test|http://149.202.175.91/ceph-rpm-sle12-x86_64-basic/sha1/3804e807353c9d125753b1cf4f6405f79db83d4e/x86_64] Valid metadata not found at specified URL Signed-off-by: Nathan Cutler --- teuthology/packaging.py | 4 +++- teuthology/task/install/rpm.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/teuthology/packaging.py b/teuthology/packaging.py index 02ff68329..e847fc0f0 100644 --- a/teuthology/packaging.py +++ b/teuthology/packaging.py @@ -796,7 +796,9 @@ class GitbuilderProject(object): url = "{base_url}/{arch}".format( base_url=self.base_url, arch=self.arch) self.remote.run(args=[ - 'sudo', 'zypper', '-n', 'addrepo', '-p', '1', url, 'ceph-rpm-under-test' + 'sudo', 'zypper', '-n', 'addrepo', '-p', '1', url, 'ceph-rpm-under-test', + Raw(';'), + 'sudo', 'zypper', '-n', '--no-gpg-checks', 'refresh' ]) else: self.remote.run(args=['sudo', 'yum', '-y', 'install', url]) diff --git a/teuthology/task/install/rpm.py b/teuthology/task/install/rpm.py index 8ec87c116..6023cc075 100644 --- a/teuthology/task/install/rpm.py +++ b/teuthology/task/install/rpm.py @@ -26,7 +26,7 @@ def _remove(ctx, config, remote, rpm): if dist_release in ['opensuse', 'sle']: pkg_mng_cmd = 'zypper' - pkg_mng_opts = '-n' + pkg_mng_opts = '-n --no-gpg-checks' pkg_mng_subcommand_opts = '--capability' else: pkg_mng_cmd = 'yum' @@ -132,7 +132,7 @@ def _update_package_list_and_install(ctx, remote, rpm, config): if dist_release in ['opensuse', 'sle']: pkg_mng_cmd = 'zypper' - pkg_mng_opts = '-n' + pkg_mng_opts = '-n --no-gpg-checks' pkg_mng_subcommand_opts = '--capability' else: pkg_mng_cmd = 'yum' -- 2.47.3