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

Enable DataVolume garbage collection by default #2421

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

arnongilboa
Copy link
Collaborator

@arnongilboa arnongilboa commented Sep 8, 2022

Signed-off-by: Arnon Gilboa agilboa@redhat.com

What this PR does / why we need it:
It's time to enable DataVolume garbage collection by default.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:
On the next kubevirt-bot Bump kubevirtci PR (with bump-cdi), it will fail on all kubevirtci lanes with tests referring DVs, as the tests IsDataVolumeGC() looks at CDIConfig Spec.DataVolumeTTLSeconds and assumes default is disabled. This should be fixed there.

Release note:

Enable DataVolume garbage collection by default

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Sep 8, 2022
@arnongilboa arnongilboa force-pushed the cdiconfig_status_dv_ttl branch 2 times, most recently from df99933 to 8b60b7b Compare September 8, 2022 15:37
@kubevirt-bot kubevirt-bot added size/M and removed size/L labels Sep 8, 2022
@arnongilboa
Copy link
Collaborator Author

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 8, 2022
@arnongilboa
Copy link
Collaborator Author

/unhold

@kubevirt-bot kubevirt-bot added size/L and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M labels Sep 8, 2022
@arnongilboa arnongilboa force-pushed the cdiconfig_status_dv_ttl branch 4 times, most recently from f7ee3e9 to 95b9263 Compare September 13, 2022 13:03
@mhenriks
Copy link
Member

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mhenriks

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:

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 13, 2022
@brybacki
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 13, 2022
@arnongilboa
Copy link
Collaborator Author

/retest

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 14, 2022
@kubevirt-bot kubevirt-bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 15, 2022
@arnongilboa arnongilboa changed the title Expose DataVolumeTTLSeconds in CDIConfigStatus Enable DataVolume garbage collection by default Sep 15, 2022
Copy link
Collaborator

@akalenyu akalenyu left a comment

Choose a reason for hiding this comment

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

We can figure out what to do with that test case later
/lgtm

@@ -33,6 +33,11 @@ var _ = Describe("[Upgrade]", func() {

table.DescribeTable("[rfe_id:5493]DV status.name is populated after upgrade", func(dvName string) {
Copy link
Collaborator

@akalenyu akalenyu Sep 15, 2022

Choose a reason for hiding this comment

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

We should consider removing the test case altogether since we no longer "encourage" looking at DVs after they're done.
Or we could keep this test but change it to just ensure upgraded DVs are not GC'd if they shouldn't be

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2022
On the next kubevirt-bot Bump kubevirtci PR (with bump-cdi), it will
fail on all kubevirtci lanes with tests referring DVs, as the tests
IsDataVolumeGC() looks at CDIConfig Spec.DataVolumeTTLSeconds and
assumes default is disabled. This should be fixed there.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 15, 2022
Copy link
Contributor

@brybacki brybacki left a comment

Choose a reason for hiding this comment

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

I do not see any problems, looks good

@@ -4961,7 +4961,7 @@
"type": "object",
"properties": {
"dataVolumeTTLSeconds": {
"description": "DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected.",
"description": "DataVolumeTTLSeconds is the time in seconds after DataVolume completion it can be garbage collected. The default is 0 sec. To disable GC use -1.",
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2022
@kubevirt-bot kubevirt-bot merged commit f58723d into kubevirt:main Sep 16, 2022
@brybacki
Copy link
Contributor

Maybe you can update the kubevirt test case proactively, before even new kubevirtci is introduced.
For example one could add a logic that configures some default ttl (like -1) before the test suite or something like this, and then just change or remove the logic when we are ready.

I suppose the same way it work with HCO?

@arnongilboa
Copy link
Collaborator Author

Maybe you can update the kubevirt test case proactively, before even new kubevirtci is introduced. For example one could add a logic that configures some default ttl (like -1) before the test suite or something like this, and then just change or remove the logic when we are ready.

I suppose the same way it work with HCO?

Great idea, so simply put 0 instead of false here:
https://github.com/kubevirt/kubevirt/blob/main/hack/cluster-deploy.sh#L24

arnongilboa added a commit to arnongilboa/kubevirt that referenced this pull request Sep 16, 2022
Prevent DV-related CI failures in the next kubevirt-bot kubevirtci
bump PR (with bump-cdi), due to:
kubevirt/containerized-data-importer#2421

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
Barakmor1 pushed a commit to Barakmor1/kubevirt that referenced this pull request Sep 28, 2022
Prevent DV-related CI failures in the next kubevirt-bot kubevirtci
bump PR (with bump-cdi), due to:
kubevirt/containerized-data-importer#2421

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
arnongilboa added a commit to arnongilboa/kubevirt that referenced this pull request Sep 28, 2022
CDI is enabling DataVolume garbage collection by default since:
kubevirt/containerized-data-importer#2421

To prevent DV-related CI failures due to the old GC disabled default
reference, we enabled GC by default for all lanes in cluster-deploy:
kubevirt#8479

With the current fix, we no more need to explicitly enable it by
default in cluster-deploy.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
arnongilboa added a commit to arnongilboa/kubevirt that referenced this pull request Oct 10, 2022
CDI is enabling DataVolume garbage collection by default since:
kubevirt/containerized-data-importer#2421

To prevent DV-related CI failures due to the old GC disabled default
reference, we enabled GC by default for all lanes in cluster-deploy:
kubevirt#8479

With the current fix, we no more need to explicitly enable it by
default in cluster-deploy.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
brianmcarey pushed a commit to brianmcarey/kubevirt that referenced this pull request Oct 11, 2022
CDI is enabling DataVolume garbage collection by default since:
kubevirt/containerized-data-importer#2421

To prevent DV-related CI failures due to the old GC disabled default
reference, we enabled GC by default for all lanes in cluster-deploy:
kubevirt#8479

With the current fix, we no more need to explicitly enable it by
default in cluster-deploy.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
kubevirt-bot pushed a commit to kubevirt-bot/kubevirt that referenced this pull request Oct 19, 2022
CDI is enabling DataVolume garbage collection by default since:
kubevirt/containerized-data-importer#2421

To prevent DV-related CI failures due to the old GC disabled default
reference, we enabled GC by default for all lanes in cluster-deploy:
kubevirt#8479

With the current fix, we no more need to explicitly enable it by
default in cluster-deploy.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
Barakmor1 pushed a commit to Barakmor1/kubevirt that referenced this pull request Oct 26, 2022
CDI is enabling DataVolume garbage collection by default since:
kubevirt/containerized-data-importer#2421

To prevent DV-related CI failures due to the old GC disabled default
reference, we enabled GC by default for all lanes in cluster-deploy:
kubevirt#8479

With the current fix, we no more need to explicitly enable it by
default in cluster-deploy.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
PiotrProkop pushed a commit to PiotrProkop/kubevirt that referenced this pull request Dec 12, 2022
CDI is enabling DataVolume garbage collection by default since:
kubevirt/containerized-data-importer#2421

To prevent DV-related CI failures due to the old GC disabled default
reference, we enabled GC by default for all lanes in cluster-deploy:
kubevirt#8479

With the current fix, we no more need to explicitly enable it by
default in cluster-deploy.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants