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

Use the ping command inside the health check #10125

Merged
merged 1 commit into from
Jun 22, 2020

Conversation

loicmathieu
Copy link
Contributor

Fixes #10119

Use the ping command instead of listing the databases for the health check. This allow using health check with users with low access rules.

WARNING: this implies a change inside the heath check response, it is a beaking change so it needs to be documented inside the migration guide.

An alternate solution would have been to only issue the ping command if the list database failed.

@loicmathieu
Copy link
Contributor Author

Health check response before

{
    "status": "UP",
    "checks": [
        {
            "name": "MongoDB connection health check",
            "status": "UP",
            "data": {
                "default": "admin, config, local"
            }
        }
    ]
}

Health check response after:

{
    "status": "UP",
    "checks": [
        {
            "name": "MongoDB connection health check",
            "status": "UP",
            "data": {
                "default": "{\"ok\": 1.0}"
            }
        }
    ]
}

@geoand
Copy link
Contributor

geoand commented Jun 19, 2020

I'll remove the noteworth-feature label, since I think the breaking-change is enough :)

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@geoand geoand merged commit 9de653d into quarkusio:master Jun 22, 2020
@loicmathieu loicmathieu deleted the mongodb-health branch June 26, 2020 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MongoDB Health Check fails when using Mongo template on Openshift
2 participants