-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Varnish health check failing due to presence of id_prefix in env.php #22307
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
Conversation
Hi @Nazar65. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
@orlangur i'm changed the solution, and add comment for better understanding. can you review changes ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up on Slack conversation with Nazar: we need a kind of health-check for cache type even when there is only one key in array.
I'm will provide solution soon. |
Hello, |
Hi @gody01 can you explain ? |
Sorry, my bad. |
Hi @orlangur, this is my observation, issue comes from redis config check at this point ->
So before there was not any configuration due to missing id_prefix, but after some PR we have this option as default, so this "if" statement was fails because hes not found config options for redis, but this is true because i'm have no redis configuration just varnish, but i have 500 error, so basically we need to run in to this statement when redis is configured, but how we could do that ? we just need to check if we have backed options then do the test_cache, and if we have only id_prefix that's means we have no any redis configured and dont need to check this configuration, and simply i check in iteration that current config have only 1 key and this key is id_prefix that means that this is default configuration, and have no redis, so we don't need to check backed options. And if not, we check the backed options and do the test config, and this is how it before. Hope that this will help to progress on this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for your investigation @Nazar65!
Hi @orlangur, thank you for the review. |
✔️ QA passed |
Hi @Nazar65, thank you for your contribution! |
Description (*)
The root of the issue has to do with the fix for GitHub-15828 and how pub/health_check.php works. In the release notes for 2.3.1 it says
Magento now sets the id_prefix option on prefix cache keys for the cache frontend during installation. If this option is not set, Magento uses the first 12 bits of the md5 hash of the absolute path to the Magento app/etc directory. But if this value is not exactly the same on all web servers, cache invalidation will not work.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)