Bug 1833245 - no validation rules for spec.requests.read/write.maxWaitInQueue
Summary: no validation rules for spec.requests.read/write.maxWaitInQueue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-08 07:45 UTC by Wenjing Zheng
Modified: 2020-10-27 15:59 UTC (History)
3 users (show)

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
Clone Of:
Environment:
Last Closed: 2020-10-27 15:58:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift api pull 661 0 None closed Bug 1833245: Validating duration fields on image registry types 2020-10-15 14:57:40 UTC
Github openshift cluster-image-registry-operator pull 572 0 None closed Bug 1833245: Bumping openshift/api 2020-10-15 14:57:40 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 15:59:14 UTC

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


Note You need to log in before you can comment on or make changes to this bug.