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

[release-1.32] Add bash script to downgrade kafka contracts and run as part of downgrade tests #2554

Conversation

creydr
Copy link
Member

@creydr creydr commented Mar 8, 2024

Same as #2553, but includes the linter fixes.

Credits go to @Cali0707!

/cc @Cali0707 @matzew

@openshift-ci openshift-ci bot requested review from Cali0707 and matzew March 8, 2024 07:23
@mgencur
Copy link
Contributor

mgencur commented Mar 8, 2024

Hey, this looks great! It will make testing much easier.

One question: The code modifies a config map in knative-eventing NS. Will this be later overwritten/reconciled by the operator to the original value? Or not. Thanks

@matzew
Copy link
Member

matzew commented Mar 8, 2024

That is a GOOD question

@creydr
Copy link
Member Author

creydr commented Mar 8, 2024

One question: The code modifies a config map in knative-eventing NS. Will this be later overwritten/reconciled by the operator to the original value? Or not. Thanks

Not sure if I understood you correctly, but the downgraded kafka-controller knows only the left fields in the contract. Or which component do you mean to reconcile the configmaps?

I am only a bit wondering about the order we execute this. Currently we do this, before we know that the new/old (1.10) operator is fully running:

if err := downgradeKafkaContractsWithScript(); err != nil {
return fmt.Errorf("failed to downgrade contracts: %w", err)
}
if _, err := v1alpha1.WaitForKnativeKafkaState(ctx,
"knative-kafka",
knativeEventing,
v1alpha1.IsKnativeKafkaWithVersionReady(strings.TrimPrefix(test.Flags.KafkaVersionPrevious, "v")),
); err != nil {
return fmt.Errorf("knative kafka downgrade failed: %w", err)
}

So IIUC we could have the case, that we update the configmaps while still the 1.11 kafka-controller running and reconciling the configmaps back to include the trustBundles fields 🤔 (but I saw @Cali0707 changing this in 8136b0d 🤷 )

@matzew
Copy link
Member

matzew commented Mar 8, 2024

I think the question was, if the Serverless Operator (owing those CMs, b/c applying them), is not reverting the change of the script.

@matzew
Copy link
Member

matzew commented Mar 8, 2024

But, didn't we also notice that even on the stuck situation, on a broker cluster, things start to work just fine again, if the reconcilation is triggered? e.g. as we provided manually a new Broker or KafkaSink on our servers?

When we did that the CM was completely untouched. So, I guess, that's fine? But not sure

But we are not in a rush here to merge this

@mgencur
Copy link
Contributor

mgencur commented Mar 8, 2024

But, didn't we also notice that even on the stuck situation, on a broker cluster, things start to work just fine again, if the reconcilation is triggered?

That's true. Anyway, the upgrade tests should show if this works. I'd probably run them at least twice on this PR.

@matzew
Copy link
Member

matzew commented Mar 8, 2024

@mgencur the kafka-broker-brokers-triggers CM has no ownerReferences: set

Copy link
Contributor

openshift-ci bot commented Mar 8, 2024

@creydr: 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/414-upstream-e2e-kafka-aws-414 ca3472c link false /test 414-upstream-e2e-kafka-aws-414

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/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Mar 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, matzew

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:

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

@openshift-ci openshift-ci bot added the approved label Mar 8, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 1d312db into openshift-knative:release-1.32 Mar 8, 2024
20 of 21 checks passed
@Cali0707
Copy link
Member

Cali0707 commented Mar 8, 2024

So IIUC we could have the case, that we update the configmaps while still the 1.11 kafka-controller running and reconciling the configmaps back to include the trustBundles fields 🤔 (but I saw @Cali0707 changing this in 8136b0d 🤷 )

@matzew I don't think that commit was necessary - basically the tests were failing for me on the cluster I was using to test and I wasn't sure why, so I was trying some stuff out and I forgot to revert that commit. I don't think that the order change fixed anything though. I guess there is a risk that the timing might work out so that the 1.11 kafka-controller re reconciles the configmap after the script runs

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.

None yet

4 participants