Commit d9fe47b
committed
pkg/cvo/availableupdates: Log target version when explaining risk-acceptance
Because [1]:
1. create a cluster which has 1 recommend version and 1 non-recommend version
2. create alert PodDisruptionBudgetAtLimit with warning severity
3. oc adm upgrade accept PodDisruptionBudgetAtLimit
had been creating fairly noisy output like:
I0408 03:58:45.443626 1 alerts.go:87] refreshed: 10 alerts
I0408 03:58:45.443753 1 availableupdates.go:534] Found 10 alerts
I0408 03:58:45.443818 1 availableupdates.go:631] Got 0 risks
I0408 03:58:45.445403 1 availableupdates.go:868] Risk with name "PodDisruptionBudgetAtLimit" is accepted by the cluster admin and thus not in the evaluation of conditional update
I0408 03:58:45.445421 1 availableupdates.go:868] Risk with name "PodDisruptionBudgetAtLimit" is accepted by the cluster admin and thus not in the evaluation of conditional update
I0408 03:58:45.445429 1 availableupdates.go:868] Risk with name "PodDisruptionBudgetAtLimit" is accepted by the cluster admin and thus not in the evaluation of conditional update
...
I0408 03:58:45.446455 1 availableupdates.go:868] Risk with name "PodDisruptionBudgetAtLimit" is accepted by the cluster admin and thus not in the evaluation of conditional update
I0408 03:58:45.446460 1 availableupdates.go:868] Risk with name "PodDisruptionBudgetAtLimit" is accepted by the cluster admin and thus not in the evaluation of conditional update
I0408 03:58:45.446475 1 availableupdates.go:177] Requeue available-update evaluation, because "4.22.0-ec.4" is Recommended=Unknown: EvaluationFailed: Could not evaluate exposure to update risk SomeInvokerThing (invalid PromQL result length must be one, but is 0)
SomeInvokerThing description: On clusters on default invoker user, this imaginary bug can happen.
SomeInvokerThing URL: https://bug.example.com/a
I0408 03:58:45.449976 1 cvo.go:816] Finished syncing available updates "openshift-cluster-version/version" (159.68958ms)
Logging the version should help distinguish confusedly looping on a
single risk for a single target version, from looping over that same
risks for multiple different target versions.
[1]: https://redhat.atlassian.net/browse/OTA-1813?focusedCommentId=166437381 parent 913e324 commit d9fe47b
2 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
580 | 580 | | |
581 | 581 | | |
582 | 582 | | |
583 | | - | |
| 583 | + | |
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
683 | | - | |
| 683 | + | |
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
703 | | - | |
| 703 | + | |
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
| 520 | + | |
| 521 | + | |
521 | 522 | | |
522 | 523 | | |
523 | 524 | | |
| |||
0 commit comments