Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EL import: Surface yum_install errors #1394

Merged
merged 1 commit into from
Oct 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions daisy_workflows/image_import/enterprise_linux/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def yum_install(g, *packages):
Raises:
RuntimeError: If there is a failure during installation.
"""
last_exception = None
for i in range(6):
try:
# There's no sleep on the first iteration since `i` is zero.
Expand All @@ -239,11 +240,10 @@ def yum_install(g, *packages):
'"{0}"'.format(p) for p in packages))
return
except Exception as e:
last_exception = e
logging.debug('Failed to install {}. Details: {}.'.format(packages, e))
raise RuntimeError(
'Verify that you have specified the correct operating system '
'in the `--os` flag. If you are bringing your own license (BYOL), '
'also verify that your subscription is eligible to be run on GCP.')
raise RuntimeError('Failed to install {}. Details: {}.'.format(
packages, last_exception))

dntczdx marked this conversation as resolved.
Show resolved Hide resolved

def main():
Expand Down