Bug 1515058

Summary: Scheduled image import performed every 15 sec with scheduledImageImportMinimumIntervalSeconds: 30
Product: OpenShift Container Platform Reporter: Takayoshi Kimura <tkimura>
Component: MasterAssignee: Jim Minter <jminter>
Status: CLOSED ERRATA QA Contact: Dongbo Yan <dyan>
Severity: low Docs Contact:
Priority: low    
Version: 3.6.0CC: aos-bugs, jminter, jokerman, jolee, mmccomas
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Due to a fault in the scheduler implementation, the ScheduledImageImportMinimumIntervalSeconds setting was not correctly observed, causing OpenShift to attempt to import scheduled images at the wrong intervals. This has been resolved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:12:08 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 Takayoshi Kimura 2017-11-20 05:03:02 UTC
Description of problem:

Scheduled image import performed every 15 sec with scheduledImageImportMinimumIntervalSeconds: 30

imagePolicyConfig:
  disableScheduledImport: false
  maxImagesBulkImportedPerRepository: 5
  maxScheduledImageImportsPerMinute: 60
  scheduledImageImportMinimumIntervalSeconds: 30

Version-Release number of selected component (if applicable):

$ openshift version
openshift v3.6.173.0.49
kubernetes v1.6.1+5115d708d7
etcd 3.2.1

How reproducible:

Always

Steps to Reproduce:
1. Modify imagePolicyConfig in master-config.yaml and restart master services
2. Import external docker registry and enabled scheduled import

oc import-image app --from=kunimare.usersys.redhat.com:5000/test/app --confirm --all --insecure
oc tag kunimare.usersys.redhat.com:5000/test/app:latest app:latest --insecure=true --scheduled=true

Actual results:

Scheduled import performed every 15 sec.

$ sudo journalctl -u atomic-openshift-master -f | grep -i import 
Nov 20 12:00:15 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:15.028535   34173 scheduled_image_controller.go:174] Scheduled import of stream test-import/app...
Nov 20 12:00:15 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:15.028823   34173 imagestream_controller.go:229] Importing stream test-import/app partial=true...
Nov 20 12:00:17 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:17.045849   34173 trace.go:76] Trace[1372777625]: "Create /oapi/v1/namespaces/test-import/imagestreamimports" (started: 2017-11-20 12:00:15.10097694 +0900 JST) (total time: 1.944826104s):
Nov 20 12:00:17 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:17.045950   34173 wrap.go:42] POST /oapi/v1/namespaces/test-import/imagestreamimports: (2.013179567s) 201 [[openshift/v1.6.1+5115d708d7 (linux/amd64) kubernetes/fff65cf/system:serviceaccount:openshift-infra:image-import-controller] 10.72.38.210:43808]

Nov 20 12:00:30 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:30.031396   34173 scheduled_image_controller.go:174] Scheduled import of stream test-import/app...
Nov 20 12:00:30 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:30.031465   34173 imagestream_controller.go:229] Importing stream test-import/app partial=true...
Nov 20 12:00:31 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:31.302151   34173 trace.go:76] Trace[2026498951]: "Create /oapi/v1/namespaces/test-import/imagestreamimports" (started: 2017-11-20 12:00:30.047181417 +0900 JST) (total time: 1.254913508s):
Nov 20 12:00:31 shift-m1.usersys.redhat.com atomic-openshift-master[34173]: I1120 12:00:31.302260   34173 wrap.go:42] POST /oapi/v1/namespaces/test-import/imagestreamimports: (1.269053267s) 201 [[openshift/v1.6.1+5115d708d7 (linux/amd64) kubernetes/fff65cf/system:serviceaccount:openshift-infra:image-import-controller] 10.72.38.210:43808]

Expected results:

Scheduled import performed every 30 sec

Additional info:

Comment 1 Jim Minter 2018-02-13 23:11:21 UTC
https://github.com/openshift/origin/pull/18604

Comment 3 Dongbo Yan 2018-02-22 08:43:33 UTC
Verified
openshift v3.9.0-0.47.0
kubernetes v1.9.1+a0ce1bc657
etcd 3.2.8

set 'scheduledImageImportMinimumIntervalSeconds: 30' in master-config
then update image in external registry, after 30 seconds, tagged imagestream update, trigger new deployment

Comment 6 errata-xmlrpc 2018-03-28 14:12:08 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-2018:0489