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

Bug 2265147: Fix PV validation #200

Open
wants to merge 2 commits into
base: release-4.15
Choose a base branch
from

Conversation

nirs
Copy link

@nirs nirs commented Feb 21, 2024

When comparing PVs, skip comparing unset optional fields. This breaks validation when using
KubeVirt VM, and actual resources in the system do not match the backed up resources in
the s3 store, differing only in the optional "kind" field.

I could not reproduce the mismatch between s3 and actual resources, both
match after deploy and failover. So I would say this issue is not reproducible.

But after creating a mismatch manually by editing the PV claimRef, the issue
was reproduced, and replacing ramen image with the fix solved the issue.

Tested only on drenv environment.

Image for testing: quay.io/nirsof/ramen-operator:release-4.15-validate-pvc-v1

Explain why we need Go 1.20 and how to maintain multiple Go versions so
ramen can be built and tested while using newer default Go version.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
(cherry picked from commit 810d897735515d0574c5328401af10db3e5255a4)
When comparing PVs, skip comparing unset "Spec.ClaimRef.kind". This
breaks validation when using KubeVirt VM, and actual resources in the
system do not match the backed up resources in the s3 store. It is
correct to ignore unset kind since this is an optional field[1].

Previously we failed with:

    Failed to restore PVs: failed to restore ClusterData for VolRep
    (failed to restore PVs and PVCs using profile list
    ([s3profile-perf8-ocs-storagecluster]): failed to restore all
    []v1.PersistentVolume. Total/Restored 1/0)

And then the VRG will not make any progress. Now we consider unset
"kind" as equal and continue the flow normally.

[1] https://github.com/kubernetes/api/blob/f3648a53522eb60ea75d70d36a50c799f7e4e23b/core/v1/types.go#L6381

Bug: https://bugzilla.redhat.com/2265147
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
(cherry picked from commit c05e32b0ef90020200a4387e29aab38dec637d6a)
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
Copy link

openshift-ci bot commented Feb 21, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nirs

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

Copy link

openshift-ci bot commented Feb 21, 2024

@nirs: This pull request references Bugzilla bug 2265147, which is invalid:

  • expected the bug to target the "ODF 4.15.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2265147: Release 4.15 validate pvc

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/test-infra repository.

1 similar comment
Copy link

openshift-ci bot commented Feb 21, 2024

@nirs: This pull request references Bugzilla bug 2265147, which is invalid:

  • expected the bug to target the "ODF 4.15.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2265147: Release 4.15 validate pvc

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/test-infra repository.

@nirs nirs changed the title Bug 2265147: Release 4.15 validate pvc Bug 2265147: Fix PV validation Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants