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

K8SPSMDB-1170: set error state when pods are in CrashLoopBackOff #1680

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

pooknull
Copy link
Contributor

@pooknull pooknull commented Oct 17, 2024

K8SPSMDB-1170 Powered by Pull Request Badge

https://perconadev.atlassian.net/browse/K8SPSMDB-1170

DESCRIPTION

Problem:
When pods are in CrashLoopBackOff state, cluster is in initializing state. In this situation it's not possible to delete the cluster, when finalizers are set.

Solution:
Set error state when pods are in CrashLoopBackOff state.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@@ -343,6 +332,18 @@ func (cr *PerconaServerMongoDB) CheckNSetDefaults(platform version.Platform, log
}
}

if mongos := cr.Spec.Sharding.Mongos; mongos != nil && cr.CompareVersion("1.18.0") >= 0 && cr.Status.State == AppStateInit {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the decision to print these in initializing state

@hors hors merged commit a6e7f0f into main Oct 21, 2024
14 of 15 checks passed
@hors hors deleted the dev/K8SPSMDB-1170-fix branch October 21, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M 30-99 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants