-
Notifications
You must be signed in to change notification settings - Fork 15
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
Exporter should be in error state instead of blocked if installation fails #203
Comments
If installation fails due to network connectivity issues, the operator is responsible for addressing the network problem, as it's not a bug within the charm itself. Therefore, setting the status to "blocked" is reasonable in this scenario. In summary, any error state indicates a potential bug. Similar discussion here My understanding come from these two documents.
error : The unit is in error, likely from a hook failure. The operator will need to file a bug Once the charm enter error state, it's hard to recover from it. I tend to avoid it if possible, especially when I don't think it's a bug. |
Yes, that's not a bug within the charm itself, so if the user file a bug, we should explain that it's not a bug and potentially offer a way to avoid it. A blocked status in this case is a dead end, install hook will not run again even when operator fixed the issue; on the other hand, an error state can be recovered: |
I agree with @chanchiwai-ray . The install hook is one shot and if we block it and return, there is no way to run it again. If a similar issue was on config-change or update-status, then blocking the unit is totally fine |
is it possible to defer an install hook? I agree that if the installation fails for external reasons it's not a charm bug, hence we should not produce a stack trace. On the other hand, we should retry automatically and notify the user of why installation did not complete. |
After the discussion in the OpenStack Exporter Operator project, I believe we now have clear guidelines and know how to proceed. Please modify the behavior: Raise the error and let operator framework handle it. |
The exporter is installed as part of the charm's install event handler. Currently, if the installation of the exporter fails, we put the charm into blocked status. But ideally, since the user cannot do anything to recover from the failure, we should let the error bubble up and have the charm be in error status.
The text was updated successfully, but these errors were encountered: