Bug 1515058 - Scheduled image import performed every 15 sec with scheduledImageImportMinimumIntervalSeconds: 30
Summary: Scheduled image import performed every 15 sec with scheduledImageImportMinimu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 3.9.0
Assignee: Jim Minter
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-20 05:03 UTC by Takayoshi Kimura
Modified: 2018-10-29 20:59 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2018-03-28 14:12:08 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3666901 None None None 2018-10-25 15:32:18 UTC
Red Hat Product Errata RHBA-2018:0489 None None None 2018-03-28 14:12:37 UTC

Internal Links: 1546097

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


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