Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1646603 - [Container Admin] Registry Name Pattern with repository.url will always be rejected
Summary: [Container Admin] Registry Name Pattern with repository.url will always be re...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management - Content
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.5.0
Assignee: Andrew Kofink
QA Contact: Mirek Długosz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-05 18:19 UTC by Mirek Długosz
Modified: 2020-06-29 09:47 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-katello-3.10.0.10-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:38:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25781 0 Normal Closed [Container Admin Feature] Registry Name Pattern with repository.url will always be rejected 2020-06-29 09:45:20 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:38:47 UTC

Description Mirek Długosz 2018-11-05 18:19:01 UTC
Registry Name Pattern claims to allow repository.url variable, but it always reject it. If that variable is used, error message will be displayed: "An error occurred saving the Environment: Registry name pattern will result in invalid container image name of member repositories".


The problem is that name created by pattern must pass through ContainerImageNameValidator.validate_name function. It checks name against following regexp:
/\A([a-z0-9]+[a-z0-9\-\_\.]*)+(\/[a-z0-9]+[a-z0-9\-\_\.]*)*\z/

This regexp allows multiple slashes in name, but not subsequently (/ is OK, // is not). URL will contain :// (colon slash slash) sequence between protocol and host name. So URL technically can be used, but it will be rejected as invalid.



Version:
Satellite 6.5 snap 2
katello-3.9.0-0.11.rc2.el7sat.noarch
satellite-6.5.0-3.beta.el7sat.noarch
foreman-1.20.0-0.17.RC2.el7sat.noarch


Steps to reproduce:
1. Content -> Lifecycle Environment
2. Select environment other than "Library" (create one if necessary)
3. In registry pattern name field, put pattern with repository.url variable (example: "<%= organization.label %>/<%= repository.url %>/<%= repository.docker_upstream_name %>")
4. Save

Comment 4 Andrew Kofink 2019-01-04 15:16:23 UTC
Created redmine issue https://projects.theforeman.org/issues/25781 from this bug

Comment 5 Bryan Kearney 2019-01-07 21:15:08 UTC
Upstream bug assigned to akofink

Comment 6 Bryan Kearney 2019-01-08 21:17:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25781 has been resolved.

Comment 8 Mirek Długosz 2019-01-28 10:56:29 UTC
Fix confirmed after re-test.
There is no mention of "repository.url" in contextual help on Lifecycle Environment page.
Using registry name pattern from initial report above, on saving I get error message: "An error occurred saving the Environment: Registry name pattern will result in invalid container image name of member repositories"


Tested on:
Satellite 6.5 snap 13
foreman-1.20.1.9-1.el7sat.noarch
satellite-6.5.0-6.beta.el7sat.noarch
katello-3.10.0-0.6.rc1.el7sat.noarch
tfm-rubygem-katello-3.10.0.15-1.el7sat.noarch
pulp-server-2.18.0-0.1.rc.el7sat.noarch

Comment 11 errata-xmlrpc 2019-05-14 12:38:40 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/RHSA-2019:1222


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