Skip to content

OCPBUGS-44377: Add migration logic for wipe refactor #779

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
Nov 11, 2024

Conversation

suleymanakbas91
Copy link
Contributor

@suleymanakbas91 suleymanakbas91 commented Nov 8, 2024

This PR introduces migration logic for updates to the wipe feature in version 4.17. Previously, the LVM Operator used the LVMVolumeGroupNodeStatus resource to verify if a device was wiped—if the device appeared in a VG under LVMVGStatus, it was considered wiped. In 4.17, we refactored this approach to rely on the wiped.devices.lvms.openshift.io annotation within an LVMVolumeGroup, indicating whether all devices in the VG have been wiped. However, during upgrades from 4.16 to 4.17 or 4.18, the LVM Operator would re-wipe devices due to the missing annotation. This migration logic resolves that by checking existing LVMVolumeGroupNodeStatus resources in the operator namespace and applying the necessary annotations to LVMVolumeGroups.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 8, 2024
Copy link
Contributor

openshift-ci bot commented Nov 8, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@suleymanakbas91 suleymanakbas91 changed the title fix: add a migration logic for wipe refactor OCPBUGS-44377: Add migration logic for wipe refactor Nov 8, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 8, 2024
@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 8, 2024
@openshift-ci-robot
Copy link

@suleymanakbas91: This pull request references Jira Issue OCPBUGS-44377, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @mmakwana30

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

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 requested a review from mmakwana30 November 8, 2024 17:29
Copy link
Contributor

openshift-ci bot commented Nov 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: suleymanakbas91

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2024
@suleymanakbas91
Copy link
Contributor Author

/test all

@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 8 lines in your changes missing coverage. Please review.

Project coverage is 69.54%. Comparing base (9ea56e1) to head (6dc6355).

Files with missing lines Patch % Lines
internal/migration/wipe-refactor/annotate.go 77.77% 4 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #779      +/-   ##
==========================================
+ Coverage   69.45%   69.54%   +0.08%     
==========================================
  Files          49       50       +1     
  Lines        3415     3451      +36     
==========================================
+ Hits         2372     2400      +28     
- Misses        861      865       +4     
- Partials      182      186       +4     
Files with missing lines Coverage Δ
internal/migration/wipe-refactor/annotate.go 77.77% <77.77%> (ø)

@openshift-ci-robot
Copy link

@suleymanakbas91: This pull request references Jira Issue OCPBUGS-44377, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @mmakwana30

In response to this:

This PR introduces migration logic for updates to the wipe feature in version 4.17. Previously, the LVM Operator used the LVMVolumeGroupNodeStatus resource to verify if a device was wiped—if the device appeared in a VG under LVMVGStatus, it was considered wiped. In 4.17, we refactored this approach to rely on the wiped.devices.lvms.openshift.io annotation within an LVMVolumeGroup, indicating whether all devices in the VG have been wiped. However, during upgrades from 4.16 to 4.17 or 4.18, the LVM Operator would re-wipe devices due to the missing annotation. This migration logic resolves that by checking existing LVMVolumeGroupNodeStatus resources in the operator namespace and applying the necessary annotations to LVMVolumeGroups.

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.

@suleymanakbas91 suleymanakbas91 marked this pull request as ready for review November 11, 2024 09:28
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 11, 2024
@suleymanakbas91
Copy link
Contributor Author

/hold for further testing

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2024
Copy link
Contributor

openshift-ci bot commented Nov 11, 2024

@suleymanakbas91: 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.

@qJkee
Copy link
Contributor

qJkee commented Nov 11, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2024
@suleymanakbas91
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 19dca44 into openshift:main Nov 11, 2024
11 checks passed
@openshift-ci-robot
Copy link

@suleymanakbas91: Jira Issue OCPBUGS-44377: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-44377 has been moved to the MODIFIED state.

In response to this:

This PR introduces migration logic for updates to the wipe feature in version 4.17. Previously, the LVM Operator used the LVMVolumeGroupNodeStatus resource to verify if a device was wiped—if the device appeared in a VG under LVMVGStatus, it was considered wiped. In 4.17, we refactored this approach to rely on the wiped.devices.lvms.openshift.io annotation within an LVMVolumeGroup, indicating whether all devices in the VG have been wiped. However, during upgrades from 4.16 to 4.17 or 4.18, the LVM Operator would re-wipe devices due to the missing annotation. This migration logic resolves that by checking existing LVMVolumeGroupNodeStatus resources in the operator namespace and applying the necessary annotations to LVMVolumeGroups.

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.

@suleymanakbas91
Copy link
Contributor Author

/cherry-pick release-4.17

@openshift-cherrypick-robot

@suleymanakbas91: new pull request created: #781

In response to this:

/cherry-pick release-4.17

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants