Skip to content

[release-4.16] OCPBUGS-32887: Delete and recreate canary route to clear spec.host#1099

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.16from
Miciah:cherry-pick-1095-to-release-4.16
Jul 12, 2024
Merged

[release-4.16] OCPBUGS-32887: Delete and recreate canary route to clear spec.host#1099
openshift-merge-bot[bot] merged 1 commit intoopenshift:release-4.16from
Miciah:cherry-pick-1095-to-release-4.16

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Jul 2, 2024

Fix the update logic for the canary route to handle clearing spec.host. Attempts to clear spec.host using a simple update may be ignored (see openshift/origin@54c072c). Therefore it is necessary to delete and recreate the route.

Before this change, the operator would set spec.subdomain, but it did not actually clear spec.host, and so setting spec.subdomain had no effect.

After this change, the operator should clear spec.host, and spec.subdomain should be in effect.

Follow-up to #1047.


This is manual cherry-pick of #1095. #978 added the TestCanaryWithMTLS test to test/e2e/all_test.go in the release-4.17 branch, and this test is not in the release-4.16 branch, so it caused a conflict for this backport that required manual resolution.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 2, 2024
@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-32887, which is invalid:

  • expected dependent Jira Issue OCPBUGS-36465 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Fix the update logic for the canary route to handle clearing spec.host. Attempts to clear spec.host using a simple update may be ignored (see openshift/origin@54c072c). Therefore it is necessary to delete and recreate the route.

Before this change, the operator would set spec.subdomain, but it did not actually clear spec.host, and so setting spec.subdomain had no effect.

After this change, the operator should clear spec.host, and spec.subdomain should be in effect.

Follow-up to #1047.


This is manual cherry-pick of #1095. #978 added the TestCanaryWithMTLS test to test/e2e/all_test.go in the release-4.17 branch, and this test is not in the release-4.16 branch, so it caused a conflict for this backport that required manual resolution.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from knobunc and rfredette July 3, 2024 00:00
@Miciah Miciah changed the title OCPBUGS-32887: Delete & recreate canary route to clear spec.host [release-4.16] OCPBUGS-32887: Delete & recreate canary route to clear spec.host Jul 3, 2024
@Miciah Miciah changed the title [release-4.16] OCPBUGS-32887: Delete & recreate canary route to clear spec.host [release-4.16] OCPBUGS-32887: Delete and recreate canary route to clear spec.host Jul 3, 2024
@Miciah
Copy link
Contributor Author

Miciah commented Jul 3, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@Miciah: This pull request references Jira Issue OCPBUGS-32887, which is invalid:

  • expected dependent Jira Issue OCPBUGS-36465 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is POST instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

Fix the update logic for the canary route to handle clearing spec.host.
Attempts to clear spec.host using a simple update may be ignored[1].
Therefore it is necessary to delete and recreate the route.

1. openshift/origin@54c072c

Before this commit, the operator would set spec.subdomain, but it did not
actually clear spec.host, and so setting spec.subdomain had no effect.

After this commit, the operator should clear spec.host, and spec.subdomain
should be in effect.

Follow-up to commit 77c61ba.

This commit is related to OCPBUGS-36465.

https://issues.redhat.com/browse/OCPBUGS-36465

* pkg/operator/controller/canary/route.go (updateCanaryRoute): Delete and
recreate the route in order to clear spec.host.
(deleteCanaryRoute): Add an options parameter for updateCanaryRoute to use.
* test/e2e/canary_test.go (TestCanaryRouteClearsSpecHost): New test.
Verify that the operator clears spec.host if it is set on the canary route.
* test/e2e/all_test.go (TestAll): Add TestCanaryRouteClearsSpecHost as a
serial test.
@Miciah Miciah force-pushed the cherry-pick-1095-to-release-4.16 branch from 2e1e6f9 to 2929231 Compare July 3, 2024 00:22
@Miciah
Copy link
Contributor Author

Miciah commented Jul 3, 2024

@melvinjoseph86
Copy link

/test e2e-aws-ovn-serial

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 3, 2024

@Miciah: all tests passed!

Full PR test history. Your PR dashboard.

Details

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

@candita
Copy link
Contributor

candita commented Jul 10, 2024

/assign

@candita
Copy link
Contributor

candita commented Jul 10, 2024

Backport is required because the original bug OCPBUGS-36465 was found in version 4.14 and disrupts upgrades from 4.13 to 4.14. Any risk introduced by this fix is balanced against the improvement in the success of 4.14 upgrades.

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jul 10, 2024
@candita
Copy link
Contributor

candita commented Jul 10, 2024

Dependency on #1095

@candita
Copy link
Contributor

candita commented Jul 10, 2024

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: candita

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2024
@candita
Copy link
Contributor

candita commented Jul 10, 2024

/tide refresh

@melvinjoseph86
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jul 11, 2024
@candita
Copy link
Contributor

candita commented Jul 11, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@candita: This pull request references Jira Issue OCPBUGS-32887, which is invalid:

  • expected dependent Jira Issue OCPBUGS-36465 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@candita
Copy link
Contributor

candita commented Jul 12, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@candita: This pull request references Jira Issue OCPBUGS-32887, which is invalid:

  • expected dependent Jira Issue OCPBUGS-36465 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@melvinjoseph86
Copy link

Using the pre-image build,

  1. Created a build using this PR (4.16.0-0.ci.test-2024-07-12-124608-ci-ln-v3xktpk-latest)
  2. Upgrade a 4.13 cluster first to 4.14 nightly and then upgrade to 4.15 nightly
  3. Then again upgrade to the build create with this PR (4.16.0-0.ci.test-2024-07-12-124608-ci-ln-v3xktpk-latest)
    Didn't see error messages in the ingress operator logs related to the canary route

hence marking the bugs are verified
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jul 12, 2024
@melvinjoseph86
Copy link

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 12, 2024
@openshift-ci-robot
Copy link
Contributor

@melvinjoseph86: This pull request references Jira Issue OCPBUGS-32887, which is valid.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.z) matches configured target version for branch (4.16.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-36465 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-36465 targets the "4.17.0" version, which is one of the valid target versions: 4.17.0
  • bug has dependents

Requesting review from QA contact:
/cc @melvinjoseph86

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from melvinjoseph86 July 12, 2024 16:02
@openshift-merge-bot openshift-merge-bot bot merged commit af5d3f6 into openshift:release-4.16 Jul 12, 2024
@openshift-ci-robot
Copy link
Contributor

@Miciah: Jira Issue OCPBUGS-32887: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-32887 has been moved to the MODIFIED state.

Details

In response to this:

Fix the update logic for the canary route to handle clearing spec.host. Attempts to clear spec.host using a simple update may be ignored (see openshift/origin@54c072c). Therefore it is necessary to delete and recreate the route.

Before this change, the operator would set spec.subdomain, but it did not actually clear spec.host, and so setting spec.subdomain had no effect.

After this change, the operator should clear spec.host, and spec.subdomain should be in effect.

Follow-up to #1047.


This is manual cherry-pick of #1095. #978 added the TestCanaryWithMTLS test to test/e2e/all_test.go in the release-4.17 branch, and this test is not in the release-4.16 branch, so it caused a conflict for this backport that required manual resolution.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-ingress-operator-container-v4.16.0-202407121806.p0.gaf5d3f6.assembly.stream.el9 for distgit ose-cluster-ingress-operator.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-07-13-011932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants