-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix Zookeeper Cluster Readiness Check in init container #102
Open
gregoryg
wants to merge
2
commits into
stardog-union:develop
Choose a base branch
from
gregoryg:zookeeper-readiness
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ruok
just respondsimok
if the ZooKeeper server is up and bound to the port [1]. That is fine for a healthcheck on a ZK server alone, but it is not sufficient for Stardog's purposes. Stardog needs to know that ZooKeeper is up and ready (i.e. all ZK instances are participating in the quorum).My understanding of the k8s service is that it will cycle through the servers so while it may hit a follower which doesn't have the information Stardog needs, it would loop until it finds a server that does.
Are you finding that it never tries new servers and this loops endlessly? Or just that it tries and fails a few times before eventually succeeding?
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.
it never tries new server - this happens very often - the result is that perhaps one of 3 stardog pods comes up while the others never do. Even hours later, the same follower is used. After
helm uninstall
followed by anotherhelm install
, you may get a different result. It's entirely random selection. Some other method needs to be implemented. This is so common, we must be missing something in our tests.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.
BTW, are you saying that the liveness check is inadequate because a Zookeeper cluster can report it's in an ok state even though there is no leader? I wouldn't think that would be possible.
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.
No pods will come up if ZooKeeper hasn't reported ready. Stardog won't move on to deploying until ZK reports ready as determined by this check iirc (though it's been awhile since I looked closely). I suspect something else is wrong with your deploys unless you've modified the charts to deploy Stardog even if this check hasn't passed.
Yes, a liveness check just determines if the server is alive, which isn't the same as if it's ready. For ZK, that is this
ruok
command, similar to how Stardog has/admin/alive
for an alive check for the individual server and/admin/healthcheck
for a ready check for the cluster. The alive check just says the server is up. The ready check says it's up and actually ready (i.e. a member of the cluster).I don't think ZK has something akin to a ready check for an ensemble, hence the need to check something else.