Description of problem: From PR1127, for the healthCheckInterval, valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h"." But healthCheckInterval with invalid unit, for example 5d, can be patched successfully. Error or warning message should pop up when tried to configure it with the invalid unit https://github.com/openshift/api/pull/1127/files OpenShift release version: Cluster Platform: How reproducible: Steps to Reproduce (in detail): 1. % oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.11.0-0.nightly-2022-05-05-015322 True False 4h55m Cluster version is 4.11.0-0.nightly-2022-05-05-015322 % 2. try to patch healthCheckInterval with 3d to the ingress-controller(3d is invalid, valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".) %oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec":{"tuningOptions": {"healthCheckInterval": "3d"}}}' ingresscontroller.operator.openshift.io/default patched % 3. %oc -n openshift-ingress-operator get ingresscontroller/default -o yaml | grep -A1 tuningOptions tuningOptions: healthCheckInterval: 3d % 4.oc rsh to a router pod, and check the env ROUTER_BACKEND_CHECK_INTERVAL, it is 50s, which has been set before. % oc -n openshift-ingress get pods NAME READY STATUS RESTARTS AGE router-default-6cfc84cd9f-689lw 1/1 Running 0 5m3s router-default-6cfc84cd9f-w8qmc 1/1 Running 0 5m3s % oc -n openshift-ingress rsh router-default-6cfc84cd9f-689lw sh-4.4$ env | grep ROUTER_BACKEND_CHECK_INTERVAL ROUTER_BACKEND_CHECK_INTERVAL=50s sh-4.4$ Actual results: "healthCheckInterval: 3d" can be patched to the ingress-controller Expected results: shouldn't be allowed, error or warning message should pop up when tried to configure it with the invalid unit Impact of the problem: Additional info: ** Please do not disregard the report template; filling the template out as much as possible will allow us to help you. Please consider attaching a must-gather archive (via `oc adm must-gather`). Please review must-gather contents for sensitive information before attaching any must-gathers to a bugzilla report. You may also mark the bug private if you wish.
can patch it with "5 s", which having blank character and should be invalid. 1. % oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec":{"tuningOptions": {"healthCheckInterval": "5 s"}}}' ingresscontroller.operator.openshift.io/default patched % 2. %oc -n openshift-ingress-operator get ingresscontroller/default -o yaml | grep -A1 tuningOptions tuningOptions: healthCheckInterval: 5 s % 3. % oc -n openshift-ingress get pods NAME READY STATUS RESTARTS AGE router-default-6cfc84cd9f-689lw 1/1 Running 0 53m router-default-6cfc84cd9f-w8qmc 1/1 Running 0 53m %
*** Bug 2091551 has been marked as a duplicate of this bug. ***
Verified it with 4.11.0-0.nightly-2022-06-15-222801 1. % oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.11.0-0.nightly-2022-06-15-222801 True False 10h Cluster version is 4.11.0-0.nightly-2022-06-15-222801 % 2. % oc -n openshift-ingress-operator get ingresscontroller/default -o yaml | grep -A1 tuningOptions tuningOptions: healthCheckInterval: 10s % 3. Tried to patch it with "10 s" and "5 s" % oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec": {"tuningOptions": {"healthCheckInterval": "10 s"}}}' The IngressController "default" is invalid: spec.tuningOptions.healthCheckInterval: Invalid value: "10 s": spec.tuningOptions.healthCheckInterval in body should match '^0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+$' % oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec": {"tuningOptions": {"healthCheckInterval": "5 s"}}}' The IngressController "default" is invalid: spec.tuningOptions.healthCheckInterval: Invalid value: "5 s": spec.tuningOptions.healthCheckInterval in body should match '^0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+$' % 4. Tried to patch it with "3d" % oc -n openshift-ingress-operator patch ingresscontroller/default --type=merge -p '{"spec": {"tuningOptions": {"healthCheckInterval": "3d"}}}' The IngressController "default" is invalid: spec.tuningOptions.healthCheckInterval: Invalid value: "3d": spec.tuningOptions.healthCheckInterval in body should match '^0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+$' %
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069