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

OCPCLOUD-2409: blocked-edges/*-AzureDefaultVMType: Born in 4.13 ARO all exposed #4545

Merged

Conversation

wking
Copy link
Member

@wking wking commented Dec 21, 2023

Miguel points out that the exposure set is more complicated than what I'd done in 45eb9ea (#4541). It's:

  • Azure born in 4.8 or earlier are exposed. Both ARO (which creates clusters with Hive?) and clusters created via openshift-installer.
  • ARO clusters created in 4.13 and earlier are exposed.

Generated by updating the 4.14.1 risk by hand, and then running:

$ curl -s 'https://api.openshift.com/api/upgrades_info/graph?channel=candidate-4.14&arch=amd64' | jq -r '.nodes[] | .version' | grep '^4[.]14[.]' | grep -v '^4[.]14[.][01]$' | while read VERSION; do sed "s/4.14.1/${VERSION}/" blocked-edges/4.14.1-AzureDefaultVMType.yaml > "blocked-edges/${VERSION}-AzureDefaultVMType.yaml"; done

I break down the new PromQL logic in the commit message.

@wking wking changed the title blocked-edges/*-AzureDefaultVMType: Born in 4.13 ARO all exposed OCPCLOUD-2409: blocked-edges/*-AzureDefaultVMType: Born in 4.13 ARO all exposed Dec 21, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 21, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 21, 2023

@wking: This pull request references OCPCLOUD-2409 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the spike to target the "4.16.0" version, but no target version was set.

In response to this:

Miguel points out that the exposure set is more complicated than what I'd done in 45eb9ea (#4541). It's:

  • Azure born in 4.8 or earlier are exposed. Both ARO (which creates clusters with Hive?) and clusters created via openshift-installer.
  • ARO clusters created in 4.13 and earlier are exposed.

Generated by updating the 4.14.1 risk by hand, and then running:

$ curl -s 'https://api.openshift.com/api/upgrades_info/graph?channel=candidate-4.14&arch=amd64' | jq -r '.nodes[] | .version' | grep '^4[.]14[.]' | grep -v '^4[.]14[.][01]$' | while read VERSION; do sed "s/4.14.1/${VERSION}/" blocked-edges/4.14.1-AzureDefaultVMType.yaml > "blocked-edges/${VERSION}-AzureDefaultVMType.yaml"; done

I break down the new PromQL logic in the commit message.

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.

Copy link
Contributor

openshift-ci bot commented Dec 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wking

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 Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 21, 2023
Miguel points out that the exposure set is more complicated [1] than
what I'd done in 45eb9ea (blocked-edges/4.14*: Declare
AzureDefaultVMType, openshift#4541).  It's:

* Azure born in 4.8 or earlier are exposed.  Both ARO (which creates
  clusters with Hive?) and clusters created via openshift-installer.
* ARO clusters created in 4.13 and earlier are exposed.

Generated by updating the 4.14.1 risk by hand, and then running:

  $ curl -s 'https://api.openshift.com/api/upgrades_info/graph?channel=candidate-4.14&arch=amd64' | jq -r '.nodes[] | .version' | grep '^4[.]14[.]' | grep -v '^4[.]14[.][01]$' | while read VERSION; do sed "s/4.14.1/${VERSION}/" blocked-edges/4.14.1-AzureDefaultVMType.yaml > "blocked-edges/${VERSION}-AzureDefaultVMType.yaml"; done

Breaking down the logic for my new PromQL:

a. First stanza, using topk is likely unecessary, but if we do happen
   to have multiple matches for some reason, we'll take the highest.
   That gives us a "we match" 1 (if any aggregated entries were 1) or
   a "we don't match" (if they were all 0), instead of "we're having a
   hard time figuring out" Recommended=Unknown.

   a. If the cluster is ARO (using cluster_operator_conditions, as in
      ba09198 (MCO-958: Blocking edges to 4.14.2+ and 4.13.25+, 2023-12-15,
      openshift#4524), first stanza is 1.  Otherwise, 'or' falls back to...

   b. Nested block, again with the cautious topk:

      a. If there are no cluster_operator_conditions, don't return a
         time series.  This ensures that "we didn't match a.a, but we
         might be ARO, and just have cluster_operator_conditions
         aggregation broken" gives us a Recommended=Unknown evaluation
         failure.

      b. Nested block, again with the cautious topk:

         a. born_by_4_9 yes case, with 4.(<=9) instead of the desired
            4.(<=8) because of the "old CVO bugs make it hard to
            distinguish between 4.(<=9) birth-versions" issue
            discussed in 034fa01 (blocked-edges/4.12.*: Declare
            AWSOldBootImages, 2022-12-14, openshift#2909).  Otherwise, 'or'
            falls back to...

         b. A check to ensure cluster_version{type="initial"} is
            working.  This ensures that "we didn't match the a.b.b.a
            born_by_4_9 yes case, but we be that old, and just have
            cluster_version aggregation broken" gives us a
            Recommended=Unknown evaluation failure.

b. Second stanza, again with the cautious topk:

   a. cluster_infrastructure_provider is Azure.  Otherwise, 'or' falls
      back to...

   b. If there are no cluster_infrastructure_provider, don't return a
      time series.  This ensures that "we didn't match b.a, but we
      might be Azure, and just have cluster_infrastructure_provider
      aggregation broken" gives us a Recommended=Unknown evaluation
      failure.

All of the _id filtering is for use in hosted clusters or other PromQL
stores that include multiple clusters.  More background in 5cb2e93
(blocked-edges/4.11.*-KeepalivedMulticastSkew: Explicit _id="",
2023-05-09, openshift#3591).

So walking some cases:

* Non-Azure cluster, cluster_operator_conditions, cluster_version, and
  cluster_infrastructure_provider all working:
  * a.a matches no series (not ARO).  Fall back to...
  * a.b.a confirms cluster_operator_conditions is working.
  * a.b.b could be 1 or 0 for cluster_version.
  * b.a matches no series (not Azure).
  * b.b gives 0 (confirming cluster_infrastructure_provider is working).
  * (1 or 0) * 0 = 0, cluster does not match.
* Non-Azure cluster, cluster_version is broken:
  * a.a matches no series (not ARO).  Fall back to...
  * a.b.a confirms cluster_operator_conditions is working.
  * a.b.b matches no series (cluster_version is broken).
  * b.a matches no series (not Azure).
  * b.b gives 0 (confirming cluster_infrastructure_provider is working).
  * (no-match) * 0 = no-match, evaluation fails, Recommended=Unknown.
    Admin gets to figure out what's broken with cluster_version and/or
    manually assess their exposure based on the message and linked
    URI.
* Non-ARO Azure cluster born in 4.9, all time-series working:
  * a.a matches no series (not ARO).  Fall back to...
  * a.b.a confirms cluster_operator_conditions is working.
  * a.b.b.a matches born_by_4_9 yes.
  * b.a matches (Azure).
  * 1 * 1 = 1, cluster matches.
* ARO cluster born in 4.9, all time-series working:
  * a.a matches (ARO).
  * b.a matches (Azure).
  * 1 * 1 = 1, cluster matches.
* ARO cluster born in 4.13, all time-series working (this is the case
  I'm fixing with this commit):
  * a.a matches (ARO).
  * b.a matches (Azure).
  * 1 * 1 = 1, cluster matches.
* ARO cluster, cluster_operator_conditions is broken.
  * a.a matches no series (cluster_operator_conditions) is broken.
  * a.b.a matches no series (cluster_operator_conditions) is broken.
  * b.a matches (Azure)
  * (no-match) * 1 = no-match, evaluation fails, Recommended=Unknown.
* ARO cluster, cluster_infrastructure_provider is broken.
  * a.a matches (ARO).
  * b.a matches no series (cluster_infrastructure_provider) is broken.
  * b.b matches no series (cluster_infrastructure_provider) is broken.
  * 1 * (no-match) = no-match, evaluation fails, Recommended=Unknown.
    We could add logic like a cluster_operator_conditions{name="aro"}
    check to the (b) stanza if we wanted to bakein "all ARO clusters
    are Azure" knowledge to successfully evaluate this case.  But I'd
    guess cluster_infrastructure_provider is working in most ARO
    clusters, and this PromQL is already complicated enough, so I
    haven't bothered with that level of tuning.
* ...lots of other combinations...

[1]: https://issues.redhat.com/browse/OCPCLOUD-2409?focusedId=23694976&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-23694976
@wking
Copy link
Member Author

wking commented Dec 21, 2023

Screenshots:

Young AWS cluster. Not exposed, because not Azure:

image

Evaluating on that AWS cluster, with PromQL tweaked to pretend the risk is that same infra platform, because I don't have a young Azure cluster to run the real PromQL on. Not exposed, because young and not ARO:

image

Evaluating on that AWS cluster, with PromQL tweaked to pretend the risk is "all clusters with ingress ClusterOperator conditions" instead of "...with aro ClusterOperator conditions", because I don't have a young ARO cluster to run the real PromQL on. Exposed, because ARO/ingress:

image

Evaluating on that AWS cluster, with cluster_operator_conditionsBROKEN, to show how that falls back to no-matches:

image

Evaluating on an old AWS cluster. No match, because not Azure:

image

Evaluating on that old AWS cluster, with the PromQL pretending the platform exposure is AWS. Match, because old and infra-match:

image

Copy link
Contributor

openshift-ci bot commented Dec 21, 2023

@wking: all tests passed!

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.

@wking wking added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 9971f00 into openshift:master Dec 21, 2023
5 checks passed
@wking wking deleted the AzureDefaultVMType-for-ARO branch December 21, 2023 19:29
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/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants