-
Notifications
You must be signed in to change notification settings - Fork 19
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
Initialize Mirroring spec to avoid nil pointer exception #241
Initialize Mirroring spec to avoid nil pointer exception #241
Conversation
/hold need to test |
88c6177
to
582e754
Compare
/hold cancel |
ff766cc
to
4937b1c
Compare
if sc.Spec.Mirroring == nil { | ||
sc.Spec.Mirroring = &ocsv1.MirroringSpec{} | ||
} |
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.
Same as above.
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.
This place is different from above, the immediate if condition is raising nil pointer exception
if !utils.ContainsString(sc.Spec.Mirroring.PeerSecretNames, secretName)
so it has to be initialized before this line.
/cc @rewantsoni |
4937b1c
to
e6028f6
Compare
/cherry-pick release-4.18 |
@GowthamShanmugam: once the present PR merges, I will cherry-pick it on top of 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 kubernetes-sigs/prow repository. |
e6028f6
to
74e6939
Compare
/lgtm |
Signed-off-by: Gowtham Shanmugasundaram <[email protected]>
74e6939
to
5cf12a9
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GowthamShanmugam, umangachapagain 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 |
4305a16
into
red-hat-storage:main
@GowthamShanmugam: new pull request created: #242 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 kubernetes-sigs/prow repository. |
OCS operator API dependency has been changed recently,
MirroringSpec is changed to pointer: https://github.com/red-hat-storage/ocs-operator/commit/24092a02c1c1288ac8f96bf89aeb17280fa49d3a#diff-56afead82aaf51a0042[…]ed85210d2b6eed847d3f87R89
So the recent, OCS API dependency on MCO is started breaking with nil pointer exception: https://github.com/red-hat-storage/odf-multicluster-orchestrator/commit/5899bfa27128c0120f5c083a97977d60c0288404#diff-3295df72345[…]8042d9f42d63R734