-
Notifications
You must be signed in to change notification settings - Fork 101
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/etcd data validation #93
Fix/etcd data validation #93
Conversation
a0be0da
to
f39faa6
Compare
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.
@georgekuruvillak Thanks for the well-written PR! Just a few typos and suggestions. Other than that, LGTM! 👍🏼
@georgekuruvillak Please change the bootstrap script in the helm chart as well, at
Also, in our example YAMLs, the label selector in the Service spec (app: etcd) does not match the labels given for the StatefulSet (app: etcd-${cloud}) at
|
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.
Just renamed MARKER to VALIDATION_MARKER (also the actual file name) to better reflect its usage.
DISCLAIMER: I have just typed the changes up on the browser. Not tested!
doc/validation.md
Outdated
* Do directory content validation. | ||
* Start etcd | ||
* Yes | ||
* Check if previous exit was normal |
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.
Is this second check required?
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. I have changed the proposal as how the validation is done now.
@@ -23,23 +23,102 @@ metadata: | |||
data: | |||
bootstrap.sh: |- |
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.
Does the bootstrap.sh be specific to the cloud provider?
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 is generated from the template file. So the code generator generates across all the cloud providers. This will be changed when the helm charts are introduced.
example/etcd-statefulset-aws.yaml
Outdated
done | ||
} | ||
|
||
if [ ! -f $MARKER ] ; |
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.
if [ ! -f $MARKER ] ; | |
if [ ! -f $VALIDATION_MARKER ] ; |
e82b5f1
to
02e6e14
Compare
@georgekuruvillak Can you also add a test or two for testing in sanity mode? And also modify the tests to pass the mode argument to the |
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.
LGTM. Some minor changes considering the logging perspective. Please address those. Also, Please address comments from Amshu.
02e6e14
to
d4a0a5f
Compare
I have made the changes and have added test for sanity check. PTAL |
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.
@georgekuruvillak Thanks for making all the suggested changes. LGTM! 👍🏼
What this PR does / why we need it:
Design decision on how to go ahead with data validation.
Which issue(s) this PR fixes:
Fixes #71
Etcd data directory validation takes a long time and resource to perform. Currently, it gets triggered when etcd restarts. This PR changes the logic to perform full validation only when etcd restarts erroneously.
Special notes for your reviewer:
Please go through the design doc so that we can come to a consensus on how to proceed ahead with the validation steps and division of responsibilities between the script in etcd container and the sidecar.
Release note: