-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[system test] Fix downgrade procedure #11154
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: see-quick <maros.orsak159@gmail.com>
/azp run upgrade |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Switch makes sense as reflected in the docs
If you did this, it would not have worked - at least until #10929 is included in the older CO version - so I'm not sure this PR / the old code was really doing what you say it is doing. |
where specifically should it fail? |
If you dongrade the CO without downgrading Kafka first, then either the Kafka cluster will run unknown Kafka version and it will get stuck. Or it runs already supported Kafka version and then you did everything correctly and there is no reason to change anything in the procedure. |
Hmmm, the current way how we do it is that the Kafka version at the start of the downgrade procedure is metadataVersion: "3.8"
version: 3.8.0 Should we start from |
Well, you skip the first step and start with the oldest version because:
But that does not mean you are somehow not in sync with the docs and that there is anything to change just because of the docs change. |
Wdym? I am lost now. Do we already have a test for the right order downgrade? Assuming you have Kafka 3.9 (with metadata 3.8) and you want to downgrade, we should have a test doing: downgrade Kafka from 3.9 to 3.8 (which is still possible because using 3.8 metadata) and then the operator. The documentation describes the correct order now. Of course, as you said downgrading Kafka is possible only if the metadata is (already) "older" and supported. |
There are few things we are doing as preparation before running the downgrade test-case:
In the code we then do this:
where the
That's why we have it like that. You can change the IIRC we had discussion around this before and with the way how it is now we are verifying that the older CO will handle the rolling update of the supported version of Kafka once it (CO) is downgraded. Because downgrade of Kafka version is anyway handled, as @scholzj mentioned, in different tests - So maybe - it's just my opinion - we can remove the upgrade/downgrade of Kafka from there - because it's anyway handled somewhere else. We can then just pick the oldest supported version by the current (latest) CO and deploy that one. |
@scholzj @ppatierno Any thoughts on this? |
@see-quick Sorry, I'm not really sure I understand what that means in relation to the test, sorry. |
We would remove this part of the code from upgrade and downgrade procedures within the Lines 158 to 160 in 2018b84
and we will simply just do an upgrade/downgrade of the Strimzi Operator with the same versions of the components. But as Lukas pointed out we do upgrade/downgrade of Kafka version in |
TBH, I guess I'm a bit confused. This PR started with |
TBH I was a bit confused as well when reading the comments. But as I went through the code and also read through the comments, I realized that we are doing the upgrade/downgrade of Kafka anyway inside the So my idea or opinion was to remove the Kafka downgrade step from the Same situation would be if we would change the order and deploy Kafka, do the downgrade of Kafka and then downgrading the CO. It's just added step which is covered by different set of tests. That's why it changed from |
@im-konge Ok, that makes sense I guess. |
Type of change
Description
This PR refactors our Strimzi upgrade/downgrade procedures. It also changes the downgrade process (motivated by [1]). Previously, we downgraded the CO first, then Kafka. In this PR, I reverse that order.
[1] - #11144.
Checklist