From: Kyr Shatskyy Date: Wed, 24 Jun 2020 12:33:19 +0000 (+0200) Subject: task/install/rpm: verify zypper repo is valid X-Git-Tag: 1.1.0~74^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9217d29711a66fcf3a941c13b7d5a015b374c053;p=teuthology.git task/install/rpm: verify zypper repo is valid Add zypper ref right after addrepo so we can fail earlier when remote repo is gone or has any issues. Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/task/install/rpm.py b/teuthology/task/install/rpm.py index d544f30423..f603ed1ced 100644 --- a/teuthology/task/install/rpm.py +++ b/teuthology/task/install/rpm.py @@ -82,6 +82,10 @@ def _zypper_addrepo(remote, repo_list): 'sudo', 'zypper', '-n', 'addrepo', '--refresh', '--no-gpgcheck', repo['url'], repo['name'], ]) + # Because 'zypper addrepo --check' does not work as expected + # we need call zypper ref in order to fail early if the repo + # is invalid + remote.run(args='sudo zypper ref ' + repo['name']) def _zypper_removerepo(remote, repo_list): """