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

Bug 1861260 - Update the Push extension to add additional status check code in order to restart the pod if an error is occurring #2135

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

dklawren
Copy link
Collaborator

@dklawren dklawren commented Oct 25, 2023

This adds additional checking code to the Push extension daemon. When running the command with the check parameter, instead of just returning a PID as is the default, we also check to make sure the database is up and accessible. In the recent past, the database disappeared and the daemon continued to run and checkout but the log was full of MySQL connection errors. This code change allows for Kubernetes to do a liveness check and restart the POD if the daemon can no longer access the database.

…k code in order to restart the pod if an error is occurring
@dklawren dklawren requested a review from cgsheeh October 25, 2023 21:45
Copy link
Collaborator

@cgsheeh cgsheeh left a comment

Choose a reason for hiding this comment

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

How does this function run? Is it running somewhere due to the gd_ prefix?

@dklawren
Copy link
Collaborator Author

How does this function run? Is it running somewhere due to the gd_ prefix?

It will be run by kubernetes from the command line at regular intervals. It is called as bugzilla-pushd.pl check and exits with a 0 if successful or something else if it was not. gd_check() is the method looked for by Daemon::Generic to decide what to do when the check parameter is given. If not gd_check method is defined, then it just defaults to displaying the current PID and exiting with 0.

@dklawren dklawren merged commit ce7841c into mozilla-bteam:master Oct 27, 2023
@dklawren dklawren deleted the 1861260 branch October 27, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants