Bug 1833245

Summary: no validation rules for spec.requests.read/write.maxWaitInQueue
Product: OpenShift Container Platform Reporter: Wenjing Zheng <wzheng>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, pasik, rmarasch
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: By setting read/write maxWaitInQueue to a random string that can't be parsed as Duration. Consequence: A message is constantly logged informing about the wrong value, changes are also not applied. Fix: Added validation for Duration fields Result: User can't enter with invalid values for read/write maxWaitInQueue
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 15:58:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wenjing Zheng 2020-05-08 07:45:01 UTC
Description of problem:
Set invalid value for spec.requests.read/write.maxWaitInQueue as below in image registry operator config:
  requests:
    read:
      maxWaitInQueue: aa
    write:
      maxWaitInQueue: aa

Version-Release number of selected component (if applicable):
4.5.0-0.nightly-2020-05-07-144853

How reproducible:
Always

Steps to Reproduce:
1.Set invalid value for spec.requests.read/write.maxWaitInQueue in image registry operator config
2.
3.

Actual results:
No warning about the invalid value.

Expected results:
Should has warning.

Additional info:

Comment 1 Wenjing Zheng 2020-05-08 08:21:05 UTC
There is warning in log:
E0508 08:18:37.224039      12 reflector.go:178] github.com/openshift/client-go/imageregistry/informers/externalversions/factory.go:101: Failed to list *v1.Config: v1.ConfigList.Items: []v1.Config: v1.Config.Spec: v1.ImageRegistrySpec.Requests: v1.ImageRegistryConfigRequests.Write: v1.ImageRegistryConfigRequestsLimits.Read: v1.ImageRegistryConfigRequestsLimits.MaxWaitInQueue: unmarshalerDecoder: time: invalid duration aa, error found in #10 byte of ...|ueue":"aa"},"write":|..., bigger context ...|licas":3,"requests":{"read":{"maxWaitInQueue":"aa"},"write":{"maxWaitInQueue":"aa"}},"resources":{"l|...
E0508 08:18:40.676287      12 reflector.go:178] github.com/openshift/client-go/imageregistry/informers/externalversions/factory.go:101: Failed to list *v1.Config: v1.ConfigList.Items: []v1.Config: v1.Config.Spec: v1.ImageRegistrySpec.Requests: v1.ImageRegistryConfigRequests.Write: v1.ImageRegistryConfigRequestsLimits.Read: v1.ImageRegistryConfigRequestsLimits.MaxWaitInQueue: unmarshalerDecoder: time: invalid duration aa, error found in #10 byte of ...|ueue":"aa"},"write":|..., bigger context ...|licas":3,"requests":{"read":{"maxWaitInQueue":"aa"},"write":{"maxWaitInQueue":"aa"}},"resources":{"l|...
I0508 08:18:52.122641      12 clusteroperator.go:98] event from workqueue successfully processed
E0508 08:19:08.289426      12 reflector.go:178] github.com/openshift/client-go/imageregistry/informers/externalversions/factory.go:101: Failed to list *v1.Config: v1.ConfigList.Items: []v1.Config: v1.Config.Spec: v1.ImageRegistrySpec.Requests: v1.ImageRegistryConfigRequests.Write: v1.ImageRegistryConfigRequestsLimits.Read: v1.ImageRegistryConfigRequestsLimits.MaxWaitInQueue: unmarshalerDecoder: time: invalid duration aa, error found in #10 byte of ...|ueue":"aa"},"write":|..., bigger context ...|licas":3,"requests":{"read":{"maxWaitInQueue":"aa"},"write":{"maxWaitInQueue":"aa"}},"resources":{"l|...

But for spec.read/write.maxInQueue can have warning once change is saving.

Comment 2 Oleg Bulatov 2020-05-18 12:15:51 UTC
This is not a release blocker.

Comment 5 Ricardo Maraschini 2020-06-17 06:41:48 UTC
This BZ is not ready for QA yet, we still need to bump dependencies on the operator.

Comment 8 Wenjing Zheng 2020-06-28 09:12:00 UTC
# configs.imageregistry.operator.openshift.io "cluster" was not valid:
# * spec.requests.write.maxWaitInQueue: Invalid value: "aa": spec.requests.write.maxWaitInQueue in body must be of type duration: "aa"
# * spec.requests.read.maxWaitInQueue: Invalid value: "aa": spec.requests.read.maxWaitInQueue in body must be of type duration: "aa"

Verified on  4.6.0-0.nightly-2020-06-26-035408.

Comment 10 errata-xmlrpc 2020-10-27 15:58:53 UTC
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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196