Description of problem: Command 'oc import-image' don't respect para 'maxImagesBulkImportedPerRepository' set in master-config.yaml, set maxImagesBulkImportedPerRepository: 25, but still can only import 5 images based on default value. openshift v3.6.78 kubernetes v1.6.1+5115d708d7 etcd 3.1.0 How reproducible: Always Steps to Reproduce: 1. Set 'maxImagesBulkImportedPerRepository' under imageConfig section in master-config.yaml, restart atomic-openshift-master service 2. # oc import-image --confirm --from=centos centos --all=true The import completed successfully. Name: centos Namespace: lgrpoj Created: Less than a second ago Labels: <none> Annotations: openshift.io/image.dockerRepositoryCheck=2017-05-25T09:19:37Z Docker Pull Spec: 172.x.x.6:5000/lgrpoj/centos Unique Images: 5 Tags: 5 latest tagged from centos:latest * centos@sha256:bba1de7c9d900a898e3cadbae040dfe8a633c06bc104a0df76ae24483e03c077 Less than a second ago 6.9 tagged from centos:6.9 * centos@sha256:a23bced61701af9a0a758e94229676d9f09996a3ff0f3d26955b06bac8c282e0 Less than a second ago 6.8 tagged from centos:6.8 * centos@sha256:37ee2dcd9a3a430136b566efb4aa1111ed332bfdef8b0de51a25d26891689fd7 Less than a second ago 6.7 tagged from centos:6.7 * centos@sha256:c475cc98cc4a87d55b8dab3b61bf7b7e725ab0f0bf6891a656d5d557b7d55f36 Less than a second ago 6.6 tagged from centos:6.6 * centos@sha256:e21297742183af3e64cbd42585c1718b53c677797a77044ba13c1425c21ef06b Less than a second ago info: The remote repository contained 20 additional tags which were not imported: 5.11, 7.3.1611, 7.2.1511, 7.1.1503, 7.0.1406, 5, 6, 7, centos5, centos5.11, centos6, centos6.6, centos6.7, centos6.8, centos6.9, centos7, centos7.0.1406, centos7.1.1503, centos7.2.1511, centos7.3.1611 Actual results: 'oc import-image' don't respect para 'maxImagesBulkImportedPerRepository' setting Expected results: 'oc import-image' should respect para 'maxImagesBulkImportedPerRepository' setting
Tested with: $ oc version oc v3.6.0-alpha.1+93af347-969 kubernetes v1.6.1+5115d708d7 features: Basic-Auth Server https://localhost:8443 openshift v3.6.0-alpha.1+93af347-969 kubernetes v1.6.1+5115d708d7 And it works as expected, I got: $ oc import-image --confirm --from=centos centos --all=true The import completed successfully. Name: centos Namespace: test Created: Less than a second ago Labels: <none> Annotations: openshift.io/image.dockerRepositoryCheck=2017-06-01T10:47:13Z Docker Pull Spec: 172.30.108.189:5000/test/centos Unique Images: 12 Tags: 25 <--------------
@maszulik , I tried it again in ocp env, but still reproduce this problem, I guess our difference exist the master-config.yaml config, I pasted mine below: imageConfig: maxImagesBulkImportedPerRepository: 25 format: brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/ose-${component}:${version} latest: false I config this item following the doc: https://docs.openshift.org/latest/install_config/master_node_configuration.html, openshift v3.6.88 kubernetes v1.6.1+5115d708d7 etcd 3.1.0
@GeLiu your error is in master-config.yaml, here's how this should look like: imageConfig: format: openshift/origin-${component}:${version} latest: true imagePolicyConfig: allowedRegistriesForImport: - domainName: docker.io - domainName: '*.docker.io' - domainName: registry.access.redhat.com - domainName: gcr.io - domainName: quay.io - domainName: '*.amazonaws.com' disableScheduledImport: false maxImagesBulkImportedPerRepository: 25 <--------- maxScheduledImageImportsPerMinute: 60 scheduledImageImportMinimumIntervalSeconds: 900 In your case maxImagesBulkImportedPerRepository is under imageConfig, but should rather be under imagePolicyConfig. Please double check your configuration against what I've pasted above. This is the entire image configuration we have in OpenShift.
@maszulik, thanks, I tried it follow your comments, and it works well now, it looks like the doc have some misguide at this point, because the 'ImagePolicyConfig' and 'MaxImagesBulkImportedPerRepository' at same level under the imageconfig.
@geliu agreed, I've added comment to https://github.com/openshift/openshift-docs/issues/4462 which covers this topic.
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-2017:3049