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

Add statefulset invalid error metrics #421

Closed
wants to merge 1 commit into from
Closed

Conversation

d-kuro
Copy link
Contributor

@d-kuro d-kuro commented Jul 6, 2022

refs: #265

Added metrics to show re-creation counts when StatefulSet re-creation is supported.

This Pull Request adds metrics for the number of times an update of the immutable field in the StatefulSet has resulted in an error.
This allows users to detect unrecoverable StatefulSet update errors.

@d-kuro d-kuro self-assigned this Jul 6, 2022
@d-kuro d-kuro marked this pull request as ready for review July 10, 2022 17:43
@d-kuro d-kuro force-pushed the d-kuro/sts-invalid branch from 8d0e142 to b780310 Compare July 13, 2022 02:49
@@ -968,6 +968,9 @@ func (r *MySQLClusterReconciler) reconcileV1StatefulSet(ctx context.Context, req
if needRecreate {
metrics.StatefulSetRecreateErrorTotal.WithLabelValues(cluster.Name, cluster.Namespace).Inc()
}
if apierrors.IsInvalid(err) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to write a test, but couldn't figure out how to cause this with the current MySQLCluster spec.
Is there a better way?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d-kuro
Sorry, I misunderstood the specification of the MySQLCluster.
Certainly, the invalid update will not happen...

May I close this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thank you!

@d-kuro d-kuro requested review from masa213f, ymmt2005 and zoetrope July 13, 2022 03:28
@d-kuro d-kuro closed this Jul 14, 2022
@d-kuro d-kuro deleted the d-kuro/sts-invalid branch July 14, 2022 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants