Bug 1373332
Summary: | [atomic registry]When creating "Pull specific tags from another image repository" image streams will pull all tags | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Yadan Pei <yapei> |
Component: | Registry Console | Assignee: | Martin Pitt <mpitt> |
Status: | CLOSED ERRATA | QA Contact: | Yanping Zhang <yanpzhan> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.3.0 | CC: | aos-bugs, bleanhar, imcleod, jforrest, jokerman, mfojtik, mmccomas, mpitt, pweil, stefw, xxia, yapei, yinzhou |
Target Milestone: | --- | ||
Target Release: | 3.11.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://github.com/cockpit-project/cockpit/pull/9682 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-11 07:19:06 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1512440 |
Description
Yadan Pei
2016-09-06 03:06:30 UTC
Confirming this bug on latest Cockpit 139. I wrote some tests to cover image stream import, https://github.com/cockpit-project/cockpit/pull/6398 contains a reproducer. I'm afraid this is at least a documentation, if not a functional bug in Openshift itself. Cockpit is more or less doing this, assuming that you have a project called "marmalade": $ cat <<EOF | oc create -f - -n marmalade { "apiVersion": "v1", "kind": "ImageStream", "metadata": { "name": "test" }, "spec": { "dockerImageRepository": "docker.io/prom/busybox", "tags": [ { "name": "latest" } ] } } EOF But this pulls in all tags, in particularly also the "glibc" tag: $ oc get imagestreams -n marmalade NAME DOCKER REPO TAGS UPDATED test docker.io/prom/busybox latest,glibc 2 minutes ago I also tried the "full" syntax from https://docs.openshift.com/enterprise/3.0/architecture/core_concepts/builds_and_image_streams.html#tag-tracking: "spec": { "dockerImageRepository": "docker.io/prom/busybox", "tags": [ { "name": "latest", "from": { "kind": "ImageStreamTag", "name": "latest" } } ] } with the same result. Use this to clean up after each iteration: oc delete image $(oc get images -n marmalade|grep prom | awk '{print $1}') oc delete imagestream test -n marmalade https://docs.openshift.com/enterprise/3.0/architecture/infrastructure_components/image_registry.html is another relevant page, but it doesn't talk about tag import at all. So I'm afraid importing only a given (set of) tags is not actually working properly, or Cockpit creates the wrong JSON for this. Can Openshift developers weigh in here, please? This has been perpetually bumped. I've no reason to think this should actually block release. Changing severity to low. Feel free to push back if needed, but I'm trying to get things in order for 3.6. Also adding a NEEDINFO for Paul based on Martin's Comment 3 - since it looks as Cockpit really does need some OpenShift specific guidance to move forward on this. Paul, feel free to bounce the NEEDINFO to whomever you think can help. As long as OpenShift does not provide an API to actually do this, there's nothing we can do on the Cockpit side. So the needsinfo still stands, and moving to 3.10. Moving component, as this is *still* not supported in the OpenShift API. Once it does, we can use bug 1512440 to track the cockpit side. If you want to import a specific tag, then you do not specify dockerImageRepository. The syntax for importing specific tags looks like this: https://github.com/openshift/library/blob/master/community/wildfly/imagestreams/wildfly-centos7.json#L42-L45 Martin, I am not entirely clear on what the issue is here, does that api enable you to do what is being asked here? Marking 3.11 for the moment as this is not a blocker, but more likely it will turn into an RFE if my above suggestion is not sufficient. Thanks Ben! I'll try that syntax ASAP and report back here. Would be nice to describe this in https://docs.openshift.com/enterprise/latest/architecture/core_concepts/builds_and_image_streams.html, as it's really not obvious. Martin, fixing the docs here: https://github.com/openshift/openshift-docs/pull/9923 Any luck, Martin? Indeed it does help. With this JSON: { "apiVersion": "v1", "kind": "ImageStream", "metadata": { "name": "test" }, "spec": { "tags": [ { "name": "glibc", "from": { "kind": "DockerImage", "name": "docker.io/prom/busybox:glibc" } } ] } } it works as expected: test 172.30.88.58:5000/marmalade/test glibc About a minute ago So "all tags" and "some tags" have quite a different syntax. I reassign this back to Cockpit, and will work on using that. Thank you! This is being fixed in https://github.com/cockpit-project/cockpit/pull/9682 # oc rsh registry-console-1-fv5xv rpm -qa|grep cockpit cockpit-bridge-155-1.el7.x86_64 cockpit-kubernetes-155-1.el7.x86_64 cockpit-ws-155-1.el7.x86_64 cockpit-dashboard-172-2.el7.x86_64 cockpit-system-155-1.el7.noarch openshift v3.11.0-0.20.0 kubernetes v1.11.0+d4cacc0 Checked on OCP v3.11.0-0.20.0, there is no new cockpit package, and the bug still exists. Verification steps: When creatint ImageStream, set following parameters: Populate: Pull specific tags from another image repository Pull from: docker.io/yapei/ruby-20-rhel7 Tags: user1001,user0 Only specified tags will be pulled down. Verified on openshift v3.11.0-0.32.0 and cockpit 176 # oc rsh -n default registry-console-1-v5pqm sh-4.2$ rpm -qa | grep cockpit cockpit-bridge-176-2.el7.x86_64 cockpit-kubernetes-176-2.el7.x86_64 cockpit-ws-176-2.el7.x86_64 cockpit-dashboard-176-2.el7.x86_64 cockpit-system-176-2.el7.noarch 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:2652 |