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

change update strategy #203

Merged
merged 8 commits into from
Nov 28, 2019
Merged

change update strategy #203

merged 8 commits into from
Nov 28, 2019

Conversation

chusAlvarez
Copy link
Contributor

  • Until now, we rely in kubernetes to update the pods when changes are introduced in the stateful set.
    -This can lead to problems, as the master can be relaunch when the new slave pods are still syncing
    -So now the controller takes the update task, killing pod-by-pod and only when the syncing in all slaves is done.

@chusAlvarez chusAlvarez requested a review from ese as a code owner November 18, 2019 12:19
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Found some fixes!

P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).

operator/redisfailover/checker.go Outdated Show resolved Hide resolved
@chusAlvarez chusAlvarez requested a review from jchanam November 18, 2019 12:19
charts/redisoperator/Chart.yaml Outdated Show resolved Hide resolved
operator/redisfailover/checker.go Outdated Show resolved Hide resolved
operator/redisfailover/checker.go Outdated Show resolved Hide resolved
operator/redisfailover/checker.go Outdated Show resolved Hide resolved
operator/redisfailover/checker.go Outdated Show resolved Hide resolved
operator/redisfailover/checker.go Outdated Show resolved Hide resolved
operator/redisfailover/checker.go Outdated Show resolved Hide resolved
@@ -301,3 +303,18 @@ func (c *client) getConfigParameters(config string) (parameter string, value str
}
return s[0], strings.Join(s[1:], " "), nil
}

func (c *client) IsSyncing(ip, password string) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I would use a function slaveIsReady for the safety of update process. This can provide a wide overview of the cluster health checking the slaves were are more conditions than syncing state.

  1. master_host != 127.0.0.1 (pod bootstrap state, needs to be added to the cluster by operator)
  2. master_link_status:up
  3. master_sync_in_progress:0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done :)

chusAlvarez and others added 7 commits November 25, 2019 18:49
Co-Authored-By: Sergio Ballesteros <[email protected]>
Co-Authored-By: Sergio Ballesteros <[email protected]>
Co-Authored-By: Sergio Ballesteros <[email protected]>
Co-Authored-By: Sergio Ballesteros <[email protected]>
Co-Authored-By: Sergio Ballesteros <[email protected]>
Co-Authored-By: fixmie[bot] <44270338+fixmie[bot]@users.noreply.github.com>
@chusAlvarez chusAlvarez requested a review from ese November 26, 2019 16:55
@chusAlvarez chusAlvarez merged commit 2659077 into master Nov 28, 2019
@ese ese deleted the change-update-policy branch December 23, 2021 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants