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

Confusing output when multiple leapp errors detected. #36

Closed
atoomic opened this issue Mar 2, 2022 · 0 comments · Fixed by #43
Closed

Confusing output when multiple leapp errors detected. #36

atoomic opened this issue Mar 2, 2022 · 0 comments · Fixed by #43

Comments

@atoomic
Copy link
Collaborator

atoomic commented Mar 2, 2022

notice the multiple /scripts/elevate-cpanel --continue section when leap failed as seen below

* 02-19:29:03 (449) [ERROR] The elevation process failed during stage 3.

You can continue the process after fixing the errors by running:

    /usr/local/cpanel/scripts/elevate-cpanel --continue

You can check the error log by running:

    /usr/local/cpanel/scripts/elevate-cpanel

Last Error:

The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:

    /scripts/elevate-cpanel --continue


You can read the full leapp report at: /var/log/leapp/leapp-report.txt


* 02-19:29:03 (350) [FATAL] The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:

    /scripts/elevate-cpanel --continue


You can read the full leapp report at: /var/log/leapp/leapp-report.txt
The 'leapp upgrade' process failed.

Please investigate, resolve then re-run the following command to continue the update:

    /scripts/elevate-cpanel --continue


You can read the full leapp report at: /var/log/leapp/leapp-report.txt
@toddr toddr changed the title Multiple leap upgrade errors in cpanel-elevate.log file Confusing output when multiple leapp errors detected. Mar 3, 2022
xsawyerx added a commit that referenced this issue Mar 7, 2022
* `run_service_and_notify()` calls `_run_service()`
* If `_run_service()` fails, `run_service_and_notify()` will call `LOGDIE()`
  with whatever error was provided - this logs an error and throws an exception
* `_run_service()` and all the subroutines it runs (such as `run_stage_3()`
  that handles LEAPP) themselves also call `LOGDIE()` if there's an error,
  which logs an error and throws an exception

This means that a `LOGDIE()` is logged and an exception is thrown with an error
logged to the terminal/log file. It is then caught in the caller subroutine and
`LOGDIE()` is called again, causing the same logging message to be logged again.

I tried verifying that every `LOGDIE()` I changed is only called within a stage
so it will be caught by `run_service_and_notify()` and be logged and the process
closed properly.

Resolves GH #36.
@xsawyerx xsawyerx linked a pull request Mar 7, 2022 that will close this issue
atoomic added a commit that referenced this issue Mar 8, 2022
Avoid duplicate output on errors:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants