-
Notifications
You must be signed in to change notification settings - Fork 27
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
OCPBUGS-37300: Fix forced reinit issue #619
base: master
Are you sure you want to change the base?
Conversation
This commit resolves issues in GetRemovedNodeHoldoffAnnotation and GetAddedNodeHoldoffAnnotation related to managing the holdoff annotation for FileIntegrity nodes. Previously, node removal could fail in cases where the node to be removed was at the beginning, middle, or end of a comma separated list due to incorrect string manipulation.
@Vincent056: This pull request references Jira Issue OCPBUGS-37300, which is invalid:
Comment 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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Vincent056 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 |
@Vincent056: The following test failed, say
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a reasonable change. Is there a way to force the operator into a state where it needs to exercise this code in an e2e test?
return ficopy.Annotations, true | ||
} | ||
|
||
AddedNode := strings.TrimSpace(nodeName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We could adjust the visibility of this since it's only used in this function.
|
||
// Check if nodeName is already in the list | ||
for _, n := range nodes { | ||
if strings.EqualFold(strings.TrimSpace(n), AddedNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this where the main issue was? Otherwise, most of the logic looks the same, just in a different order, but here we changed the comparison from using strings.Contains
to iterating the entire list of nodes and comparing them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main issue was because https://github.com/openshift/file-integrity-operator/pull/619/files#diff-a3206732c69662d901d8e5ccf08d084332c8dbfb58c67996b5bb9ec5b6ed4425L164, the replace is not correct
@Vincent056 I deployed the fio operator from this PR #619. Two test scenarios tested. Both passed.
Scenario 2:
|
/label qe-approved |
/jira refresh |
@xiaojiey: This pull request references Jira Issue OCPBUGS-37300, which is invalid:
Comment 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. |
/jira refresh |
@xiaojiey: This pull request references Jira Issue OCPBUGS-37300, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
This commit resolves issues in
GetRemovedNodeHoldoffAnnotation
andGetAddedNodeHoldoffAnnotation
related to managing the holdoff annotation forFileIntegrity
Object. Previously, node removal could fail in cases where the node to be removed was at the beginning, middle, or end of a comma separated list due to incorrect string manipulation.