<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Proposals on Ramen</title><link>https://ramendr.github.io/ramen/docs/design/proposals/</link><description>Recent content in Proposals on Ramen</description><generator>Hugo</generator><language>en</language><atom:link href="https://ramendr.github.io/ramen/docs/design/proposals/index.xml" rel="self" type="application/rss+xml"/><item><title>VRG reconciler workflow</title><link>https://ramendr.github.io/ramen/docs/design/proposals/vrg-reconciliation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://ramendr.github.io/ramen/docs/design/proposals/vrg-reconciliation/</guid><description>&lt;!--&#10;SPDX-FileCopyrightText: The RamenDR authors&#10;SPDX-License-Identifier: Apache-2.0&#10;--&gt;&#10;&lt;h1 id="vrg-reconciler-workflow"&gt;VRG reconciler workflow&lt;/h1&gt;&#10;&lt;p&gt;This design document covers the VRG CRD and its reconciliation workflow.&lt;/p&gt;&#10;&lt;h2 id="terminology"&gt;Terminology&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;VRG: VolumeReplicationGroup&lt;/li&gt;&#10;&lt;li&gt;VR: VolumeReplication&lt;/li&gt;&#10;&lt;li&gt;PVC: PersistentVolumeClaim&lt;/li&gt;&#10;&lt;li&gt;PV: PersistentVolume&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="vrg-operator-functionality"&gt;VRG operator functionality&lt;/h2&gt;&#10;&lt;p&gt;VRG resource exists to manage a group PVCs that need replication. It is a&#10;namespace level resource that ensures the following:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;For each existing or dynamically created PVC:&#10;&lt;ul&gt;&#10;&lt;li&gt;Ensures PVCs are protected from deletion, prior to replicating them&lt;/li&gt;&#10;&lt;li&gt;Ensures PVCs are bound before enabling replication for them&lt;/li&gt;&#10;&lt;li&gt;Ensures only PVCs that are NOT being deleted are protected, when reconciling&#10;them&lt;/li&gt;&#10;&lt;li&gt;Ensures PVs backing the PVCs are retained for the duration that they are&#10;protected&lt;/li&gt;&#10;&lt;li&gt;Backs up the PV cluster data to an external S3 store, to enable restoring&#10;them on a remote peer cluster&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Creates and manages VR resource for PVCs that need to be protected&lt;/li&gt;&#10;&lt;li&gt;Manages state changes in VRG by ensuring VRs reach the same desired state,&#10;coordinating with PVC state and ensuring:&#10;&lt;ul&gt;&#10;&lt;li&gt;PVCs are not in use when being marked Secondary&lt;/li&gt;&#10;&lt;li&gt;PVCs are marked for deletion when being marked Secondary&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Manages VRG deletion, by ensuring VRs are in the desired state prior to&#10;deletion&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="vrg-crd"&gt;VRG CRD&lt;/h2&gt;&#10;&lt;h3 id="spec"&gt;Spec&lt;/h3&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;apiVersion: ramendr.openshift.io/v1alpha1&#10;kind: VolumeReplicationGroup&#10;metadata:&#10; name: vrg-sample&#10; generation: &amp;lt;generation&amp;gt;&#10;spec:&#10; pvcSelector:&#10; matchLabels:&#10; &amp;lt;key&amp;gt;: &amp;lt;value&amp;gt;&#10; volumeReplicationClass: &amp;lt;string&amp;gt;&#10; replicationState: &amp;#34;Primary&amp;#34;|&amp;#34;Secondary&amp;#34;&#10; s3Endpoint: &amp;lt;url-string&amp;gt;&#10; s3SecretName: &amp;lt;string&amp;gt;&#10;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#10;&lt;li&gt;Fields:&#10;&lt;ul&gt;&#10;&lt;li&gt;PVCSelector&#10;&lt;ul&gt;&#10;&lt;li&gt;Label selector to identify all the PVCs that are belong to this VRG and&#10;need to be replicated&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;VolumeReplicationClass&#10;&lt;ul&gt;&#10;&lt;li&gt;ReplicationClass for all volumes in this replication group; this value is&#10;propagated to created VolumeReplication CRs&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;ReplicationState&#10;&lt;ul&gt;&#10;&lt;li&gt;Desired state of all volumes [&lt;code&gt;primary&lt;/code&gt; or &lt;code&gt;secondary&lt;/code&gt;] in this&#10;replication group; this value is propagated to created VolumeReplication&#10;CRs&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;S3Profiles&#10;&lt;ul&gt;&#10;&lt;li&gt;S3 Profiles to replicate PV cluster data&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="status"&gt;Status&lt;/h3&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;status:&#10; protectedPVCs: [&#10; pvcName: &amp;lt;string&amp;gt;&#10; conditions: [&#10; type: [&amp;#34;Available&amp;#34;]&#10; status: [true|false|unknown]&#10; observedGeneration: &amp;lt;generation&amp;gt;&#10; lastTransitionTime: &amp;lt;time&amp;gt;&#10; reason: &amp;#34;Error&amp;#34;|&amp;#34;Progressing&amp;#34;|&amp;#34;Replicating&amp;#34;&#10; message: &amp;lt;human readable string&amp;gt;&#10; ]&#10; ]&#10; conditions: [&#10; type: [&amp;#34;Available&amp;#34;]&#10; status: [true|false|unknown]&#10; observedGeneration: &amp;lt;generation&amp;gt;&#10; lastTransitionTime: &amp;lt;time&amp;gt;&#10; reason: [&amp;#34;Replicating&amp;#34;|&amp;#34;Progressing&amp;#34;|&amp;#34;Error&amp;#34;]&#10; message: &amp;lt;human readable string&amp;gt;&#10; ]&#10;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;status.conditions&lt;/code&gt;:&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;type&lt;/code&gt; &amp;ldquo;Available&amp;rdquo; is to denote availability status of the VRG resource&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;code&gt;status&lt;/code&gt; may change back to &amp;ldquo;Progressing&amp;rdquo; in case there are new&#10;PVCs to deal with for the same CRD &lt;code&gt;generation&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;status&lt;/code&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&amp;ldquo;Unknown&amp;rdquo; if VRG is not yet picked up for reconciliation&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;True&amp;rdquo; if reconciliation is completed&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;reason&lt;/code&gt; is &amp;ldquo;Replicating&amp;rdquo;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;False&amp;rdquo; if reconciliation is progressing or has errors&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;reason&lt;/code&gt;: Progressing|Error&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;status.protectedPVCs&lt;/code&gt;:&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;pvcName&lt;/code&gt;: Name of the PVC for which conditions are represented&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;conditions&lt;/code&gt;:&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;type&lt;/code&gt; &amp;ldquo;Available&amp;rdquo; is to denote availability status for PVC protection&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;status&lt;/code&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&amp;ldquo;True&amp;rdquo; if &lt;code&gt;reason&lt;/code&gt; is &amp;ldquo;Replicating&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;False&amp;rdquo; if &lt;code&gt;reason&lt;/code&gt; is one of &amp;ldquo;Error&amp;rdquo; or &amp;ldquo;Progressing&amp;rdquo;, to denote any&#10;hard errors or that reconciliation is in progress&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;NOTE(s):&lt;/strong&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Ideally if status.conditions.[Available].status is True, the all PVC&#10;status should be true, with the reason as &amp;ldquo;Replicating&amp;rdquo;&lt;/li&gt;&#10;&lt;li&gt;An &lt;code&gt;observedGeneration&lt;/code&gt; number for when the PVC was protected may not be&#10;required, as once it is protected it stays protected. It may prove&#10;useful though if any straggling PVCs were protected during a cluster&#10;heal or related operations, to detect prior failover PVCs with the&#10;current generation&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h4 id="notes"&gt;Notes&lt;/h4&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Status may change for the same observed generation, as PVCs are created&lt;/li&gt;&#10;&lt;li&gt;Should there be a per PVC condition that it&amp;rsquo;s backing PV was backed up? To&#10;denote that replication at storage maybe missing, but PV cluster data may&#10;exist?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h3 id="vrg-example"&gt;VRG Example&lt;/h3&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;---&#10;apiVersion: ramendr.openshift.io/v1alpha1&#10;kind: VolumeReplicationGroup&#10;metadata:&#10; name: vrg-sample&#10;spec:&#10; pvcSelector:&#10; matchLabels:&#10; appname: myapp&#10; volumeReplicationClass: &amp;#34;vr-class-sample&amp;#34;&#10; replicationState: &amp;#34;Primary&amp;#34;&#10; s3Profiles:&#10; s3ProfileEast&#10; s3ProfileWest&#10;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="vrg-reconciliation"&gt;VRG reconciliation&lt;/h2&gt;&#10;&lt;h3 id="pvc-preparation-and-protection-for-all-states"&gt;PVC preparation and protection for all states&lt;/h3&gt;&#10;&lt;p&gt;All reconciliation state changes need to ensure a PVC is in the right state and&#10;protected prior to proceeding with the state change. The following steps are&#10;taken to ensure the same:&lt;/p&gt;</description></item></channel></rss>