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

Syncing latest changes from upstream main for ramen #368

Merged
merged 11 commits into from
Oct 7, 2024
Merged

Conversation

df-build-team
Copy link

PR containing the latest commits from upstream main branch

Benamar Mekhissi and others added 11 commits October 1, 2024 08:45
…rpc watcher

- Moved all resource-watching related functions from drplacementcontrol_controller.go
to a new file drplacementcontrol_watcher.go.
- No functional changes introduced, purely a structural refactor.

Signed-off-by: Benamar Mekhissi <[email protected]>
- Added functionality to watch for changes in DRPolicy resources to trigger DRPC
reconciliation when necessary.

Signed-off-by: Benamar Mekhissi <[email protected]>
Was forgetten when we replaced minikube volumesnapshot addons.

Signed-off-by: Nir Soffer <[email protected]>
The comment is still unclear, but at least easier to read.

Signed-off-by: Nir Soffer <[email protected]>
- Replace "VR under deletion" with "deleted VR", matching the
  terminology used in the code.
- Replace "detected as missing or deleted" with "is missing" when we
  know the VR does not exist.

Signed-off-by: Nir Soffer <[email protected]>
Moved from validateVRStatus() to make room from checking VR VAlidated
status. This also make the function easier to understand, keeping the
same level of abstraction and getting rid of the uninteresting details.

Signed-off-by: Nir Soffer <[email protected]>
Rename msg to errorMsg and document that this is an error message,
if the we could not get the condition value, because it is missing,
stale, or unknown.

Signed-off-by: Nir Soffer <[email protected]>
Log after important changes to the system in delete VR flow to make it
easier to understand what the system is doing, and how ramen changed the
system.

New logs:
- delete the VR resource
- remove annotations from PV

Improve logs:
- remove annotations, labels, and finalizers from PVC

Signed-off-by: Nir Soffer <[email protected]>
When deleting a primary VRG, we wait until the VR Completed condition is
met. However if a VR precondition failed, for example using a drpolicy
without flattening enabled when the PVC needs flattening, the VR will
never complete and the vrg and drpc deletion will never complete.

Since csi-addons 0.10.0 we have a new Validated VR condition, set to
true if pre conditions are met, and false if not. VR is can be deleted
safely in this state, since mirroring was not enabled.

This changes modifies deleted VRG processing to check the new VR
Validated status. If the condition exist and the condition status is
false, validateVRStatus() return true, signaling that the VR is in the
desired state, and ramen completes the delete flow.

If the VR does not report the Validated condition (e.g. old csi-addon
version) or the condition status is true (mirroring in progress), we
continue in the normal flow. The VR will be deleted only when the
Completed condition status is true.

Tested with discovered deployment and vm using a pvc created from a
volume snapshot.

Signed-off-by: Nir Soffer <[email protected]>
To refresh the cache we need to checkout ramen source and run drenv
cache with the environment files. Using a workflow for this make this
job easy to implement and manage without accessing the runner directly.

The job can also run manually from github UI. This is likely to work for
people with write access.

Signed-off-by: Nir Soffer <[email protected]>
@df-build-team df-build-team requested a review from a team October 2, 2024 08:02
Copy link

openshift-ci bot commented Oct 2, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: df-build-team

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ShyamsundarR ShyamsundarR merged commit 6972170 into main Oct 7, 2024
36 of 38 checks passed
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.

4 participants