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

check CSV phase to be succeeded for container readiness #506

Closed
wants to merge 3 commits into from

Conversation

leelavg
Copy link
Contributor

@leelavg leelavg commented Nov 15, 2024

odf-operator creates subscription for odf-dependencies and CRDs will become available once respective CSVs are present in the cluster. We check the phase of respective CSVs which are required for odf-op before becoming ready.

Depends on #503

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
(cherry picked from commit 87ac048)
Copy link

This PR/issue depends on:

@leelavg leelavg force-pushed the readiness-probe branch 3 times, most recently from 7adfdf3 to 0ba41f3 Compare November 15, 2024 09:58
Copy link
Member

@iamniting iamniting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pls correct the description of commit, It is still referring to the old logic.

main.go Outdated
Comment on lines 175 to 178
// console plugin is dependent on CRDs that are part of these CSVs and we
// can't check for only odf-dependencies CSV as OLM doesn't guarantee
// (based on observations) existence of all CRDs brought by OLM dependency
// mechanism.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// console plugin is dependent on CRDs that are part of these CSVs and we
// can't check for only odf-dependencies CSV as OLM doesn't guarantee
// (based on observations) existence of all CRDs brought by OLM dependency
// mechanism.
// The console plugin depends on CRDs provided by these CSVs.
// Checking only the odf-dependencies CSV is insufficient,
// because, based on observations, the presence of all required CRDs
// is not guaranteed even when the odf-dependencies CSV is in a succeeded state.

}
if len(csvMap) != 0 {
for csvName := range csvMap {
return fmt.Errorf("CSV %s is not found", csvName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will just return only first one. The loop will only run once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that'll still be fine, isn't it? we just aren't ready.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What i mean to say here is we can just return the first item if the list is not empty, we don't need a loop.

Copy link
Contributor

openshift-ci bot commented Nov 15, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: leelavg
Once this PR has been reviewed and has the lgtm label, please ask for approval from iamniting. For more information see the Kubernetes Code Review Process.

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

@iamniting
Copy link
Member

I am adding the screenshot of the observation here for future reference that just checking the odf-dependencies csv is not enough.

Screenshot from 2024-11-15 16-29-40

@leelavg leelavg force-pushed the readiness-probe branch 3 times, most recently from 295224e to 27da06f Compare November 15, 2024 11:26
odf-operator creates subscription for odf-dependencies and CRDs will
become available once respective CSVs are present in the cluster. We
check the phase of respective CSVs which are required for odf-op before
becoming ready.

Signed-off-by: Leela Venkaiah G <lgangava@ibm.com>
90s for timeout is choosen based on a couple of observations that it
took around a minute for InstallPlan to be realised as CSVs on the
cluster.

Signed-off-by: Leela Venkaiah G <lgangava@ibm.com>
Copy link
Contributor

openshift-ci bot commented Nov 15, 2024

@leelavg: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/odf-operator-e2e-aws 27da06f link true /test odf-operator-e2e-aws

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.

@iamniting
Copy link
Member

These commits are merged as part of #499. I am closing this.

@iamniting iamniting closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants