Project

Profile

Help

Issue #6884

closed

Docker push fails when pushing label with dot

Added by osapryki over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 74
Quarter:

Description

Steps to reproduce.

  1. Deploy pulp-container.
  2. Create appropriate repository and distribution (e.g. python).
  3. Push image to registry.

docker push ${REGISTRY_URL}/python:3.7

Expected behaviour:

Image is pushed successfully.

Actual behavior:

% docker push localhost:5001/python:3.7-alpine                                     
The push refers to repository [localhost:5001/python]
0928cd2e6851: Layer already exists 
0e59b5280255: Layer already exists 
17a1596d52d8: Layer already exists 
61b675163d2a: Layer already exists 
5216338b40a7: Layer already exists 
error parsing HTTP 404 response body: invalid character '<' looking for beginning of value: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n  <title>Page not found at /v2/python/manifests/3.7-alpine</title>\n  <meta name=\"robots\" content=\"NONE,NOARCHIVE\">\n  <style type=\"text/css\">\n    html * { padding:0; margin:0; }\n    body * { padding:10px 20px; }\n    body * * { padding:0; }\n    body { font:small sans-serif; background:#eee; color:#000; }\n    body>div { border-bottom:1px solid #ddd; }\n    h1 { font-weight:normal; margin-bottom:.4em; }\n    h1 span { font-size:60%; color:#666; font-weight:normal; }\n    table { border:none; border-collapse: collapse; width:100%; }\n    td, th { vertical-align:top; padding:2px 3px; }\n    th { width:12em; text-align:right; color:#666; padding-right:.5em; }\n    #info { background:#f6f6f6; }\n    #info ol { margin: 0.5em 4em; }\n    #info ol li { font-family: monospace; }\n    #summary { background: #ffc; }\n    #explanation { background:#eee; border-bottom: 0px none; }\n  </style>\n</head>\n<body>\n  <div id=\"summary\">\n    <h1>Page not found <span>(404)</span></h1>\n    <table class=\"meta\">\n      <tr>\n        <th>Request Method:</th>\n        <td>PUT</td>\n      </tr>\n      <tr>\n        <th>Request URL:</th>\n        <td>http://localhost:5001/v2/python/manifests/3.7-alpine</td>\n      </tr>\n      \n    </table>\n  </div>\n  <div id=\"info\">\n    \n      <p>\n      Using the URLconf defined in <code>pulpcore.app.urls</code>,\n      Django tried these URL patterns, in this order:\n      </p>\n      <ol>\n        \n          <li>\n            \n                ^pulp/api/v3/status/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/orphans/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^auth/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/docs/api(?P&lt;format&gt;\\.json|\\.yaml)\n                [name='schema-json']\n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/docs/\n                [name='schema-redoc']\n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/$\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/\n                \n            \n          </li>\n        \n          <li>\n            \n                ^pulp/api/v3/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                ansible/collections/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                pulp_ansible/galaxy/&lt;path:path&gt;/api/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                pulp_ansible/galaxy/&lt;path:path&gt;/api/v1/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                pulp_ansible/galaxy/&lt;path:path&gt;/api/v2/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                pulp_ansible/galaxy/&lt;path:path&gt;/api/v3/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                \n                \n            \n                ^$\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                api/automation-hub/\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                \n                \n            \n                ^metrics$\n                [name='prometheus-django-metrics']\n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                ^v2/$\n                \n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                \n                \n            \n                ^^v2/(?P&lt;path&gt;.+)/blobs/uploads\\/?$\n                [name='docker-upload-list']\n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                \n                \n            \n                ^^v2/(?P&lt;path&gt;.+)/blobs/uploads\\/?/(?P&lt;pk&gt;[^/.]+)$\n                [name='docker-upload-detail']\n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                \n                \n            \n                ^^v2/(?P&lt;path&gt;.+)/blobs/(?P&lt;pk&gt;[^/.]+)$\n                [name='blobs-detail']\n            \n          </li>\n        \n          <li>\n            \n                \n                \n            \n                \n                \n            \n                ^^v2/(?P&lt;path&gt;.+)/manifests/(?P&lt;pk&gt;[^/.]+)$\n                [name='manifests-detail']\n            \n          </li>\n        \n      </ol>\n      <p>\n        \n        The current path, <code>v2/python/manifests/3.7-alpine</code>, didn't match any of these.\n      </p>\n    \n  </div>\n\n  <div id=\"explanation\">\n    <p>\n      You're seeing this error because you have <code>DEBUG = True</code> in\n      your Django settings file. Change that to <code>False</code>, and Django\n      will display a standard 404 page.\n    </p>\n  </div>\n</body>\n</html>\n"

Note:

This happens because manifest route in Django does not allow dots in label name:

^v2/(?P<path>.+)/manifests/(?P<pk>[^/.]+)$ [name='manifests-detail']
Actions #1

Updated by dkliban@redhat.com over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dkliban@redhat.com
  • Triaged changed from No to Yes
  • Sprint set to Sprint 74
Actions #2

Updated by dkliban@redhat.com over 4 years ago

  • Status changed from ASSIGNED to POST

Added by dkliban@redhat.com over 4 years ago

Revision b2841db8 | View on GitHub

Adds a custom lookup value regex for the Manifest viewset.

This fixes a bug where manifest tags could not contain periods.

fixes: #6884 https://pulp.plan.io/issues/6884

Added by dkliban@redhat.com over 4 years ago

Revision b2841db8 | View on GitHub

Adds a custom lookup value regex for the Manifest viewset.

This fixes a bug where manifest tags could not contain periods.

fixes: #6884 https://pulp.plan.io/issues/6884

Actions #4

Updated by dkliban@redhat.com over 4 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by ipanova@redhat.com over 4 years ago

  • Sprint/Milestone set to 2.0.0
Actions #9

Updated by mdellweg over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF