Bug 1691268

Summary: Cannot add unit for the number of spec.storage.s3.cloudfront.duration
Product: OpenShift Container Platform Reporter: Wenjing Zheng <wzheng>
Component: Image RegistryAssignee: Oleg Bulatov <obulatov>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: low Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The type used is not supporting suffixes during deserialization. Consequence: Impossible to use the suffix. Fix: Change the type. Result: Possible to use the suffix.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:46:16 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 2019-03-21 09:53:27 UTC
Description of problem:
Cannot use integer plus unit for spec.storage.s3.cloudfront.duration:
E0321 09:35:34.310761       1 reflector.go:134] github.com/openshift/cluster-image-registry-operator/pkg/generated/informers/externalversions/factory.go:101: Failed to list *v1.Config: v1.ConfigList.Items: []v1.Config: v1.Config.Spec: v1.ImageRegistrySpec.Storage: v1.ImageRegistryConfigStorage.S3: v1.ImageRegistryConfigStorageS3.CloudFront: v1.ImageRegistryConfigStorageS3CloudFront.PrivateKey: v1.SecretKeySelector.KeypairID: Duration: read int64: unexpected character: ", error found in #10 byte of ...|on":"500s","keypairI|..., bigger context ...|//d1bdguld7kb141.cloudfront.net","duration":"500s","keypairID":"APKAJQH55DVQSUIPBLPW","privateKey":{|...

Version-Release number of selected component (if applicable):
4.0.0-0.nightly-2019-03-20-153904

How reproducible:
always

Steps to Reproduce:
1.oc edit configs.imageregistry.operator.openshift.io
  storage:
    s3:
      bucket: image-registry-ap-northeast-1-aed1e266c9d64fdab6fb75cdd3146065
      encrypt: true
      region: ap-northeast-1
      cloudFront:
         baseURL: https://zzzzzzzzzzzzzz     
         privateKey:
           key: zzzzzzzzzzzzzzzz
           name: mysecret
         keypairID: zzzzzzzzzzzzzzzz       
         duration: 500s
2. Check operator log

Actual results:
Error will appear and registry pod won't restart.

Expected results:
Integer + unit should work according to https://docs.docker.com/registry/configuration/#cloudfront.

Additional info:

Comment 2 Wenjing Zheng 2019-03-26 07:32:04 UTC
Bug has not been merged to latest available version now, will wait for the fix to verify again:
E0326 07:30:35.140959       1 reflector.go:134] github.com/openshift/cluster-image-registry-operator/pkg/generated/informers/externalversions/factory.go:101: Failed to list *v1.Config: v1.ConfigList.Items: []v1.Config: v1.Config.Spec: v1.ImageRegistrySpec.Storage: v1.ImageRegistryConfigStorage.S3: v1.ImageRegistryConfigStorageS3.CloudFront: v1.ImageRegistryConfigStorageS3CloudFront.PrivateKey: v1.SecretKeySelector.KeypairID: Duration: read int64: unexpected character: ", error found in #10 byte of ...|n":"3000s","keypairI|..., bigger context ...|/d2jjws6sn9fo5b.cloudfront.net","duration":"3000s","keypairID":"APKAJQH55DVQSUIPBLPQ","privateKey":{|...
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.0.0-0.nightly-2019-03-23-222829   True        False         29h     Cluster version is 4.0.0-0.nightly-2019-03-23-222829

Comment 3 Wenjing Zheng 2019-04-03 09:39:28 UTC
Verified with below version:4.0.0-0.10

Comment 5 errata-xmlrpc 2019-06-04 10:46:16 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, 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-2019:0758