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 1854651: [release 4.5] backport pr 618 - fix segfault #623

Conversation

obnoxxx
Copy link
Contributor

@obnoxxx obnoxxx commented Jul 8, 2020

This backports PR #618 (and as prerequisite also the innocuous pr #567).
This is needed to fix a nil pointer dereference segfault in newStorageClassDeviceSets when an empty LabelSelector was provided in the StorageCluster CR.

See https://bugzilla.redhat.com/show_bug.cgi?id=1854651

anubhav-here-zz and others added 5 commits July 9, 2020 00:45
Signed-off-by: Anubhav Deep <adeep@redhat.com>
(cherry picked from commit 48be5cf)
The value of StorageCluster.Spec.LabelSelector was not being properly appended
to the generated Placements of the OCS components.Specifically, adding a new
NodeSelectorTerm results in a selector term thatis ORed with any other terms,
whereas adding a newNodeSelectorRequirement to an existing NodeSelectorTerm
would result in an AND of all requirements in that term. This commit makes it
so the LabelSelector field is ANDed with any other existing node selectors in
the Placement.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
(cherry picked from commit 3d9f406)
…lector

There was a segfault (nil pointer dereference) in newStorageClassDeviceSets.
This test case runs into it. Adding it after the fix so that we don't
regress.

Signed-off-by: Michael Adam <obnox@redhat.com>
(cherry picked from commit 7d286ae)
Only set the default node affinity if both the LabelSelector and the
Placement's NodeAffinity are nil. This is because we don't want to
override the configured NodeAffinity in all cases where the
LabelSelector is nil.

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
(cherry picked from commit 29def16)
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
(cherry picked from commit 4196b60)
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jul 8, 2020
@openshift-ci-robot
Copy link

@obnoxxx: This pull request references Bugzilla bug 1854651, which is invalid:

  • expected Bugzilla bug 1854651 to depend on a bug targeting a release in 4.6.0, 4.6.z and in one of the following states: MODIFIED, ON_QA, VERIFIED, but no dependents were found

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 1854651: [release 4.5] backport pr 618 - fix segfault

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jul 8, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2020
@obnoxxx obnoxxx added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jul 8, 2020
@obnoxxx obnoxxx removed the request for review from egafford July 8, 2020 22:56
@obnoxxx
Copy link
Contributor Author

obnoxxx commented Jul 8, 2020

@JohnStrunk FYI

@jarrpa
Copy link
Member

jarrpa commented Jul 8, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jarrpa, obnoxxx

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2020
@openshift-merge-robot openshift-merge-robot merged commit 2a1154e into red-hat-storage:release-4.5 Jul 9, 2020
@openshift-ci-robot
Copy link

@obnoxxx: All pull requests linked via external trackers have merged: openshift/ocs-operator#623. Bugzilla bug 1854651 has been moved to the POST state.

In response to this:

Bug 1854651: [release 4.5] backport pr 618 - fix segfault

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.

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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants