-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve error handling in installation assistant #1767
Comments
Update ReportTestingI was testing the development @fcaffieri made, and I found some unexpected behaviors. While trying to make an AIO installation, I found that the execution of the script was stopped wrongly because a 🟢 Wazuh indexer is installed without try-catch
🔴 Wazuh indexer is not installed with try-catch
The thing is that the rollback is performed because of these lines:
The previous lines check if the APT lock exists by consulting the Is necessary to evaluate this development and decide if it is an improvement to the existing WIA. |
@davidcr01 this was explained and resolved here |
Update ReportDevelopmentAfter the clarification of @fcaffieri, the issue reported in the previous comments can be solved easily by adding the
grep_result=$(tail -n 2 ${logfile} | grep -q 'Could not get lock')
while [ "${grep_result}" -eq 0 ] && [ "${attempt}" -lt 10 ]; do
grep_result=$(tail -n 2 ${logfile} | grep -q 'Could not get lock' || true)
while [ -n "${grep_result}" ] && [ "${attempt}" -lt 10 ]; do Nevertheless, this specific code is changed in 4.8.0, in this PR, so this |
This issue goes to "On hold" because of the priority of the 4.8.0 issues. |
We won't apply this. |
In #1760 @fcaffieri implemented a try-catch structure to handle errors in the installation assistant, while interesting it exceeded the scope of the issue. This issue is meant to study the possible solutions to improve how we handle errors in the installation assistant.
The text was updated successfully, but these errors were encountered: