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

Don't print tracebacks for expected errors #112

Open
nirs opened this issue Jul 27, 2022 · 1 comment
Open

Don't print tracebacks for expected errors #112

nirs opened this issue Jul 27, 2022 · 1 comment
Labels
enhancement Enhancing the system by adding new feature or improving performance or reliability ovirt-img Issue for ovirt-img tool

Comments

@nirs
Copy link
Member

nirs commented Jul 27, 2022

ovirt-img print tracebacks for all errors, however some errors are expected and a traceback is not helpful.

  • Engine login error (bad username or password, user error)
  • Downloading non-existing disk
  • Downloading locked disk (e.g. used by running vm, or another storage operation)
  • Error creating the target image (e.g. permission issue)
  • Uploading non-existing image (user error)
  • Uploading to non-existing storage domain (user error)
  • Uploading when user is not allowed to create disk (engine permissions issue)

In general traceback should be logged only for unexpected error, which may be a bug in the tool or some environment issue. In this case the traceback can help debugging the issue.

@nirs nirs added the enhancement Enhancing the system by adding new feature or improving performance or reliability label Jul 27, 2022
@nirs nirs added this to the ovirt-4.5.3 milestone Jul 27, 2022
@nirs
Copy link
Member Author

nirs commented Jul 28, 2022

One case (termination by signals) is handled in #116.

We can have similar mechanism, using common error class for
expected errors and handling them in _tools.main().

@aesteve-rh aesteve-rh added the ovirt-img Issue for ovirt-img tool label Aug 2, 2022
@sandrobonazzola sandrobonazzola removed this from the ovirt-4.5.4 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing the system by adding new feature or improving performance or reliability ovirt-img Issue for ovirt-img tool
Projects
None yet
Development

No branches or pull requests

3 participants