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

start go routines after cs controller manager setup #2333

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

Daniel-Fan
Copy link
Contributor

What this PR does / why we need it:
Given there are multiple receivers(multiple go routines) on a single channel ch := make(chan *bootstrap.Bootstrap) and we are only sending one data into the channel ch <- bs, only a single random go routines will receive the data, and unblock the code. See this article for details

Thus, it is complicated to use the same single channel for multiple go routines. Instead we just start go routines after cs controller manager is set properly.

Which issue(s) this PR fixes:
Fixes https://github.ibm.com/IBMPrivateCloud/roadmap/issues/65568

Test

After applying the dev build image docker-na-public.artifactory.swg-devops.com/hyc-cloud-private-scratch-docker-local/ibmcom/common-service-operator-amd64:dev, the CS operator will have following sequence

  1. Set CS controller manager
  2. Start go routines
    • Create default CS CR
    • There is no error message about unknown caches.
I1211 04:30:24.580267 1 main.go:131] Identifying Common Service Operator Role in the namespace cd-daily
I1211 04:30:24.610292 1 init.go:160] Single Deployment Status: false, MultiInstance Deployment status: true, SaaS Depolyment Status: false
I1211 04:30:31.118084 1 request.go:601] Waited for 1.046241127s due to client-side throttling, not priority and fairness, request: GET:https://172.30.0.1:443/apis/db2ubnr.databases.ibm.com/v1alpha1?timeout=32s
I1211 04:30:40.975386 1 main.go:158] Setup commonservice manager
I1211 04:30:42.026625 1 request.go:601] Waited for 1.046418127s due to client-side throttling, not priority and fairness, request: GET:https://172.30.0.1:443/apis/machine.openshift.io/v1?timeout=32s
I1211 04:30:46.427900 1 main.go:168] Start go routines
I1211 04:30:46.428201 1 waitToCreateCsCR.go:33] Start to Create CommonService CR in the namespace cd-daily

Copy link
Contributor

@YCShen1010 YCShen1010 left a comment

Choose a reason for hiding this comment

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

/lgtm

@ibm-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Daniel-Fan, YCShen1010

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:
  • OWNERS [Daniel-Fan,YCShen1010]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ibm-ci-bot ibm-ci-bot merged commit 6553723 into IBM:master Dec 11, 2024
4 of 9 checks passed
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.

3 participants