-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support automated failover for StatefulSets (or workloads that do not delete their PVCs) #558
Comments
Further notes post discussions with @BenamarMk Currently for volsync we have the following PVC rules:
For volrep the PVC rules are:
For failover cases, the PVC can be deleted in either volsync or volrep cases, as there is no final sync operation that is required. We would need to have a common set of rules across volrep and volsync, such that the actual replication mechanisim is abstracted away from the DRPC user. Hence we should either mandate operator/STS created PVCs are to be deleted or not for both. With volsync if the operator/STS created PVCs are deleted, there is no possible way to perform a final sync. Hence the rule that we would adopt would be,
With the above, the STS auto-deletion of PVCs on STS deletion is not required, and we need to handle relocate for operator/STS created PVCs that are not deleted in the volrep case. As a first step allowing failover, as mentioned in this issue, is a way forward, while retaining the same PVC rules as before. Subsequently, changing the PVC rules for volrep as well to lign with volsync would be needed. The one caveat in the case for relocate with volsync or volrep, if the PVC is not deleted would be as follows:
|
NOTE: We need to evaluate this with Placement and ApplicationSets instead of Subscriptions that are in use at present. |
We could technically change the PVC to read only, to prevent further data modifications in this case. (requires experimentation) |
The above is disallowed: |
An alternative to overcome this issue would be as follows:
The above would help address a few other items as well:
|
StatefulSets(STS) by default do not delete their PVCs. This is being fixed in k8s upstream via this KEP and would potentially graduate to beta in an upcoming release. (
https://github.com/kubernetes/kubernetes/pull/111300
).This issue is to deal with the following problems till the above KEP is beta/GA.
Problem definition:
Proposed solution:
Other fixes and gotchas:
The text was updated successfully, but these errors were encountered: