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

[DPE-4904] TLS doesn't restart charm if db isn't available #465

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

Gu1nness
Copy link
Contributor

Issue

  • In the ticket, we saw that sometimes mongodb tls library tries to restart the mongod service before the charm had ran the pebble ready event, messing with the log directory and data directory permissions.
  • TLS shouldn't restart the mongod service if the db isn't initialised already to avoid race conditions

Solution

  • Add the checks on db_initialised in the library

Follow Up

  • Update mongodb k8s charm with this library + a patch for another race condition in storage

tests/unit/test_tls_lib.py Show resolved Hide resolved
@Gu1nness Gu1nness changed the title [DPE-4904] TLS shouldn't restart charm if db isn't already available [DPE-4904] TLS doesn't restart charm if db isn't available Aug 23, 2024
@Gu1nness Gu1nness merged commit 94f4376 into 6/edge Aug 23, 2024
30 checks passed
@Gu1nness Gu1nness deleted the 4904-tls-race-condition branch August 23, 2024 08:06
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.

4 participants