-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add safety latches to create/ensure VRG manifest work functions
The function to createVRGManifestWork will create a new VRG when a ManifestWork for it does not exist. Ensure that the MW is not present before creating one, and return an Exists error for callers to process if one exists. The function ensureVRGManifestWork is to ensure ManifestWork for VRG exists and update its mutable fields appropriately. Added a latch to ensure that the MW for VRG that needs to be ensured is present, and that it is reported as delivered to the ManagedCluster (using a check to see if a view is present). The changes to ensureVRGManifestWork also includes NOT creating a VRG from a view, as that should be ensured by the adoptOrphanVRG function at the start of reconciling a DRPC. The caller startDeploying, which calls createVRGManifestWork, now checks for an exists error and proceeds to update the Placement. This is done as any errors in updating placement would send the reconciler back to creating the VRG, which as it exists would keep failing. Other callers ensure that the VRG exists and if so update it, rather than calling create. Signed-off-by: Shyamsundar Ranganathan <[email protected]>
- Loading branch information
1 parent
d858776
commit a6b1547
Showing
1 changed file
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters