From: Kefu Chai Date: Wed, 25 Mar 2020 10:25:11 +0000 (+0800) Subject: orchestra/remote.py: raise if ensure_online() fails X-Git-Tag: 1.1.0~135^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=1da4b4372f6a04bb185ae0cddc65ef1ca6103eaa;p=teuthology.git orchestra/remote.py: raise if ensure_online() fails to ensure that we fail early if we cannot ensure an online remote. Signed-off-by: Kefu Chai --- diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 79df250cd8..96a1c9201f 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -168,8 +168,11 @@ class Remote(object): return self.ssh.get_transport().is_active() def ensure_online(self): + if self.is_online: + return + self.connect() if not self.is_online: - return self.connect() + raise Exception('unable to connect') @property def system_type(self):