-
Notifications
You must be signed in to change notification settings - Fork 16
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
EVEREST-1182 fix install of everest operator #461
EVEREST-1182 fix install of everest operator #461
Conversation
We introduced this phase check because OLM has a bug where it sometimes creates duplicate InstallPlans for the same CSV and we found a few cases where the duplicate InstallPlan wasn't reconciled correctly and abandoned by OLM. This abandoned InstallPlan was missing the status field meaning it was also missing the necessary plan to install the operator. Approving this InstallPlan would cause the operator to never be installed. By checking the phase we make sure we will be approving an InstallPlan that is actually ready to be approved. See operator-framework/kubectl-operator#13 for more details on a similar issue.
* EVEREST-1182 fix install of everest operator We introduced this phase check because OLM has a bug where it sometimes creates duplicate InstallPlans for the same CSV and we found a few cases where the duplicate InstallPlan wasn't reconciled correctly and abandoned by OLM. This abandoned InstallPlan was missing the status field meaning it was also missing the necessary plan to install the operator. Approving this InstallPlan would cause the operator to never be installed. By checking the phase we make sure we will be approving an InstallPlan that is actually ready to be approved. See operator-framework/kubectl-operator#13 for more details on a similar issue. * EVEREST-1182 fix idempotency of the install command
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.
Were you able to test if this works?
My understanding was that in most cases, this function returns at line 581, which returns the InstallPlanRef from the subscription - when this happens, the Subscription still points at the malformed InstallPlan, and takes a while to update (basically the for-loop is never executed).
I realised that the Install flow is a bit complicated, and its hard to figure out just by looking which conditions will be triggered and which execution path our code will take 😓
I did test that the install works correctly for the generic case. I'm still unable to replicate the case where the IP was missing the status but I guess this is as good as we'll get at this stage. I'll do some more tests to see if I can catch that case but it hasn't been easy... Yes, the install flow is a bit complicated, we should probably refactor it in following releases. |
Actually, for the everest operator we are setting the startingCSV so it never returns at line 581 because in line 575 we set it. |
If you trace back how the |
Maybe I'm missing something but I don't think that is true. Let's take a closer look... Is the recommended version empty in VS? 🙈 |
If you trace back ever further and see the implementation of |
But then how is it set in the Subscription? I always see it set there... |
My bad, you're right. I missed this line where we're checking if it is everest/pkg/install/install.go Line 231 in e04e882
|
We introduced this phase check because OLM has a bug where it sometimes creates duplicate InstallPlans for the same CSV and we found a few cases where the duplicate InstallPlan wasn't reconciled correctly and abandoned by OLM. This abandoned InstallPlan was missing the status field meaning it was also missing the necessary plan to install the operator. Approving this InstallPlan would cause the operator to never be installed. By checking the phase we make sure we will be approving an InstallPlan that is actually ready to be approved. See operator-framework/kubectl-operator#13 for more details on a similar issue.