From d177a0b9a3535d66be15fc94083d9427b9c182b8 Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Fri, 10 May 2024 04:51:18 -0400 Subject: [PATCH] [6.13.z] Gracious message when vault is not reachable (#15026) Gracious message when vault is not reachable (#14942) (cherry picked from commit cdf898a27c455690bb01e7a7e9b6d9ee6e31c53d) Co-authored-by: Jitendra Yejare --- robottelo/utils/vault.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/robottelo/utils/vault.py b/robottelo/utils/vault.py index 417fa2c13bd..0fe7eb7912b 100644 --- a/robottelo/utils/vault.py +++ b/robottelo/utils/vault.py @@ -64,7 +64,10 @@ def exec_vault_command(self, command: str, **kwargs): logger.error(f"Error! {self.HELP_TEXT}") sys.exit(1) if vcommand.stderr: - if 'Error revoking token' in verror: + if 'no such host' in verror: + logger.error("The Vault host is not reachable, check network availability.") + sys.exit() + elif 'Error revoking token' in verror: logger.info("Token is alredy revoked!") elif 'Error looking up token' in verror: logger.info("Vault is not logged in!")