Skip to content

OADP-5900: DPA config for backup repo cache and full maintenance interval #1705

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

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

sseago
Copy link
Contributor

@sseago sseago commented Apr 9, 2025

Why the changes were made

Enable backup repository configuration via DPA. Upstream docs are here: https://velero.io/docs/v1.16/backup-repository-configuration/

This PR adds two new DPA fields to NodeAgentConfig to set cacheLimitMB and fullMaintenanceInterval

How to test the changes made

Changes to cacheLimitMB will be reflected in the conf file under $HOME/udmrepo in the velero pod. The number doesn't translate exactly to a single value seen, but for example setting it to 8000 produces these numbers:

  "caching": {
    "cacheDirectory": "../.cache/kopia/2123fc541362ef5f",
    "maxCacheSize": 5368709120,
    "contentCacheSizeLimitBytes": 6710886400,
    "maxMetadataCacheSize": 1342177280,
    "metadataCacheSizeLimitBytes": 1677721600,
    "maxListCacheDuration": 30000000000
  },
Setting it to 4000 will drop all of those numbers except for `maxListCacheDuration` in half.

Also, verify that the `backup-repository-dpa-name` configmap has both fields set (if you set both) and the values match the DPA field valuess:

apiVersion: v1
data:
kopia: '{"cacheLimitMB":2000,"fullMaintenanceInterval":"fastGC"}'
kind: ConfigMap

and that the configmap is passed as an arg to the velero pod:
    - --backup-repository-configmap=backup-repository-velero-sample
<!-- Explain how the changes introduced by this PR can be tested and verified, with commands and pictures -->

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 9, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Apr 9, 2025

@sseago: This pull request references OADP-5900 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set.

In response to this:

Why the changes were made

Enable backup repository configuration via DPA. Upstream docs are here: https://velero.io/docs/v1.16/backup-repository-configuration/

This PR adds two new DPA fields to NodeAgentConfig to set cacheLimitMB and fullMaintenanceInterval

How to test the changes made

Changes to cacheLimitMB will be reflected in the conf file under $HOME/udmrepo in the velero pod. The number doesn't translate exactly to a single value seen, but for example setting it to 8000 produces these numbers:

 "caching": {
   "cacheDirectory": "../.cache/kopia/2123fc541362ef5f",
   "maxCacheSize": 5368709120,
   "contentCacheSizeLimitBytes": 6710886400,
   "maxMetadataCacheSize": 1342177280,
   "metadataCacheSizeLimitBytes": 1677721600,
   "maxListCacheDuration": 30000000000
 },
Setting it to 4000 will drop all of those numbers except for `maxListCacheDuration` in half.

Also, verify that the `backup-repository-dpa-name` configmap has both fields set (if you set both) and the values match the DPA field valuess:

apiVersion: v1
data:
kopia: '{"cacheLimitMB":2000,"fullMaintenanceInterval":"fastGC"}'
kind: ConfigMap

and that the configmap is passed as an arg to the velero pod:
   - --backup-repository-configmap=backup-repository-velero-sample
<!-- Explain how the changes introduced by this PR can be tested and verified, with commands and pictures -->

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2025
@sseago
Copy link
Contributor Author

sseago commented Apr 10, 2025

/retest

@sseago sseago force-pushed the backup-repo-config branch from 3f3f255 to 2e2b78d Compare April 10, 2025 13:22
@sseago
Copy link
Contributor Author

sseago commented Apr 10, 2025

/cherry-pick oadp-1.5

@openshift-cherrypick-robot
Copy link
Contributor

@sseago: once the present PR merges, I will cherry-pick it on top of oadp-1.5 in a new PR and assign it to you.

In response to this:

/cherry-pick oadp-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

KopiaRepoOptions `json:",inline"`
}

type KopiaRepoOptions struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

the idea to have a separate struct is because this would be datamover options and not FSB options? (I think I heard some discussion around this)

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mateusoliveira43 This is for BackupRepository configuration, so used for both Datamover and FSB. I grouped them together because they go into the same ConfigMap entry -- as @mpryc mentioned, so a single Marshal statement will generate the json chunk we need.

Copy link
Contributor

Choose a reason for hiding this comment

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

alright

@mpryc
Copy link
Contributor

mpryc commented Apr 11, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 11, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD f7f0e80 and 2 for PR HEAD 2e2b78d in total

Copy link

openshift-ci bot commented Apr 11, 2025

@sseago: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link

openshift-ci bot commented Apr 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mateusoliveira43, shubham-pampattiwar, sseago

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [mateusoliveira43,shubham-pampattiwar,sseago]

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

@openshift-merge-bot openshift-merge-bot bot merged commit 7593b7d into openshift:master Apr 14, 2025
9 checks passed
@openshift-cherrypick-robot
Copy link
Contributor

@sseago: #1705 failed to apply on top of branch "oadp-1.5":

Applying: DPA config for backup repo cache and full maintenance interval
Using index info to reconstruct a base tree...
M	go.mod
Falling back to patching base and 3-way merge...
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 DPA config for backup repo cache and full maintenance interval

In response to this:

/cherry-pick oadp-1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants