-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add replication factor as env to jiva controller #388
Add replication factor as env to jiva controller #388
Conversation
Signed-off-by: kmova <[email protected]>
The controller spec generated with the fix is as follows:
|
orchprovider/k8s/v1/k8s.go
Outdated
// - if replication factor is 1, volume will be marked as RW when one replica connects | ||
// - if replication factor is 3, volume will be marked as RW when when atleast 2 replica connect | ||
// Similar logic will be applied to turn the volume into RO, when qorum is lost. | ||
//Note: When kubectl scale up/down is done, this ENV needs to be patched. |
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.
When kubectl scale up/down is done to the Replica deployment, this ENV i.e. Controller deployment needs to be patched.
Codecov Report
@@ Coverage Diff @@
## master #388 +/- ##
==========================================
- Coverage 29.37% 29.33% -0.05%
==========================================
Files 65 65
Lines 5514 5523 +9
==========================================
Hits 1620 1620
- Misses 3720 3729 +9
Partials 174 174
Continue to review full report at Codecov.
|
Signed-off-by: kmova <[email protected]>
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
Signed-off-by: kmova [email protected]
What this PR does / why we need it:
The jiva controller needs to determine whether to have the volume as read-only/read-write based on the quorum from the replicas. When the count is not available (in 0.5.x), controller was depending on the registration process to determine the number of replicas that are connected. This auto-registration process leads to several race conditions for determining - whether the volume will be launched with a single replica or multiple replicas. By passing this replication factor, controller will handle the cases for multiple replica's better.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Related to : openebs-archive/jiva#83