From 9217d29711a66fcf3a941c13b7d5a015b374c053 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Wed, 24 Jun 2020 14:33:19 +0200 Subject: [PATCH] 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 --- teuthology/task/install/rpm.py | 4 ++++ 1 file changed, 4 insertions(+) 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): """ -- 2.39.5