-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Run bundle and upgrade bundle does not work when the bundles is not added to default channel #5773
Comments
Hi @rashmigottipati, and @jmrodri, I tried to centralise all only a task after checking this scenario. This shows that the required changes in the commands to support FBC might also be an option to solve this scenario at least when a user does not provide as arg an index using SQL format. c/c @VenkatRamaraju |
@asmacdo @rashmigottipati is a bug. Could we add here the bug label? |
Thanks @camilamacedo86 for steering it |
@J0zi @camilamacedo86 PR #5809 was merged into master. This adds support for FBC images and I believe this addition should resolve your issue as well. |
I ran the bundle provided in the description against latest master and it successfully installed the CSV. Below are the logs: |
@rashmigottipati #5616 was not fixed.
or
or even production
|
/assign |
So I did some digging and here are my findings: When using:
It was able to successfully install the operator on the cluster. When going to upgrade the bundle with:
The command stalls and never completes. The bundle is not properly upgraded. Doing some further debugging I was able to determine that the point in the source that stalls when running
This filters down to the operator-sdk/internal/olm/fbcutil/util.go Lines 136 to 139 in 76ac4ba
Debugging even further resulted in noticing that when using the operator-framework/operator-registry library to create the new registry it uses the package https://pkg.go.dev/go.etcd.io/bbolt and attempts to Debugging even deeper down the dependency tree I found that the point in which everything is stalling is due to the attempt to lock the .db file in the bbolt library here: https://github.com/etcd-io/bbolt/blob/fd5535f71f488dda0915f610b6ca8c77c9ca2c59/db.go#L223-L233 We can see that the As far as I could tell, the problem was able to be resolved when the name of the .db file used to create the registry is different (right now it is always the same default value of
Once those are done we can attempt to make modifications to the FBC upgrade logic that takes advantage of the new functionality. @jmrodri since you were also looking a bit into this, WDYT? |
So the above comment is definitely an issue at the moment because when a fix is applied I am able to use @J0zi I suspect for the production operators you mentioned running:
That you encountered the issue of the command just hanging. Is this correct? After fixing the command it no longer stalls and is able to run and upgrade that production operator no problem. As far as the other commands I noticed something else (after fixing the command stalling problem) - the default channel being used in the images from I hope this makes sense and clears up any confusion - if not, please let me know and I can put together a more detailed response with examples. I will work on fixing the issue where the |
So we are waiting for another release of |
@everettraven @rashmigottipati please reopen I have tested it and cannot say if update issue was solved because even run bundle is now broken. So we cannot test operator upgrade and this remains a blocker. We cannot run any bundle at all.
To successfully fix all issues following should work #5773 (comment) |
Reopening as per @J0zi |
@J0zi I will take another look at this and report back what I find |
@J0zi So I took a look at this and ran all the same commands you did and for the most part ran into the same errors. The only exception I found was that I was able to successfully install flux with My suspicion as to why the subsequent I'm planning to investigate this further by changing the default behavior to create a new To confirm that the aqua operator was able to be run successfully in a namespace without that
|
@J0zi So doing another bit of investigation, it seems it is not possible to have multiple This makes me think that installing all of these particular operators in the same namespace would have failed anyways because the I think the solution in this case is to install both the I hope this helps! |
@everettraven thank you very much for your investigation. I tested multiple operators and upgrade is working. So we can implement it to our pipelines :) |
Closing as per #5773 (comment) |
@everettraven we encountered following issue with upgrade:
|
@J0zi This issue specifically seems to be related to the bundle being to large to fit into a This is something that we have seen before. IIRC we did implement a change that helps alleviate this slightly but it isn't perfect and is still prone to this problem. Would you mind opening a new issue with this problem so we can track it separately and have it show up in our next issue triage meeting? This will help it get some more visibility and allow us to have some further discussion on how we can attempt to resolve this. |
@everettraven we will continue here #6144 |
Bug Report
The command run bundle and upgrade bundle will fail when the bundle informed is not configured to be in its default channel:
By default, the commands create a new index and try to add the bundle to it. So, when SDK call OPM, it fails in:
https://github.com/operator-framework/operator-registry/blob/v1.22.0/pkg/sqlite/load.go#L426-L428
https://github.com/operator-framework/operator-registry/blob/fd85a98cd00fdd70e30ce6e7076ea37e2583e724/pkg/sqlite/loadprocs.go#L118-L131
What did you do?
Following the steps
And then, by checking the bundle logs: (kubectl logs pod/quay-io-operatorhubio-hive-operator-v2-5-3508-6cb94c6)
Also, we found the same above issue by using the
operator-sdk run bundle-upgrade
, see: https://github.com/k8s-operatorhub/community-operators/runs/6364587418?check_suite_focus=true#step:3:7120 (More info: k8s-operatorhub/community-operators#1195 )What did you expect to see?
The bundle and upgrade bundle working.
What did you see instead? Under which circumstances?
The bundle is not shipped in the default channel. ( The following issues were closed in favor of this one so we can try to centralize the info )
Possible Solution
SDK commands replace the info provided via the default channel with `` when an index is not formed. So that OPM will not try to update it. Unless a user provides the index to the commands, their motivation with them would not be impacted:
Workarounds:
For SDK users that are using it to test the bundle locally
For CI/pipelines:
The workaround would be to generate a different temporary bundle adding the default channel to channels. So, this channel would be created in the operator registry; see that all channels will be created or updated before we try to set the default channel: https://github.com/operator-framework/operator-registry/blob/v1.22.0/pkg/sqlite/load.go#L419-L429.
Additional context
The text was updated successfully, but these errors were encountered: