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

Linux translate: Print status once #1426

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

EricEdens
Copy link
Contributor

At the end of Linux translation, statuses are double printed, once by Python and once by Bash. If Python reports a failure, but fails to flush its logs, then the incorrect status can be read by Daisy.

This was observed recently in the "Incorrect OS specified" test:

 startup-script-url: TranslateStatus: <serial-output key:'detected_distro' value:'debian'>
 startup-script-url: TranslateStatus: <serial-output key:'detected_major_version' value:'9'>
 startup-script-url: TranslateStatus: <serial-output key:'detected_minor_version' value:'12'>
 startup-script-url: TranslateDebug: Traceback (most recent call last):
 startup-script-url:   File "/usr/local/lib/python3.7/dist-packages/utils/common.py", line 246, in RunTranslate
 startup-script-url:     translate_func()
 startup-script-url:   File "/usr/local/lib/python3.7/dist-packages/translate.py", line 320, in translate
 startup-script-url:     release = _get_release(g)
 startup-script-url:   File "/usr/local/lib/python3.7/dist-packages/translate.py", line 162, in _get_release
 startup-script-url:     product, major, minor, supported))
 startup-script-url: ValueError: Import of debian-9.12 is not supported. The following versions are supported: [opensuse-15.1|2, sles-15.1|2, sles-12.4|5]
 startup-script-url: 
 startup-script-url: TranslateFailed: error: Import of debian-9.12 is not supported. The following versions are supported: [opensuse-15.1|2, sles-15.1|2, sles-12.4|5]
 startup-script-url: + NotifyExit
 startup-script-url: + [ 0 -eq 0 ]
 startup-script-url: + logger -p daemon.info TranslateSuccess: exits with return code 0
Nov 12 13:30:33 inst-translator-import-image-gzzm6 root: TranslateSuccess: exits with return code 0
 startup-script-url exit status 0
 Finished running startup scripts.

This PR disables Bash's final-status printing for Linux translations (except if there's a failure prior to running the Python interpreter).

Testing

  • Ran the tests cli_tools_tests/e2e/gce_image_import_export/test_suites/import/import_tests.go

@google-oss-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dntczdx, EricEdens, zoran15

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [EricEdens,dntczdx,zoran15]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@EricEdens
Copy link
Contributor Author

/hold (We're preparing a release, scheduled to ship Thursday)

@EricEdens
Copy link
Contributor Author

/unhold: Talked with Zach, and we're delaying the release until after Thanksgiving

@EricEdens EricEdens merged commit 5eef691 into GoogleCloudPlatform:master Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants