Skip to content

OCPBUGS-26498: Add UnservableInFutureVersions route status condition type#1722

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
gcs278:OCPBUGS-26498-upgradeable
Feb 2, 2024
Merged

OCPBUGS-26498: Add UnservableInFutureVersions route status condition type#1722
openshift-merge-bot[bot] merged 1 commit intoopenshift:masterfrom
gcs278:OCPBUGS-26498-upgradeable

Conversation

@gcs278
Copy link
Contributor

@gcs278 gcs278 commented Jan 10, 2024

Add UnservableInFutureVersions as a route status condition type. This change allows the router to indicate that a route is using an unsupported configuration and will be unservable in the future. The ingress operator may use this condition to block upgrades.

More details in forum-ocp-updates slack thread and latest updates discussion in forum-api-review slack thread

@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 Jan 10, 2024
@openshift-ci-robot
Copy link

@gcs278: This pull request references Jira Issue OCPBUGS-26498, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

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:

Add Upgradeable as a route status condition type. This functionality allows the router to indicate that a route is not upgradeable. The ingress operator will use this condition to set Upgradeable=False in the cluster operator status.

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
Copy link
Contributor

openshift-ci bot commented Jan 10, 2024

Hello @gcs278! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 10, 2024
@openshift-ci openshift-ci bot requested review from bparees and knobunc January 10, 2024 23:38
// RouteAdmitted means the route is able to service requests for the provided Host
RouteAdmitted RouteIngressConditionType = "Admitted"
// TODO: add other route condition types
// RouteUpgradable indicates the route is upgradeable to the next version of OpenShift
Copy link
Contributor

Choose a reason for hiding this comment

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

please describe what happens if this is false. Is the upgrade stopped? That's a lot of power to give a namespace editor compared a cluster-admin assessing a CVE for instance.

If the upgrade isn't stopped, how do we expect a cluster-admin to avoid accidentally causing this situation?

cc @sdodson

for discussion of how to handle upgradeability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

please describe what happens if this is false. Is the upgrade stopped? That's a lot of power to give a namespace editor compared a cluster-admin assessing a CVE for instance.

I will update code comment soon - the cluster ingress operator will read the route's Upgradeable status and set the cluster operator ingress Upgradeable status which will prevent upgrades. So yes, the route owner can stop an upgrade, agreed.

See https://redhat-internal.slack.com/archives/CEGKQ43CP/p1704894930666179 discussion.

@gcs278 gcs278 changed the title OCPBUGS-26498: Add Upgradeable route status condition type [WIP] OCPBUGS-26498: Add Upgradeable route status condition type Jan 12, 2024
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 12, 2024
@gcs278 gcs278 force-pushed the OCPBUGS-26498-upgradeable branch from ed59e8a to ae9cbbd Compare January 16, 2024 23:18
@gcs278 gcs278 changed the title [WIP] OCPBUGS-26498: Add Upgradeable route status condition type OCPBUGS-26498: Add Upgradeable route status condition type Jan 16, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 16, 2024
@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 Jan 16, 2024
@openshift-ci-robot
Copy link

@gcs278: This pull request references Jira Issue OCPBUGS-26498, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

Details

In response to this:

Add Upgradeable as a route status condition type. This functionality allows the router to indicate that a route is not upgradeable. The ingress operator will use this condition to block upgrades.

More details in slack thread

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 ShudiLi January 16, 2024 23:20
@gcs278
Copy link
Contributor Author

gcs278 commented Jan 16, 2024

@deads2k I'd like to push forward with this change. @Miciah and I discussed the API changes.

We currently have settled on a Upgradeable condition on the route after exploring using Deprecated because Deprecated doesn't exactly imply the route won't be upgradeable (and we want to imply that). We liked the flexibility of Deprecated, in that we could backport further to 4.14 and warn users even earlier. But this would require the ingress operator to parse the condition.reason field, to determine ingress upgradeable status, which seems kludgy.

The other option would be using annotation. That seemed quite kludgy too.

Please advise if you have any concerns or questions.

@gcs278
Copy link
Contributor Author

gcs278 commented Jan 17, 2024

/hold
Actually, NE discussed this again. We discussed in favor of using Deprecated due to its greater flexibility compared to Upgradeable. My assumption that we would need to parse the Deprecated message is not necessarily true (at least, for the initial implementation). I was designing a more generic solution in which we'd have "permanent" code (4.15+) in the ingress operator that would interpret Deprecated conditions and take upgradeable action based on their reason or message.

The solution is to just have the ingress operator upgradeable code temporary, so it only exists in the OCP version N-1 where N is the option (e.g. SHA1) is unsupported. The code would be make an assumption that any Deprecated route status in 4.15 is going to block upgrades via an admin ack.

It becomes more complex if we intend to reuse the deprecated status in the future to determine the co's ingress upgradeable=false because a user could have previously admin-ack'd an SHA1 route and it could still have the deprecated condition. In that case, we have to start parsing the deprecated condition's reason/message to ensure we don't pick up the old SHA1 deprecated condition, which would cause an admin to have to re-ack it. Not the biggest concern, but it's something we can handle later down the road if this scenario ever arises again. CC: @Miciah

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2024
@gcs278 gcs278 force-pushed the OCPBUGS-26498-upgradeable branch from ae9cbbd to 1b5cc84 Compare January 17, 2024 23:01
@openshift-ci-robot
Copy link

@gcs278: This pull request references Jira Issue OCPBUGS-26498, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

Details

In response to this:

Add Deprecated as a route status condition type. This functionality allows the router to indicate that a route is using a deprecated configuration. The ingress operator may use this condition to block upgrades.

More details in slack thread

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.

@gcs278 gcs278 changed the title OCPBUGS-26498: Add Upgradeable route status condition type OCPBUGS-26498: Add Deprecated route status condition type Jan 17, 2024
// TODO: add other route condition types
// RouteDeprecated indicates that the route is using a deprecated configuration that may
// be incompatible with a future version of OpenShift. If this set to true on any route,
// the ingress operator may block upgrades.
Copy link
Member

Choose a reason for hiding this comment

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

micro-nit, feel free to ignore.

If this set to true on any route, the ingress operator may block upgrades.

This seems like an internal implementation detail. In cases where the ingress operator decides to use Deprecated on Routes to drive Upgradeable=False, that Upgradeable ClusterOperator condition is the API talking to the CVO, and the CVO will in turn set Upgradeable=False on ClusterVersion, and that ClusterVersion condition is the API talking to the cluster-admin or other OCP-managing actor. I don't think we need to hint at that possible chain in this Route condition's docs. Instead, we can keep the first sentence explaining the deprecation aspect, which lets Route-admins know that they should be thinking about a config update. And then leave it to the cluster-admin-facing ClusterVersion API to talk about whether we're concerned about anything (including deprecated Route config) to talk to cluster-admins about that aspect.

But also, "may block upgrades" is wiggly enough that I doubt anyone will feel like we are surprising them regardless of whether the ingress operator decides to take any action based on this new Route condition. So no worries if you want to leave this sentence in as a semi-informative bread-crumb.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the info - I remove it as I agree it's an implementation detail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, I forgot to remove this.

@openshift-ci-robot
Copy link

@gcs278: This pull request references Jira Issue OCPBUGS-26498, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @ShudiLi

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

Details

In response to this:

Add Deprecated as a route status condition type. This functionality allows the router to indicate that a route is using a deprecated configuration. The ingress operator may use this condition to block upgrades.

More details in forum-ocp-updates slack thread and latest updates discussion in forum-api-review slack thread

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 Jan 31, 2024

/assign @frobware
/assign @Miciah

@frobware
Copy link
Contributor

frobware commented Feb 1, 2024

/lgtm

// RouteDeprecated indicates that the route is using a deprecated configuration that may
// be incompatible with a future version of OpenShift. If this set to true on any route,
// the ingress operator may block upgrades.
RouteDeprecated RouteIngressConditionType = "Deprecated"
Copy link
Contributor

Choose a reason for hiding this comment

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

The condition should be more assertive of the problem. Deprecated is generally read in a "well someday I'll fix this" and we're actually highlight a security concern that we know will prevent this route from functioning in two versions.

UnservableInFutureVersions could carry a reason and message that we choose for each case where you need this case. The reason and message should emphasize the insecure aspect of the route.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gcs278 gcs278 force-pushed the OCPBUGS-26498-upgradeable branch from 665e988 to ac83b74 Compare February 1, 2024 22:57
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2024
…type

Add UnservableInFutureVersions as a route status condition type. This
change allows the router to indicate that a route is using an
unsupported configuration and will be unservable in the future. The
ingress operator may use this condition to block upgrades.
@gcs278 gcs278 force-pushed the OCPBUGS-26498-upgradeable branch from ac83b74 to 7716002 Compare February 1, 2024 22:58
@gcs278 gcs278 changed the title OCPBUGS-26498: Add Deprecated route status condition type OCPBUGS-26498: Add UnservableInFutureVersions route status condition type Feb 1, 2024
@gcs278
Copy link
Contributor Author

gcs278 commented Feb 1, 2024

There's enough discussion and agreement that the hold is no longer needed
/hold cancel
@deads2k @frobware @Miciah ready for review

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 1, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 1, 2024

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

@deads2k
Copy link
Contributor

deads2k commented Feb 2, 2024

/lgtm
/approve

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

openshift-ci bot commented Feb 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, frobware, gcs278

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 Feb 2, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 8b34b98 into openshift:master Feb 2, 2024
@openshift-ci-robot
Copy link

@gcs278: Jira Issue OCPBUGS-26498: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

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

Details

In response to this:

Add UnservableInFutureVersions as a route status condition type. This change allows the router to indicate that a route is using an unsupported configuration and will be unservable in the future. The ingress operator may use this condition to block upgrades.

More details in forum-ocp-updates slack thread and latest updates discussion in forum-api-review slack thread

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

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-config-api-container-v4.16.0-202402021641.p0.g8b34b98.assembly.stream for distgit ose-cluster-config-api.
All builds following this will include this PR.

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. 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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants