RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1393443 - rhel-push-plugin blocks all rhel-based pushes
Summary: rhel-push-plugin blocks all rhel-based pushes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Antonio Murdaca
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-09 15:01 UTC by Ed Santiago
Modified: 2019-03-06 01:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-06 17:44:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2859 0 normal SHIPPED_LIVE docker bug fix update 2016-12-06 22:41:18 UTC

Description Ed Santiago 2016-11-09 15:01:20 UTC
docker-1.12.3-4.el7.x86_64 is blocking pushes of all rhel-based images, even to registries other than docker.io :

    # sed -e 's/^ *//' >Dockerfile <<EOF
    FROM docker.io/busybox:latest
    MAINTAINER nobody
    LABEL Vendor="Red Hat, Inc."
    LABEL Name="rhelNOTREALLY"
    RUN echo hi
EOF

    # docker build -t foo .
    # docker tag foo nonexistent-registry.com/myname/myrhel:latest
    # docker push nonexistent-registry.com/myname/myrhel:latest
    Error response from daemon: plugin rhel-push-plugin failed with error: AuthZPlugin.AuthZReq: sha256:f4011a6057abe2835b3b29ce796d100c27cdf48098bb8de9d3bf908d7f0d2c09 is RHEL based, please push by tag

Expected result: 'unable to ping registry endpoint' (or, if this were a real registry other than docker.io, success)

Analysis: seems to be caused by

    https://github.com/projectatomic/rhel-push-plugin/commit/bc8b12c38bbe86ba2d94928bdefdb934cab0ceac

...which now returns an error (was: nil), triggering:

    RHELBased, err := p.isRHELBased(repoName)
    if err != nil {
        return authorization.Response{Err: err.Error()}
    }

Comment 1 Antonio Murdaca 2016-11-09 15:10:34 UTC
Ed, I don't understand, by declaring those LABEL you're effectively making the image "rhel-based" for what the plugin knows about an image. That's the way the plugin works (and even if we do the same directly in docker, we still need to base the login on LABELs).

Comment 2 Daniel Walsh 2016-11-09 15:13:39 UTC
Antonio the only place we want to block pushes to is docker.io.  We want to allow a customer to push to their own registries.

Comment 3 Ed Santiago 2016-11-09 15:25:26 UTC
Would now be a good time to ask what "please push by tag" is supposed to mean? I am pushing by tag. And now that's the error message when pushing to docker.io as well. The old message ("RHEL based images are not allowed to be pushed to docker.io") was more descriptive, but I don't see a code path that gets to it any more.

Comment 4 Antonio Murdaca 2016-11-09 15:29:50 UTC
Fixed by https://github.com/projectatomic/rhel-push-plugin/commit/eb9e6beb8767a4a102e011c2d6e70394629dfa91

$ docker push nonexistent-registry.com/myname/myrhel:latest
The push refers to a repository [nonexistent-registry.com/myname/myrhel]
Get https://nonexistent-registry.com/v1/_ping: dial tcp: lookup nonexistent-registry.com on 10.38.5.26:53: no such host

# now trying to push to docker.io

$ docker tag foo runcom/rhelbased
% docker push runcom/rhelbased
Error response from daemon: authorization denied by plugin rhel-push-plugin: RHEL based images are not allowed to be pushed to docker.io

Comment 5 Luwen Su 2016-11-15 16:09:18 UTC
In docker-1.12.3-7.el7.x86_64, 

# docker tag foo nonexistent-registry.com/myname/myrhel:latest

# docker push nonexistent-registry.com/myname/myrhel:latest
The push refers to a repository [nonexistent-registry.com/myname/myrhel]
Get https://nonexistent-registry.com/v1/_ping: dial tcp: lookup nonexistent-registry.com on 10.72.17.5:53: no such host


Move to verified

Comment 8 errata-xmlrpc 2016-12-06 17:44:50 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://rhn.redhat.com/errata/RHBA-2016-2859.html


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