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

Create health condition for degraded status / quorum issues #360

Merged
merged 5 commits into from
Jul 13, 2022

Conversation

burmanm
Copy link
Contributor

@burmanm burmanm commented Jul 5, 2022

What this PR does:
In case CassandraDatacenter is under some operation that degrades the cluster or QUORUM health check fails, update Condition on the Status to indicate this. This is to make user aware that certain other operations are not going to be successful.

Which issue(s) this PR fixes:
Fixes #376

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CHANGELOG.md updated (not required for documentation PRs)
  • CLA Signed: DataStax CLA

@burmanm burmanm marked this pull request as ready for review July 5, 2022 20:01
@burmanm burmanm requested a review from a team as a code owner July 5, 2022 20:01
dcPatch := client.MergeFrom(rc.Datacenter.DeepCopy())

if rc.isClusterDegraded() || !rc.isClusterHealthy() {
updated = rc.setCondition(
Copy link
Contributor

Choose a reason for hiding this comment

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

If the cluster is degraded or unhealthy, should we just requeue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already do that elsewhere, this is just to add the status (as I thought the DBPE-2283 wish was). If we requeue here, then we could never recover from the wrong status.

@burmanm burmanm force-pushed the create_health_condition branch from 6e73b7f to 7e1425a Compare July 6, 2022 14:02
@@ -328,6 +328,7 @@ const (
DatacenterRollingRestart DatacenterConditionType = "RollingRestart"
DatacenterValid DatacenterConditionType = "Valid"
DatacenterDecommission DatacenterConditionType = "Decommission"
DatacenterHealthy DatacenterConditionType = "Healthy"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add some comments explaining this?

@burmanm burmanm merged commit b498b7e into k8ssandra:master Jul 13, 2022
burmanm added a commit that referenced this pull request Jul 18, 2022
* Add DatacenterHealth condition

* Modify the DatacenterHealth status update to occur on the starting nodes part

* Fix rebase

* Add description to DatacenterHealthy

* Add lint to the Makefile, remove unused isDegraded

(cherry picked from commit b498b7e)
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.

K8SSAND-1666 ⁃ Add LOCAL_QUORUM failed condition to CassandraDatacenter
2 participants